| Index: Source/core/editing/commands/InsertLineBreakCommand.cpp
|
| diff --git a/Source/core/editing/commands/InsertLineBreakCommand.cpp b/Source/core/editing/commands/InsertLineBreakCommand.cpp
|
| index 1b0e53bb57e1729d33aa670ce9107404f45e6c30..350f0e7c961e2d988b528f3d6632ea70b7998a63 100644
|
| --- a/Source/core/editing/commands/InsertLineBreakCommand.cpp
|
| +++ b/Source/core/editing/commands/InsertLineBreakCommand.cpp
|
| @@ -99,13 +99,13 @@ void InsertLineBreakCommand::doApply()
|
| if (needExtraLineBreak)
|
| insertNodeBefore(nodeToInsert->cloneNode(false), nodeToInsert);
|
|
|
| - VisiblePosition endingPosition(positionBeforeNode(nodeToInsert.get()));
|
| + VisiblePosition endingPosition = createVisiblePosition(positionBeforeNode(nodeToInsert.get()));
|
| setEndingSelection(VisibleSelection(endingPosition, endingSelection().isDirectional()));
|
| } else if (pos.computeEditingOffset() <= caretMinOffset(pos.anchorNode())) {
|
| insertNodeAt(nodeToInsert.get(), pos);
|
|
|
| // Insert an extra br or '\n' if the just inserted one collapsed.
|
| - if (!isStartOfParagraph(VisiblePosition(positionBeforeNode(nodeToInsert.get()))))
|
| + if (!isStartOfParagraph(createVisiblePosition(positionBeforeNode(nodeToInsert.get()))))
|
| insertNodeBefore(nodeToInsert->cloneNode(false).get(), nodeToInsert.get());
|
|
|
| setEndingSelection(VisibleSelection(positionInParentAfterNode(*nodeToInsert), TextAffinity::Downstream, endingSelection().isDirectional()));
|
|
|