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

Unified Diff: Source/core/editing/VisibleUnits.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/TextIterator.cpp ('k') | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleUnits.cpp
diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp
index 4361a1463e58e956a5f336c4d54ead3f111cdb45..bf56ec32febdea752ea2364f95c4c4246a0b80a4 100644
--- a/Source/core/editing/VisibleUnits.cpp
+++ b/Source/core/editing/VisibleUnits.cpp
@@ -1191,19 +1191,19 @@ VisiblePosition endOfParagraph(const VisiblePosition &c, EditingBoundaryCrossing
break;
if (boundaryCrossingRule == CanSkipOverEditingBoundary) {
while (n && n->rendererIsEditable() != startNode->rendererIsEditable())
- n = NodeTraversal::next(n, stayInsideBlock);
+ n = NodeTraversal::next(*n, stayInsideBlock);
if (!n || !n->isDescendantOf(highestRoot))
break;
}
RenderObject* r = n->renderer();
if (!r) {
- n = NodeTraversal::next(n, stayInsideBlock);
+ n = NodeTraversal::next(*n, stayInsideBlock);
continue;
}
RenderStyle* style = r->style();
if (style->visibility() != VISIBLE) {
- n = NodeTraversal::next(n, stayInsideBlock);
+ n = NodeTraversal::next(*n, stayInsideBlock);
continue;
}
@@ -1225,13 +1225,14 @@ VisiblePosition endOfParagraph(const VisiblePosition &c, EditingBoundaryCrossing
}
node = n;
offset = r->caretMaxOffset();
- n = NodeTraversal::next(n, stayInsideBlock);
+ n = NodeTraversal::next(*n, stayInsideBlock);
} else if (editingIgnoresContent(n) || isRenderedTable(n)) {
node = n;
type = Position::PositionIsAfterAnchor;
n = NodeTraversal::nextSkippingChildren(n, stayInsideBlock);
- } else
- n = NodeTraversal::next(n, stayInsideBlock);
+ } else {
+ n = NodeTraversal::next(*n, stayInsideBlock);
+ }
}
if (type == Position::PositionIsOffsetInAnchor)
« no previous file with comments | « Source/core/editing/TextIterator.cpp ('k') | Source/core/editing/htmlediting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698