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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 2420883002: Revert of 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 | « third_party/WebKit/Source/core/html/HTMLSlotElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
index 1b8b7bfef1748291b272b08414b4104872c304d9..2d4113e136e7c9ab5a5cdfb8ad5d75d4a3e4d083 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
@@ -72,8 +72,11 @@
return m_assignedNodes;
}
-void HTMLSlotElement::updateDistributedNodesManually() {
- DCHECK(!supportsDistribution());
+const HeapVector<Member<Node>>& HTMLSlotElement::getDistributedNodes() {
+ DCHECK(!needsDistributionRecalc());
+ if (isInShadowTree())
+ return m_distributedNodes;
+
// A slot is unlikely to be used outside of a shadow tree.
// We do not need to optimize this case in most cases.
// TODO(hayato): If this path causes a performance issue, we should move
@@ -93,12 +96,6 @@
child = NodeTraversal::nextSkippingChildren(*child, this);
}
}
-}
-
-const HeapVector<Member<Node>>& HTMLSlotElement::getDistributedNodes() {
- DCHECK(!needsDistributionRecalc());
- if (!supportsDistribution())
- updateDistributedNodesManually();
return m_distributedNodes;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSlotElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698