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

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

Issue 2416833002: Fix FlatTreeTraversal for a slot in a document tree (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversalTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 de750fbb3a57b4ec1a9ca5ee39176e8f98de7165..7c81459e95f3ffcdedf39a13f42b66b0f4c1f5f8 100644
--- a/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp
@@ -68,6 +68,10 @@ Node* FlatTreeTraversal::resolveDistributionStartingAt(
: sibling->previousSibling())) {
if (isHTMLSlotElement(*sibling)) {
const HTMLSlotElement& slot = toHTMLSlotElement(*sibling);
+ if (slot.isInDocumentTree()) {
+ const_cast<HTMLSlotElement&>(slot)
yosin_UTC9 2016/10/14 01:44:40 Can we integrate collecting distributed nodes into
hayato 2016/10/14 03:05:35 Yeah, that is one of TODO items. That could not be
+ .updateDistributedNodesInDocumentTree();
yosin_UTC9 2016/10/14 01:44:40 It is better that using |collectDistributionNodesI
hayato 2016/10/14 03:05:35 I think using *update* is consistent within this f
+ }
if (Node* found = (direction == TraversalDirectionForward
? slot.firstDistributedNode()
: slot.lastDistributedNode()))
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversalTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698