Changeset 190845 in webkit


Ignore:
Timestamp:
Oct 11, 2015 12:18:58 AM (8 years ago)
Author:
Antti Koivisto
Message:

Remove InsertionPoint and ContentDistributor
https://bugs.webkit.org/show_bug.cgi?id=150004

Rubber-stamped by Sam Weinig.

Now that <details> is on top of the modern Shadow DOM remove the last vestiges of the V0 Shadow DOM API.

  • CMakeLists.txt:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.xcodeproj/project.pbxproj:
  • css/SelectorChecker.cpp:
  • css/StyleResolver.cpp:
  • dom/ContainerNode.cpp:
  • dom/Element.cpp:

(WebCore::shouldUseNodeRenderingTraversalSlowPath):
(WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):

  • dom/Node.cpp:

(WebCore::Node::parentOrShadowHostElement):
(WebCore::Node::insertedInto):
(WebCore::Node::insertionParentForBinding): Deleted.

  • dom/Node.h:

(WebCore::Node::isCharacterDataNode):
(WebCore::Node::isFrameOwnerElement):
(WebCore::Node::isPluginElement):
(WebCore::Node::isImageControlsRootElement):
(WebCore::Node::isImageControlsButtonElement):
(WebCore::Node::isDocumentFragment):
(WebCore::Node::isShadowRoot):
(WebCore::Node::isInsertionPointNode): Deleted.
(WebCore::Node::isInsertionPoint): Deleted.

  • dom/NodeRenderingTraversal.cpp:

(WebCore::NodeRenderingTraversal::traverseParent):
(WebCore::NodeRenderingTraversal::traverseFirstChild):
(WebCore::NodeRenderingTraversal::traverseLastChild):
(WebCore::NodeRenderingTraversal::traverseNextSibling):
(WebCore::NodeRenderingTraversal::traversePreviousSibling):
(WebCore::NodeRenderingTraversal::parentSlow):
(WebCore::NodeRenderingTraversal::nextInScope):
(WebCore::NodeRenderingTraversal::previousInScope):
(WebCore::NodeRenderingTraversal::parentInScope):
(WebCore::NodeRenderingTraversal::lastChildInScope):
(WebCore::NodeRenderingTraversal::nodeCanBeDistributed): Deleted.
(WebCore::NodeRenderingTraversal::findFirstSiblingEnteringInsertionPoints): Deleted.
(WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints): Deleted.
(WebCore::NodeRenderingTraversal::findFirstFromDistributedNode): Deleted.
(WebCore::NodeRenderingTraversal::findLastSiblingEnteringInsertionPoints): Deleted.
(WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints): Deleted.
(WebCore::NodeRenderingTraversal::findLastFromDistributedNode): Deleted.

  • dom/ShadowRoot.h:

(WebCore::ShadowRoot::distributor): Deleted.

  • html/HTMLInputElement.cpp:
  • html/HTMLSlotElement.cpp:
  • html/HTMLSlotElement.h:
  • html/shadow/ContentDistributor.cpp: Removed.
  • html/shadow/ContentDistributor.h: Removed.
  • html/shadow/InsertionPoint.cpp: Removed.
  • html/shadow/InsertionPoint.h: Removed.
  • page/FocusController.cpp:

(WebCore::FocusController::previousFocusableElement):

  • testing/Internals.cpp:
Location:
trunk/Source/WebCore
Files:
4 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r190840 r190845  
    18441844
    18451845    html/shadow/AutoFillButtonElement.cpp
    1846     html/shadow/ContentDistributor.cpp
    18471846    html/shadow/DetailsMarkerControl.cpp
    1848     html/shadow/InsertionPoint.cpp
    18491847    html/shadow/MediaControlElementTypes.cpp
    18501848    html/shadow/MediaControlElements.cpp
  • trunk/Source/WebCore/ChangeLog

    r190844 r190845  
     12015-10-10  Antti Koivisto  <antti@apple.com>
     2
     3        Remove InsertionPoint and ContentDistributor
     4        https://bugs.webkit.org/show_bug.cgi?id=150004
     5
     6        Rubber-stamped by Sam Weinig.
     7
     8        Now that <details> is on top of the modern Shadow DOM remove the last vestiges of the V0 Shadow DOM API.
     9
     10        * CMakeLists.txt:
     11        * WebCore.vcxproj/WebCore.vcxproj:
     12        * WebCore.xcodeproj/project.pbxproj:
     13        * css/SelectorChecker.cpp:
     14        * css/StyleResolver.cpp:
     15        * dom/ContainerNode.cpp:
     16        * dom/Element.cpp:
     17        (WebCore::shouldUseNodeRenderingTraversalSlowPath):
     18        (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):
     19        * dom/Node.cpp:
     20        (WebCore::Node::parentOrShadowHostElement):
     21        (WebCore::Node::insertedInto):
     22        (WebCore::Node::insertionParentForBinding): Deleted.
     23        * dom/Node.h:
     24        (WebCore::Node::isCharacterDataNode):
     25        (WebCore::Node::isFrameOwnerElement):
     26        (WebCore::Node::isPluginElement):
     27        (WebCore::Node::isImageControlsRootElement):
     28        (WebCore::Node::isImageControlsButtonElement):
     29        (WebCore::Node::isDocumentFragment):
     30        (WebCore::Node::isShadowRoot):
     31        (WebCore::Node::isInsertionPointNode): Deleted.
     32        (WebCore::Node::isInsertionPoint): Deleted.
     33        * dom/NodeRenderingTraversal.cpp:
     34        (WebCore::NodeRenderingTraversal::traverseParent):
     35        (WebCore::NodeRenderingTraversal::traverseFirstChild):
     36        (WebCore::NodeRenderingTraversal::traverseLastChild):
     37        (WebCore::NodeRenderingTraversal::traverseNextSibling):
     38        (WebCore::NodeRenderingTraversal::traversePreviousSibling):
     39        (WebCore::NodeRenderingTraversal::parentSlow):
     40        (WebCore::NodeRenderingTraversal::nextInScope):
     41        (WebCore::NodeRenderingTraversal::previousInScope):
     42        (WebCore::NodeRenderingTraversal::parentInScope):
     43        (WebCore::NodeRenderingTraversal::lastChildInScope):
     44        (WebCore::NodeRenderingTraversal::nodeCanBeDistributed): Deleted.
     45        (WebCore::NodeRenderingTraversal::findFirstSiblingEnteringInsertionPoints): Deleted.
     46        (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints): Deleted.
     47        (WebCore::NodeRenderingTraversal::findFirstFromDistributedNode): Deleted.
     48        (WebCore::NodeRenderingTraversal::findLastSiblingEnteringInsertionPoints): Deleted.
     49        (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints): Deleted.
     50        (WebCore::NodeRenderingTraversal::findLastFromDistributedNode): Deleted.
     51        * dom/ShadowRoot.h:
     52        (WebCore::ShadowRoot::distributor): Deleted.
     53        * html/HTMLInputElement.cpp:
     54        * html/HTMLSlotElement.cpp:
     55        * html/HTMLSlotElement.h:
     56        * html/shadow/ContentDistributor.cpp: Removed.
     57        * html/shadow/ContentDistributor.h: Removed.
     58        * html/shadow/InsertionPoint.cpp: Removed.
     59        * html/shadow/InsertionPoint.h: Removed.
     60        * page/FocusController.cpp:
     61        (WebCore::FocusController::previousFocusableElement):
     62        * testing/Internals.cpp:
     63
    1642015-10-10  Simon Fraser  <simon.fraser@apple.com>
    265
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r190840 r190845  
    1731617316    <ClCompile Include="..\html\parser\XSSAuditorDelegate.cpp" />
    1731717317    <ClCompile Include="..\html\shadow\AutoFillButtonElement.cpp" />
    17318     <ClCompile Include="..\html\shadow\ContentDistributor.cpp" />
    1731917318    <ClCompile Include="..\html\shadow\DetailsMarkerControl.cpp" />
    17320     <ClCompile Include="..\html\shadow\InsertionPoint.cpp" />
    1732117319    <ClCompile Include="..\html\shadow\MediaControlElements.cpp" />
    1732217320    <ClCompile Include="..\html\shadow\MediaControlElementTypes.cpp" />
     
    2237322371    <ClInclude Include="..\html\parser\XSSAuditorDelegate.h" />
    2237422372    <ClInclude Include="..\html\shadow\AutoFillButtonElement.h" />
    22375     <ClInclude Include="..\html\shadow\ContentDistributor.h" />
    2237622373    <ClInclude Include="..\html\shadow\DetailsMarkerControl.h" />
    22377     <ClInclude Include="..\html\shadow\InsertionPoint.h" />
    2237822374    <ClInclude Include="..\html\shadow\MediaControlElements.h" />
    2237922375    <ClInclude Include="..\html\shadow\MediaControlElementTypes.h" />
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r190794 r190845  
    22312231                550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; };
    22322232                550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; };
    2233                 57B791A314C6A62900F202D1 /* ContentDistributor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57B7919F14C6A62900F202D1 /* ContentDistributor.cpp */; };
    2234                 57B791A414C6A62900F202D1 /* ContentDistributor.h in Headers */ = {isa = PBXBuildFile; fileRef = 57B791A014C6A62900F202D1 /* ContentDistributor.h */; settings = {ATTRIBUTES = (Private, ); }; };
    2235                 57CF497414EE36D700ECFF14 /* InsertionPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */; };
    2236                 57CF497514EE36D700ECFF14 /* InsertionPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 57CF497314EE36D700ECFF14 /* InsertionPoint.h */; };
    22372233                580371611A66F00A00BAF519 /* ClipRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5803715F1A66F00A00BAF519 /* ClipRect.cpp */; };
    22382234                580371621A66F00A00BAF519 /* ClipRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 580371601A66F00A00BAF519 /* ClipRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    96009596                550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    96019597                55D408F71A7C631800C78450 /* SVGImageClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageClients.h; sourceTree = "<group>"; };
    9602                 57B7919F14C6A62900F202D1 /* ContentDistributor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentDistributor.cpp; sourceTree = "<group>"; };
    9603                 57B791A014C6A62900F202D1 /* ContentDistributor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentDistributor.h; sourceTree = "<group>"; };
    9604                 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InsertionPoint.cpp; sourceTree = "<group>"; };
    9605                 57CF497314EE36D700ECFF14 /* InsertionPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InsertionPoint.h; sourceTree = "<group>"; };
    96069598                5803715F1A66F00A00BAF519 /* ClipRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClipRect.cpp; sourceTree = "<group>"; };
    96079599                580371601A66F00A00BAF519 /* ClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClipRect.h; sourceTree = "<group>"; };
     
    1617416166                                7C1E97251A9F9834007BF0FB /* AutoFillButtonElement.cpp */,
    1617516167                                7C1E97261A9F9834007BF0FB /* AutoFillButtonElement.h */,
    16176                                 57B7919F14C6A62900F202D1 /* ContentDistributor.cpp */,
    16177                                 57B791A014C6A62900F202D1 /* ContentDistributor.h */,
    1617816168                                A7C9ABF61357A3BF00F5503F /* DetailsMarkerControl.cpp */,
    1617916169                                A7C9ABF71357A3BF00F5503F /* DetailsMarkerControl.h */,
    1618016170                                510192D318B6B9B7007FC7A1 /* ImageControlsRootElement.cpp */,
    1618116171                                510192D418B6B9B7007FC7A1 /* ImageControlsRootElement.h */,
    16182                                 57CF497214EE36D700ECFF14 /* InsertionPoint.cpp */,
    16183                                 57CF497314EE36D700ECFF14 /* InsertionPoint.h */,
    1618416172                                417253A81354BBBC00360F2A /* MediaControlElements.cpp */,
    1618516173                                417253A91354BBBC00360F2A /* MediaControlElements.h */,
     
    2450124489                                E1A1470811102B1500EEC0F3 /* ContainerNodeAlgorithms.h in Headers */,
    2450224490                                BC5EB9810E82072500B25965 /* ContentData.h in Headers */,
    24503                                 57B791A414C6A62900F202D1 /* ContentDistributor.h in Headers */,
    2450424491                                51B45D211AB8D1E200117CD2 /* ContentExtension.h in Headers */,
    2450524492                                5CDFA6C81AA4F2DA00EA8746 /* ContentExtensionActions.h in Headers */,
     
    2556725554                                C348612415FDE21E007A1CC9 /* InputTypeNames.h in Headers */,
    2556825555                                93309DEA099E64920056E581 /* InsertIntoTextNodeCommand.h in Headers */,
    25569                                 57CF497514EE36D700ECFF14 /* InsertionPoint.h in Headers */,
    2557025556                                93309DEC099E64920056E581 /* InsertLineBreakCommand.h in Headers */,
    2557125557                                D07DEABA0A36554A00CA30F8 /* InsertListCommand.h in Headers */,
     
    2833928325                                A7A78CD51532BA62006C21E4 /* ContainerNodeAlgorithms.cpp in Sources */,
    2834028326                                BC5EB9800E82072500B25965 /* ContentData.cpp in Sources */,
    28341                                 57B791A314C6A62900F202D1 /* ContentDistributor.cpp in Sources */,
    2834228327                                51B45D201AB8D1E200117CD2 /* ContentExtension.cpp in Sources */,
    2834328328                                7C93F34D1AA6BF0700A98BAB /* ContentExtensionCompiler.cpp in Sources */,
     
    2913929124                                C348612315FDE21E007A1CC9 /* InputTypeNames.cpp in Sources */,
    2914029125                                93309DE9099E64920056E581 /* InsertIntoTextNodeCommand.cpp in Sources */,
    29141                                 57CF497414EE36D700ECFF14 /* InsertionPoint.cpp in Sources */,
    2914229126                                93309DEB099E64920056E581 /* InsertLineBreakCommand.cpp in Sources */,
    2914329127                                D07DEAB90A36554A00CA30F8 /* InsertListCommand.cpp in Sources */,
  • trunk/Source/WebCore/css/SelectorChecker.cpp

    r190680 r190845  
    4646#include "HTMLProgressElement.h"
    4747#include "HTMLStyleElement.h"
    48 #include "InsertionPoint.h"
    4948#include "InspectorInstrumentation.h"
    5049#include "NodeRenderStyle.h"
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r190347 r190845  
    8181#include "HTMLTableElement.h"
    8282#include "HTMLTextAreaElement.h"
    83 #include "InsertionPoint.h"
    8483#include "InspectorInstrumentation.h"
    8584#include "KeyframeList.h"
  • trunk/Source/WebCore/dom/ContainerNode.cpp

    r190233 r190845  
    3838#include "HTMLTableRowsCollection.h"
    3939#include "InlineTextBox.h"
    40 #include "InsertionPoint.h"
    4140#include "JSLazyEventListener.h"
    4241#include "JSNode.h"
  • trunk/Source/WebCore/dom/Element.cpp

    r190840 r190845  
    5656#include "HTMLTemplateElement.h"
    5757#include "IdTargetObserverRegistry.h"
    58 #include "InsertionPoint.h"
    5958#include "KeyboardEvent.h"
    6059#include "MainFrame.h"
     
    16231622static bool shouldUseNodeRenderingTraversalSlowPath(const Element& element)
    16241623{
    1625     if (element.isShadowRoot())
    1626         return true;
    1627     return element.isInsertionPoint() || element.shadowRoot();
     1624    return element.isShadowRoot() || element.shadowRoot();
    16281625}
    16291626
  • trunk/Source/WebCore/dom/Node.cpp

    r190834 r190845  
    4747#include "HTMLSlotElement.h"
    4848#include "HTMLStyleElement.h"
    49 #include "InsertionPoint.h"
    5049#include "InspectorController.h"
    5150#include "KeyboardEvent.h"
     
    11341133}
    11351134
    1136 Node* Node::insertionParentForBinding() const
    1137 {
    1138     return findInsertionPointOf(this);
    1139 }
    1140 
    11411135Node::InsertionNotificationRequest Node::insertedInto(ContainerNode& insertionPoint)
    11421136{
  • trunk/Source/WebCore/dom/Node.h

    r190210 r190845  
    258258    virtual bool isFrameOwnerElement() const { return false; }
    259259    virtual bool isPluginElement() const { return false; }
    260     virtual bool isInsertionPointNode() const { return false; }
    261260#if ENABLE(SERVICE_CONTROLS)
    262261    virtual bool isImageControlsRootElement() const { return false; }
     
    268267    bool isDocumentFragment() const { return getFlag(IsDocumentFragmentFlag); }
    269268    bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); }
    270     bool isInsertionPoint() const { return getFlag(NeedsNodeRenderingTraversalSlowPathFlag) && isInsertionPointNode(); }
    271     // Returns Node rather than InsertionPoint. Should be used only for language bindings.
    272     Node* insertionParentForBinding() const;
    273269
    274270    bool needsNodeRenderingTraversalSlowPath() const;
     
    656652        CreateSVGElement = CreateStyledElement | IsSVGFlag | HasCustomStyleResolveCallbacksFlag,
    657653        CreateDocument = CreateContainer | InDocumentFlag,
    658         CreateInsertionPoint = CreateHTMLElement | NeedsNodeRenderingTraversalSlowPathFlag,
    659654        CreateEditingText = CreateText | IsEditingTextFlag,
    660655        CreateMathMLElement = CreateStyledElement | IsMathMLFlag
  • trunk/Source/WebCore/dom/NodeRenderingTraversal.cpp

    r189239 r190845  
    2929#include "NodeRenderingTraversal.h"
    3030
    31 #include "InsertionPoint.h"
    3231#include "ShadowRoot.h"
    3332
     
    3534
    3635namespace NodeRenderingTraversal {
    37 
    38 static Node* findFirstSiblingEnteringInsertionPoints(const Node*);
    39 static Node* findFirstEnteringInsertionPoints(const Node*);
    40 static Node* findFirstFromDistributedNode(const Node*, const InsertionPoint*);
    41 static Node* findLastSiblingEnteringInsertionPoints(const Node*);
    42 static Node* findLastEnteringInsertionPoints(const Node*);
    43 static Node* findLastFromDistributedNode(const Node*, const InsertionPoint*);
    44 
    45 static inline bool nodeCanBeDistributed(const Node* node)
    46 {
    47     ASSERT(node);
    48     Node* parent = parentNodeForDistribution(node);
    49     if (!parent)
    50         return false;
    51 
    52     if (parent->isShadowRoot())
    53         return false;
    54 
    55     if (is<Element>(*parent) && downcast<Element>(*parent).shadowRoot())
    56         return true;
    57    
    58     return false;
    59 }
    60 
    61 static Node* findFirstSiblingEnteringInsertionPoints(const Node* node)
    62 {
    63     for (const Node* sibling = node; sibling; sibling = sibling->nextSibling()) {
    64         if (Node* found = findFirstEnteringInsertionPoints(sibling))
    65             return found;
    66     }
    67     return nullptr;
    68 }
    69 
    70 static Node* findFirstEnteringInsertionPoints(const Node* node)
    71 {
    72     ASSERT(node);
    73     if (!isActiveInsertionPoint(node))
    74         return const_cast<Node*>(node);
    75     const InsertionPoint& insertionPoint = downcast<InsertionPoint>(*node);
    76     if (Node* found = findFirstFromDistributedNode(insertionPoint.firstDistributed(), &insertionPoint))
    77         return found;
    78     return findFirstSiblingEnteringInsertionPoints(node->firstChild());
    79 }
    80 
    81 static Node* findFirstFromDistributedNode(const Node* node, const InsertionPoint* insertionPoint)
    82 {
    83     for (const Node* next = node; next; next = insertionPoint->nextDistributedTo(next)) {
    84         if (Node* found = findFirstEnteringInsertionPoints(next))
    85             return found;
    86     }
    87     return nullptr;
    88 }
    89 
    90 static Node* findLastSiblingEnteringInsertionPoints(const Node* node)
    91 {
    92     for (const Node* sibling = node; sibling; sibling = sibling->previousSibling()) {
    93         if (Node* found = findLastEnteringInsertionPoints(sibling))
    94             return found;
    95     }
    96     return nullptr;
    97 }
    98 
    99 static Node* findLastEnteringInsertionPoints(const Node* node)
    100 {
    101     ASSERT(node);
    102     if (!isActiveInsertionPoint(node))
    103         return const_cast<Node*>(node);
    104     const InsertionPoint& insertionPoint = downcast<InsertionPoint>(*node);
    105     if (Node* found = findLastFromDistributedNode(insertionPoint.lastDistributed(), &insertionPoint))
    106         return found;
    107     return findLastSiblingEnteringInsertionPoints(node->lastChild());
    108 }
    109 
    110 static Node* findLastFromDistributedNode(const Node* node, const InsertionPoint* insertionPoint)
    111 {
    112     for (const Node* next = node; next; next = insertionPoint->previousDistributedTo(next)) {
    113         if (Node* found = findLastEnteringInsertionPoints(next))
    114             return found;
    115     }
    116     return nullptr;
    117 }
    11836
    11937enum ShadowRootCrossing { CrossShadowRoot, DontCrossShadowRoot };
     
    12442        return nullptr;
    12543
    126     if (nodeCanBeDistributed(node)) {
    127         if (InsertionPoint* insertionPoint = findInsertionPointOf(node))
    128             return traverseParent(insertionPoint, shadowRootCrossing);
     44    ContainerNode* parent = node->parentNode();
     45    if (parent && parent->shadowRoot())
    12946        return nullptr;
    130     }
    131     ContainerNode* parent = node->parentNode();
     47
    13248    if (!parent)
    13349        return nullptr;
     
    13652        return shadowRootCrossing == CrossShadowRoot ? downcast<ShadowRoot>(parent)->host() : parent;
    13753
    138     if (is<InsertionPoint>(*parent)) {
    139         const InsertionPoint& insertionPoint = downcast<InsertionPoint>(*parent);
    140         if (insertionPoint.hasDistribution())
    141             return nullptr;
    142         if (insertionPoint.isActive())
    143             return traverseParent(parent, shadowRootCrossing);
    144     }
    14554    return parent;
    14655}
     
    15463        node = node->shadowRoot();
    15564    }
    156     return findFirstSiblingEnteringInsertionPoints(node->firstChild());
     65    return node->firstChild();
    15766}
    15867
     
    16574        node = node->shadowRoot();
    16675    }
    167     return findLastSiblingEnteringInsertionPoints(node->lastChild());
     76    return node->lastChild();
    16877}
    16978
     
    17180{
    17281    ASSERT(node);
    173 
    174     InsertionPoint* insertionPoint;
    175     if (nodeCanBeDistributed(node) && (insertionPoint = findInsertionPointOf(node))) {
    176         Node* found = findFirstFromDistributedNode(insertionPoint->nextDistributedTo(node), insertionPoint);
    177         if (found)
    178             return found;
    179         return traverseNextSibling(insertionPoint);
    180     }
    181 
    182     for (const Node* sibling = node->nextSibling(); sibling; sibling = sibling->nextSibling()) {
    183         if (Node* found = findFirstEnteringInsertionPoints(sibling))
    184             return found;
    185     }
    186     if (node->parentNode() && isActiveInsertionPoint(node->parentNode()))
    187         return traverseNextSibling(node->parentNode());
    188 
    189     return nullptr;
     82    return node->nextSibling();
    19083}
    19184
     
    19386{
    19487    ASSERT(node);
    195 
    196     InsertionPoint* insertionPoint;
    197     if (nodeCanBeDistributed(node) && (insertionPoint = findInsertionPointOf(node))) {
    198         Node* found = findLastFromDistributedNode(insertionPoint->previousDistributedTo(node), insertionPoint);
    199         if (found)
    200             return found;
    201         return traversePreviousSibling(insertionPoint);
    202     }
    203 
    204     for (const Node* sibling = node->previousSibling(); sibling; sibling = sibling->previousSibling()) {
    205         if (Node* found = findLastEnteringInsertionPoints(sibling))
    206             return found;
    207     }
    208     if (node->parentNode() && isActiveInsertionPoint(node->parentNode()))
    209         return traversePreviousSibling(node->parentNode());
    210 
    211     return nullptr;
     88    return node->previousSibling();
    21289}
    21390
     
    242119Node* nextInScope(const Node* node)
    243120{
    244     ASSERT(!isActiveInsertionPoint(node));
    245 
    246121    if (Node* next = traverseFirstChild(node, DontCrossShadowRoot))
    247122        return next;
     
    256131Node* previousInScope(const Node* node)
    257132{
    258     ASSERT(!isActiveInsertionPoint(node));
    259 
    260133    if (Node* current = traversePreviousSibling(node)) {
    261134        while (Node* child = traverseLastChild(current, DontCrossShadowRoot))
     
    268141Node* parentInScope(const Node* node)
    269142{
    270     ASSERT(!isActiveInsertionPoint(node));
    271 
    272143    return traverseParent(node, DontCrossShadowRoot);
    273144}
     
    275146Node* lastChildInScope(const Node* node)
    276147{
    277     ASSERT(!isActiveInsertionPoint(node));
    278 
    279148    return traverseLastChild(node, DontCrossShadowRoot);
    280149}
  • trunk/Source/WebCore/dom/ShadowRoot.h

    r190840 r190845  
    3838
    3939class AuthorStyleSheets;
    40 class ContentDistributor;
    4140class HTMLSlotElement;
    4241class SlotAssignment;
    4342
    44 class ShadowRoot : public DocumentFragment, public TreeScope {
     43class ShadowRoot final : public DocumentFragment, public TreeScope {
    4544public:
    4645    enum class Type : uint8_t {
     
    8685
    8786    virtual void removeAllEventListeners() override;
    88 
    89     virtual ContentDistributor* distributor() { return nullptr; }
    9087
    9188#if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r190613 r190845  
    5050#include "HTMLParserIdioms.h"
    5151#include "IdTargetObserver.h"
    52 #include "InsertionPoint.h"
    5352#include "KeyboardEvent.h"
    5453#include "Language.h"
  • trunk/Source/WebCore/html/HTMLSlotElement.cpp

    r190840 r190845  
    3131#include "ElementChildIterator.h"
    3232#include "HTMLNames.h"
     33#include "ShadowRoot.h"
    3334
    3435namespace WebCore {
  • trunk/Source/WebCore/html/HTMLSlotElement.h

    r190840 r190845  
    3030
    3131#include "HTMLElement.h"
    32 #include "InsertionPoint.h"
    3332#include "Range.h"
    3433
  • trunk/Source/WebCore/page/FocusController.cpp

    r189239 r190845  
    497497Element* FocusController::previousFocusableElement(FocusNavigationScope scope, Node* start, KeyboardEvent* event)
    498498{
    499     using namespace NodeRenderingTraversal;
    500 
    501499    Node* last = nullptr;
    502     for (Node* node = scope.rootNode(); node; node = lastChildInScope(node))
     500    for (Node* node = scope.rootNode(); node; node = NodeRenderingTraversal::lastChildInScope(node))
    503501        last = node;
    504502    ASSERT(last);
     
    509507    int startingTabIndex;
    510508    if (start) {
    511         startingNode = previousInScope(start);
     509        startingNode = NodeRenderingTraversal::previousInScope(start);
    512510        startingTabIndex = adjustedTabIndex(*start, *event);
    513511    } else {
     
    518516    // However, if a node is excluded from the normal tabbing cycle, the previous focusable node is determined by tree order
    519517    if (startingTabIndex < 0) {
    520         for (Node* node = startingNode; node; node = previousInScope(node)) {
     518        for (Node* node = startingNode; node; node = NodeRenderingTraversal::previousInScope(node)) {
    521519            if (!is<Element>(*node))
    522520                continue;
  • trunk/Source/WebCore/testing/Internals.cpp

    r190604 r190845  
    3838#include "ClientRect.h"
    3939#include "ClientRectList.h"
    40 #include "ContentDistributor.h"
    4140#include "Cursor.h"
    4241#include "DOMPath.h"
Note: See TracChangeset for help on using the changeset viewer.