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

Unified Diff: Source/core/editing/VisibleUnits.cpp

Issue 69003004: Have NodeTraversal::previous*() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/ReplaceSelectionCommand.cpp ('k') | Source/core/html/HTMLCollection.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 bf56ec32febdea752ea2364f95c4c4246a0b80a4..8219e4fc2fa5f7346eef37d0f812ccf06edc0f9d 100644
--- a/Source/core/editing/VisibleUnits.cpp
+++ b/Source/core/editing/VisibleUnits.cpp
@@ -1115,18 +1115,18 @@ VisiblePosition startOfParagraph(const VisiblePosition& c, EditingBoundaryCrossi
break;
if (boundaryCrossingRule == CanSkipOverEditingBoundary) {
while (n && n->rendererIsEditable() != startNode->rendererIsEditable())
- n = NodeTraversal::previousPostOrder(n, startBlock);
+ n = NodeTraversal::previousPostOrder(*n, startBlock);
if (!n || !n->isDescendantOf(highestRoot))
break;
}
RenderObject* r = n->renderer();
if (!r) {
- n = NodeTraversal::previousPostOrder(n, startBlock);
+ n = NodeTraversal::previousPostOrder(*n, startBlock);
continue;
}
RenderStyle* style = r->style();
if (style->visibility() != VISIBLE) {
- n = NodeTraversal::previousPostOrder(n, startBlock);
+ n = NodeTraversal::previousPostOrder(*n, startBlock);
continue;
}
@@ -1149,13 +1149,14 @@ VisiblePosition startOfParagraph(const VisiblePosition& c, EditingBoundaryCrossi
}
node = n;
offset = 0;
- n = NodeTraversal::previousPostOrder(n, startBlock);
+ n = NodeTraversal::previousPostOrder(*n, startBlock);
} else if (editingIgnoresContent(n) || isRenderedTable(n)) {
node = n;
type = Position::PositionIsBeforeAnchor;
- n = n->previousSibling() ? n->previousSibling() : NodeTraversal::previousPostOrder(n, startBlock);
- } else
- n = NodeTraversal::previousPostOrder(n, startBlock);
+ n = n->previousSibling() ? n->previousSibling() : NodeTraversal::previousPostOrder(*n, startBlock);
+ } else {
+ n = NodeTraversal::previousPostOrder(*n, startBlock);
+ }
}
if (type == Position::PositionIsOffsetInAnchor) {
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/html/HTMLCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698