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

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

Issue 182383012: Have positionInParentBeforeNode() / positionInParentAfterNode() take a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months 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/editing/VisibleUnits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleSelection.cpp
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
index c5fcdab9711d32802673bddf3b54b903e8161e15..3bb504b37d1c700ba946e03f56270d9fb3e8a2bd 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -571,7 +571,7 @@ void VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries()
while (p.isNotNull() && !(lowestEditableAncestor(p.containerNode()) == baseEditableAncestor && !isEditablePosition(p))) {
Node* root = editableRootForPosition(p);
shadowAncestor = root ? root->shadowHost() : 0;
- p = isAtomicNode(p.containerNode()) ? positionInParentBeforeNode(p.containerNode()) : previousVisuallyDistinctCandidate(p);
+ p = isAtomicNode(p.containerNode()) ? positionInParentBeforeNode(*p.containerNode()) : previousVisuallyDistinctCandidate(p);
if (p.isNull() && shadowAncestor)
p = positionAfterNode(shadowAncestor);
}
@@ -600,7 +600,7 @@ void VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries()
while (p.isNotNull() && !(lowestEditableAncestor(p.containerNode()) == baseEditableAncestor && !isEditablePosition(p))) {
Node* root = editableRootForPosition(p);
shadowAncestor = root ? root->shadowHost() : 0;
- p = isAtomicNode(p.containerNode()) ? positionInParentAfterNode(p.containerNode()) : nextVisuallyDistinctCandidate(p);
+ p = isAtomicNode(p.containerNode()) ? positionInParentAfterNode(*p.containerNode()) : nextVisuallyDistinctCandidate(p);
if (p.isNull() && shadowAncestor)
p = positionBeforeNode(shadowAncestor);
}
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698