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

Unified Diff: Source/core/editing/FrameSelection.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/editing/Editor.cpp ('k') | Source/core/editing/InsertParagraphSeparatorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index db85bea779f15aabc59e7e0ccaf72602d5ae948f..6a25cfe9bd8c20f7bd0ceb67909236deaba9c93a 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -1736,8 +1736,8 @@ static HTMLFormElement* scanForForm(Node* start)
{
if (!start)
return 0;
- Element* element = start->isElementNode() ? toElement(start) : ElementTraversal::next(start);
- for (; element; element = ElementTraversal::next(element)) {
+ Element* element = start->isElementNode() ? toElement(start) : ElementTraversal::next(*start);
+ for (; element; element = ElementTraversal::next(*element)) {
if (element->hasTagName(formTag))
return toHTMLFormElement(element);
if (element->isHTMLElement() && toHTMLElement(element)->isFormControlElement())
@@ -1810,7 +1810,7 @@ void FrameSelection::setSelectionFromNone()
Node* node = document->documentElement();
while (node && !node->hasTagName(bodyTag))
- node = NodeTraversal::next(node);
+ node = NodeTraversal::next(*node);
if (node)
setSelection(VisibleSelection(firstPositionInOrBeforeNode(node), DOWNSTREAM));
}
« no previous file with comments | « Source/core/editing/Editor.cpp ('k') | Source/core/editing/InsertParagraphSeparatorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698