Move functions from NodeRareData to ElementRareData and other classes
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2013 23:57:39 +0000 (23:57 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2013 23:57:39 +0000 (23:57 +0000)
commitd352a45a8ae479caf09efacd64daf4cda6646094
tree43ac93c88cd1b13aa19e2dc1552bcce8bd132aa6
parent12329c924333646d987d26a48f744134a0d7535c
Move functions from NodeRareData to ElementRareData and other classes
https://bugs.webkit.org/show_bug.cgi?id=106679

Reviewed by Benjamin Poulain.

Moved tab index related functions from NodeRareData to ElementRareData since only
HTMLElement uses them, and moved related functions on Node to Element accordingly.

Also replaced transientMutationObserverRegistry and ensureTransientMutationObserverRegistry
by ensureMutationObserverData, and moved micro-data related member functions into
NodeMicroDataTokenLists, and moved NodeMutationObserverData and NodeMicroDataTokenLists
out of NodeRareData as they're used outside of NodeRareData now.

The intention is to move more code into NodeMutationObserverData and NodeMicroDataTokenLists
in the follow up patches so that they can detect the removability of NodeRareData.

No new tests are added since there should be no behavior changes.

* dom/Element.cpp:
(WebCore::Element::clearTabIndexExplicitlyIfNeeded):
(WebCore::Element::setTabIndexExplicitly):
(WebCore::Element::tabIndex):
(WebCore::Element::supportsFocus):
* dom/Element.h:
(Element):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::tabIndex):
(WebCore::ElementRareData::setTabIndexExplicitly):
(WebCore::ElementRareData::tabIndexSetExplicitly):
(WebCore::ElementRareData::clearTabIndexExplicitly):
* dom/Node.cpp:
(WebCore::Node::tabIndex):
(WebCore::Node::supportsFocus):
(WebCore::Node::mutationObserverRegistry):
(WebCore::Node::transientMutationObserverRegistry):
(WebCore::Node::registerMutationObserver):
(WebCore::Node::registerTransientMutationObserver):
(WebCore::Node::itemProp):
(WebCore::Node::setItemProp):
(WebCore::Node::itemRef):
(WebCore::Node::setItemRef):
(WebCore::Node::itemType):
(WebCore::Node::setItemType):
* dom/Node.h:
(Node):
* dom/NodeRareData.h:
(NodeMutationObserverData):
(WebCore::NodeMutationObserverData::create):
(NodeMicroDataTokenLists):
(WebCore::NodeMicroDataTokenLists::create):
(WebCore::NodeMicroDataTokenLists::itemProp):
(WebCore::NodeMicroDataTokenLists::itemRef):
(WebCore::NodeMicroDataTokenLists::itemType):
(NodeRareData):
(WebCore::NodeRareData::mutationObserverData):
(WebCore::NodeRareData::ensureMutationObserverData):
(WebCore::NodeRareData::ensureMicroDataTokenLists):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementRareData.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/NodeRareData.cpp
Source/WebCore/dom/NodeRareData.h
Source/WebCore/html/HTMLElement.cpp