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

Unified Diff: Source/core/html/HTMLTextFormControlElement.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/HTMLOptionElement.cpp ('k') | Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTextFormControlElement.cpp
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index 10c589e13c5efbb1626aaf74bc0ace4995905092..7f2ecff02672a19fd4f4ef962521ec1a0d0c57fc 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -445,7 +445,7 @@ PassRefPtr<Range> HTMLTextFormControlElement::selection() const
int offset = 0;
Node* startNode = 0;
Node* endNode = 0;
- for (Node* node = innerText->firstChild(); node; node = NodeTraversal::next(node, innerText)) {
+ for (Node* node = innerText->firstChild(); node; node = NodeTraversal::next(*node, innerText)) {
ASSERT(!node->firstChild());
ASSERT(node->isTextNode() || node->hasTagName(brTag));
int length = node->isTextNode() ? lastOffsetInNode(node) : 1;
@@ -538,7 +538,7 @@ String HTMLTextFormControlElement::innerTextValue() const
return emptyString();
StringBuilder result;
- for (Node* node = innerText; node; node = NodeTraversal::next(node, innerText)) {
+ for (Node* node = innerText; node; node = NodeTraversal::next(*node, innerText)) {
if (node->hasTagName(brTag))
result.append(newlineCharacter);
else if (node->isTextNode())
@@ -585,7 +585,7 @@ String HTMLTextFormControlElement::valueWithHardLineBreaks() const
getNextSoftBreak(line, breakNode, breakOffset);
StringBuilder result;
- for (Node* node = innerText->firstChild(); node; node = NodeTraversal::next(node, innerText)) {
+ for (Node* node = innerText->firstChild(); node; node = NodeTraversal::next(*node, innerText)) {
if (node->hasTagName(brTag))
result.append(newlineCharacter);
else if (node->isTextNode()) {
« no previous file with comments | « Source/core/html/HTMLOptionElement.cpp ('k') | Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698