Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1662)

Unified Diff: third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp

Issue 2323953003: Clarify a role of Shadow DOM related functions (Closed)
Patch Set: rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp b/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp
index 06b2b29cee3bbf52179c973a42b3182b1a85eba4..c22fad96d410e10c16d3d5b5befbdef31fae3a86 100644
--- a/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp
@@ -103,7 +103,7 @@ Node* FlatTreeTraversal::traverseSiblings(const Node& node, TraversalDirection d
if (node.isChildOfV1ShadowHost())
return traverseSiblingsForV1HostChild(node, direction);
- if (shadowWhereNodeCanBeDistributed(node))
+ if (shadowWhereNodeCanBeDistributedForV0(node))
return traverseSiblingsForV0Distribution(node, direction);
if (Node* found = resolveDistributionStartingAt(direction == TraversalDirectionForward ? node.nextSibling() : node.previousSibling(), direction))
@@ -169,18 +169,18 @@ ContainerNode* FlatTreeTraversal::traverseParent(const Node& node, ParentTravers
if (canBeDistributedToInsertionPoint(node))
return traverseParentForV0(node, details);
- DCHECK(!shadowWhereNodeCanBeDistributed(node));
+ DCHECK(!shadowWhereNodeCanBeDistributedForV0(node));
return traverseParentOrHost(node);
}
ContainerNode* FlatTreeTraversal::traverseParentForV0(const Node& node, ParentTraversalDetails* details)
{
- if (shadowWhereNodeCanBeDistributed(node)) {
+ if (shadowWhereNodeCanBeDistributedForV0(node)) {
if (const InsertionPoint* insertionPoint = resolveReprojection(&node)) {
if (details)
details->didTraverseInsertionPoint(insertionPoint);
// The node is distributed. But the distribution was stopped at this insertion point.
- if (shadowWhereNodeCanBeDistributed(*insertionPoint))
+ if (shadowWhereNodeCanBeDistributedForV0(*insertionPoint))
return nullptr;
return traverseParent(*insertionPoint);
}

Powered by Google App Engine
This is Rietveld 408576698