| Index: Source/core/editing/InsertLineBreakCommand.cpp
|
| diff --git a/Source/core/editing/InsertLineBreakCommand.cpp b/Source/core/editing/InsertLineBreakCommand.cpp
|
| index 39facecc47f1d9b70f75adb8f7f20a943db3d6a8..2e4ecda2e2acce161aabc5595f64af351713b8a8 100644
|
| --- a/Source/core/editing/InsertLineBreakCommand.cpp
|
| +++ b/Source/core/editing/InsertLineBreakCommand.cpp
|
| @@ -124,7 +124,7 @@ void InsertLineBreakCommand::doApply()
|
|
|
| VisiblePosition endingPosition(positionBeforeNode(nodeToInsert));
|
| setEndingSelection(VisibleSelection(endingPosition, endingSelection().isDirectional()));
|
| - } else if (pos.deprecatedEditingOffset() <= caretMinOffset(pos.deprecatedNode().handle().raw())) {
|
| + } else if (pos.deprecatedEditingOffset() <= caretMinOffset(pos.deprecatedNode())) {
|
| insertNodeAt(nodeToInsert, pos);
|
|
|
| // Insert an extra br or '\n' if the just inserted one collapsed.
|
| @@ -134,7 +134,7 @@ void InsertLineBreakCommand::doApply()
|
| setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert), DOWNSTREAM, endingSelection().isDirectional()));
|
| // If we're inserting after all of the rendered text in a text node, or into a non-text node,
|
| // a simple insertion is sufficient.
|
| - } else if (pos.deprecatedEditingOffset() >= caretMaxOffset(pos.deprecatedNode().handle().raw()) || !pos.deprecatedNode()->isTextNode()) {
|
| + } else if (pos.deprecatedEditingOffset() >= caretMaxOffset(pos.deprecatedNode()) || !pos.deprecatedNode()->isTextNode()) {
|
| insertNodeAt(nodeToInsert, pos);
|
| setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert), DOWNSTREAM, endingSelection().isDirectional()));
|
| } else if (pos.deprecatedNode()->isTextNode()) {
|
| @@ -173,7 +173,7 @@ void InsertLineBreakCommand::doApply()
|
| // leaves and then comes back, new input will have the right style.
|
| // FIXME: We shouldn't always apply the typing style to the line break here,
|
| // see <rdar://problem/5794462>.
|
| - applyStyle(typingStyle.get(), firstPositionInOrBeforeNode(nodeToInsert.raw()), lastPositionInOrAfterNode(nodeToInsert.raw()));
|
| + applyStyle(typingStyle.get(), firstPositionInOrBeforeNode(nodeToInsert), lastPositionInOrAfterNode(nodeToInsert));
|
| // Even though this applyStyle operates on a Range, it still sets an endingSelection().
|
| // It tries to set a VisibleSelection around the content it operated on. So, that VisibleSelection
|
| // will either (a) select the line break we inserted, or it will (b) be a caret just
|
|
|