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

Unified Diff: Source/core/editing/ReplaceSelectionCommand.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/InsertParagraphSeparatorCommand.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
index a68b370d1ceb07d8fcced6821371e3f0b2195a6b..23e66bfd150b895a898f5757a602c9e8aee1ce8a 100644
--- a/Source/core/editing/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp
@@ -821,7 +821,7 @@
if (endOfParagraph(startOfParagraphToMove) == destination) {
RefPtr<Node> placeholder = createBreakElement(document());
insertNodeBefore(placeholder, startOfParagraphToMove.deepEquivalent().deprecatedNode());
- destination = VisiblePosition(positionBeforeNode(*placeholder));
+ destination = VisiblePosition(positionBeforeNode(placeholder.get()));
}
moveParagraph(startOfParagraphToMove, endOfParagraph(startOfParagraphToMove), destination);
@@ -990,7 +990,7 @@
Node* endBR = insertionPos.downstream().deprecatedNode()->hasTagName(brTag) ? insertionPos.downstream().deprecatedNode() : 0;
VisiblePosition originalVisPosBeforeEndBR;
if (endBR)
- originalVisPosBeforeEndBR = VisiblePosition(positionBeforeNode(*endBR), DOWNSTREAM).previous();
+ originalVisPosBeforeEndBR = VisiblePosition(positionBeforeNode(endBR), DOWNSTREAM).previous();
RefPtr<Node> insertionBlock = enclosingBlock(insertionPos.deprecatedNode());
@@ -1233,7 +1233,7 @@
if (!endBR || !endBR->inDocument())
return false;
- VisiblePosition visiblePos(positionBeforeNode(*endBR));
+ VisiblePosition visiblePos(positionBeforeNode(endBR));
// Don't remove the br if nothing was inserted.
if (visiblePos.previous() == originalVisPosBeforeEndBR)
@@ -1490,7 +1490,7 @@
return false;
if (nodeAfterInsertionPos && nodeAfterInsertionPos->parentNode() && nodeAfterInsertionPos->hasTagName(brTag)
- && shouldRemoveEndBR(nodeAfterInsertionPos.get(), VisiblePosition(positionBeforeNode(*nodeAfterInsertionPos))))
+ && shouldRemoveEndBR(nodeAfterInsertionPos.get(), VisiblePosition(positionBeforeNode(nodeAfterInsertionPos.get()))))
removeNodeAndPruneAncestors(nodeAfterInsertionPos.get());
VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, end);
« no previous file with comments | « Source/core/editing/InsertParagraphSeparatorCommand.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698