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

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

Issue 189773005: Revert of Have Position deal with more references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/TypingCommand.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 7dc95ec921989c78bba3f66c541e64febe44f5d9..3bb504b37d1c700ba946e03f56270d9fb3e8a2bd 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -470,12 +470,12 @@
if (Node* ancestor = treeScope.ancestorInThisScope(currentPosition.containerNode())) {
if (ancestor->contains(startContainerNode))
- return positionAfterNode(*ancestor);
- return positionBeforeNode(*ancestor);
+ return positionAfterNode(ancestor);
+ return positionBeforeNode(ancestor);
}
if (Node* lastChild = treeScope.rootNode().lastChild())
- return positionAfterNode(*lastChild);
+ return positionAfterNode(lastChild);
return Position();
}
@@ -488,12 +488,12 @@
if (Node* ancestor = treeScope.ancestorInThisScope(currentPosition.containerNode())) {
if (ancestor->contains(endContainerNode))
- return positionBeforeNode(*ancestor);
- return positionAfterNode(*ancestor);
+ return positionBeforeNode(ancestor);
+ return positionAfterNode(ancestor);
}
if (Node* firstChild = treeScope.rootNode().firstChild())
- return positionBeforeNode(*firstChild);
+ return positionBeforeNode(firstChild);
return Position();
}
@@ -567,13 +567,13 @@
Position p = previousVisuallyDistinctCandidate(m_end);
Node* shadowAncestor = endRoot ? endRoot->shadowHost() : 0;
if (p.isNull() && shadowAncestor)
- p = positionAfterNode(*shadowAncestor);
+ p = positionAfterNode(shadowAncestor);
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);
if (p.isNull() && shadowAncestor)
- p = positionAfterNode(*shadowAncestor);
+ p = positionAfterNode(shadowAncestor);
}
VisiblePosition previous(p);
@@ -596,13 +596,13 @@
Position p = nextVisuallyDistinctCandidate(m_start);
Node* shadowAncestor = startRoot ? startRoot->shadowHost() : 0;
if (p.isNull() && shadowAncestor)
- p = positionBeforeNode(*shadowAncestor);
+ p = positionBeforeNode(shadowAncestor);
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);
if (p.isNull() && shadowAncestor)
- p = positionBeforeNode(*shadowAncestor);
+ p = positionBeforeNode(shadowAncestor);
}
VisiblePosition next(p);
« no previous file with comments | « Source/core/editing/TypingCommand.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698