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

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

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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/dom/VisitedLinkState.cpp ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/ElementShadow.cpp
diff --git a/Source/core/dom/shadow/ElementShadow.cpp b/Source/core/dom/shadow/ElementShadow.cpp
index 82d678c183e5655a29a8dcb22bcb27266043ac21..97bdec59e5d63c8c7f168a4d6ffa00463d6c03a0 100644
--- a/Source/core/dom/shadow/ElementShadow.cpp
+++ b/Source/core/dom/shadow/ElementShadow.cpp
@@ -203,7 +203,7 @@ void ElementShadow::detach(const Node::AttachContext& context)
void ElementShadow::removeAllEventListeners()
{
for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) {
- for (Node* node = root; node; node = NodeTraversal::next(node))
+ for (Node* node = root; node; node = NodeTraversal::next(*node))
node->removeAllEventListeners();
}
}
@@ -341,7 +341,7 @@ void ElementShadow::collectSelectFeatureSetFrom(ShadowRoot* root)
if (!root->containsShadowRoots() && !root->containsContentElements())
return;
- for (Element* element = ElementTraversal::firstWithin(root); element; element = ElementTraversal::next(element, root)) {
+ for (Element* element = ElementTraversal::firstWithin(root); element; element = ElementTraversal::next(*element, root)) {
if (ElementShadow* shadow = element->shadow())
m_selectFeatures.add(shadow->ensureSelectFeatureSet());
if (!isHTMLContentElement(element))
« no previous file with comments | « Source/core/dom/VisitedLinkState.cpp ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698