| 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);
|
|
|