Reducing CSS code duplication in declaration list error recovery
https://bugs.webkit.org/show_bug.cgi?id=115157

Reviewed by Andreas Kling.

From Blink r148974 by <serya@chromium.org>

Refactor "invalid_block_list error | /* empty */" in a new
decl_list_recovery rule that allows to remove 4 redundant rules.

No new test required as we're just refactoring code, no new behaviour.

* css/CSSGrammar.y.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Document::formController() should return a reference.
<http://webkit.org/b/116758>

Reviewed by Antti Koivisto.

The formController() is created on demand, so return a reference instead.

* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::formController):
(WebCore::Document::setStateForNewFormElements):
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
(WebCore::HTMLFormControlElementWithState::finishParsingChildren):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::finishParsingChildren):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::checkedRadioButtons):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move "hover" state logic from Node to Element.
<http://webkit.org/b/116757>

Reviewed by Antti Koivisto.

Resolve a 7 year old FIXME by merging the "hover" state logic from Node and ContainerNode
and moving it all to Element instead.

* dom/Node.cpp:
(WebCore::Node::detach):
* dom/Element.cpp:
(WebCore::Element::detach):

    Move Document::hoveredNodeDetached() call from Node::detach() to Element::detach().

(WebCore::Element::isUserActionElementHovered):
(WebCore::Element::setHovered):
* dom/Element.h:
(WebCore::Element::hovered):

    Moved here from Node/ContainerNode.

* dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::setHovered):
(WebCore::UserActionElementSet::setFlags):

    Make setHovered() take an Element* instead of a Node*. I'd like to do this will all
    of these methods eventually, so added a setFlags() helper with the tighter type.

* html/HTMLLabelElement.h:
* html/shadow/SpinButtonElement.h:

    Sprinkle OVERRIDE on setHovered() overrides.

* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isHovered):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isHovered):

    Check if the inspected Node is an element before asking if it's hovered.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150684 268f45cc-cd09-0410-ab3c-d52691b4dbfc