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

Unified Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 420193007: Use new Traversal<> API more in the code base (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take feedback into consideration Created 6 years, 5 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 | « Source/core/css/AffectedByFocusTest.cpp ('k') | Source/core/html/HTMLFieldSetElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/ShadowRoot.cpp
diff --git a/Source/core/dom/shadow/ShadowRoot.cpp b/Source/core/dom/shadow/ShadowRoot.cpp
index 49e4db35bb203dd1fd425241a72772a62f2da6a9..74ec90c20ca3258f10b964e65e8f0e7e5c973692 100644
--- a/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/Source/core/dom/shadow/ShadowRoot.cpp
@@ -316,10 +316,8 @@ const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >& ShadowRoot::descend
return emptyList;
WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> > insertionPoints;
- for (Element* element = ElementTraversal::firstWithin(*this); element; element = ElementTraversal::next(*element, this)) {
- if (element->isInsertionPoint())
- insertionPoints.append(toInsertionPoint(element));
- }
+ for (InsertionPoint* insertionPoint = Traversal<InsertionPoint>::firstWithin(*this); insertionPoint; insertionPoint = Traversal<InsertionPoint>::next(*insertionPoint, this))
+ insertionPoints.append(insertionPoint);
ensureShadowRootRareData()->setDescendantInsertionPoints(insertionPoints);
« no previous file with comments | « Source/core/css/AffectedByFocusTest.cpp ('k') | Source/core/html/HTMLFieldSetElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698