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

Unified Diff: Source/core/html/HTMLNameCollection.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/html/HTMLMapElement.cpp ('k') | Source/core/html/HTMLObjectElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLNameCollection.cpp
diff --git a/Source/core/html/HTMLNameCollection.cpp b/Source/core/html/HTMLNameCollection.cpp
index 0706e81cb23f32197478caca3cfe5b1fb0b5f20b..47e30ed892adb4f0f1308be47c59904e1f54093c 100644
--- a/Source/core/html/HTMLNameCollection.cpp
+++ b/Source/core/html/HTMLNameCollection.cpp
@@ -56,9 +56,9 @@ Element* HTMLNameCollection::virtualItemAfter(unsigned& offsetInArray, Element*
if (!previous)
current = ElementTraversal::firstWithin(ownerNode());
else
- current = ElementTraversal::next(previous, ownerNode());
+ current = ElementTraversal::next(*previous, ownerNode());
- for (; current; current = ElementTraversal::next(current, ownerNode())) {
+ for (; current; current = ElementTraversal::next(*current, ownerNode())) {
switch (type()) {
case WindowNamedItems:
// find only images, forms, applets, embeds and objects by name,
« no previous file with comments | « Source/core/html/HTMLMapElement.cpp ('k') | Source/core/html/HTMLObjectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698