<https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 15:27:41 +0000 (15:27 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 15:27:41 +0000 (15:27 +0000)
commitf233721cc035e014d08267f43ffddb9baff25b4c
treed6fb6418dd6288a05bc1e21d1aa0cc2264dcee0b
parent5183a7eebc1bc90b8a1e646486b769a065aaf9d6
<https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails

Reviewed by Andreas Kling.

Remove this oddly factored type that is used to optionally collect some data during ComposedShadowTreeWalker parent traversal.

Also removed support for reset-style-inheritance attribute in InsertionPoint. We don't use or expose it.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::styleForElement):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::State):
(WebCore::StyleResolver::State::elementLinkState):

    Remove m_distributedToInsertionPoint State field. We never hit the cases where it was used.

* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
(WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
(WebCore::ComposedShadowTreeWalker::traverseParent):

    Return null instead of setting childWasOutOfComposition to details object. That's what would happen anyway in the caller.

(WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
(WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
* dom/ComposedShadowTreeWalker.h:
* dom/Node.cpp:
(WebCore::Node::insertionParentForBinding):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRenderingContext::isOnEncapsulationBoundary):

    Make this look up InsertionPoint directly intead of relying it being populated in m_parentDetails. The function is used only in
    a few non-performance critical places.

(WebCore::NodeRenderingContext::resetStyleInheritance):

    Return parent ShadowRoots resetStyleInheritance() flag instead of using m_parentDetails.

* dom/NodeRenderingContext.h:
* dom/NodeRenderingTraversal.cpp:
(WebCore::NodeRenderingTraversal::parentSlow):
* dom/NodeRenderingTraversal.h:
(WebCore::NodeRenderingTraversal::parent):

    Remove ParentDetails.

* html/HTMLAttributeNames.in:
* html/shadow/InsertionPoint.cpp:

    Remove unused resetStyleInheritance attribute.

(WebCore::InsertionPoint::removedFrom):
(WebCore::findInsertionPointOf):

    Renamed for clarity.

* html/shadow/InsertionPoint.h:
* testing/Internals.cpp:
(WebCore::Internals::includerFor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/dom/ComposedShadowTreeWalker.cpp
Source/WebCore/dom/ComposedShadowTreeWalker.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/NodeRenderingContext.cpp
Source/WebCore/dom/NodeRenderingContext.h
Source/WebCore/dom/NodeRenderingTraversal.cpp
Source/WebCore/dom/NodeRenderingTraversal.h
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/html/shadow/InsertionPoint.cpp
Source/WebCore/html/shadow/InsertionPoint.h
Source/WebCore/testing/Internals.cpp