| Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| index 8f2fb52bf0fd11af80d6d974f40bde7d5c1c0429..c50460eeecbdd8e3d5e63491ab17179806615116 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| @@ -1642,7 +1642,7 @@ void ReplaceSelectionCommand::AddSpacesForSmartReplace(
|
| VisiblePosition end_of_inserted_content = PositionAtEndOfInsertedContent();
|
| Position end_upstream =
|
| MostBackwardCaretPosition(end_of_inserted_content.DeepEquivalent());
|
| - Node* end_node = end_upstream.ComputeNodeBeforePosition();
|
| + Node* end_node = const_cast<Node*>(end_upstream.ComputeNodeBeforePosition());
|
| int end_offset =
|
| end_node && end_node->IsTextNode() ? ToText(end_node)->length() : 0;
|
| if (end_upstream.IsOffsetInAnchor()) {
|
| @@ -1785,7 +1785,7 @@ void ReplaceSelectionCommand::MergeTextNodesAroundPosition(
|
| position.ComputeContainerNode()->IsTextNode()) {
|
| text = ToText(position.ComputeContainerNode());
|
| } else {
|
| - Node* before = position.ComputeNodeBeforePosition();
|
| + Node* before = const_cast<Node*>(position.ComputeNodeBeforePosition());
|
| if (before && before->IsTextNode()) {
|
| text = ToText(before);
|
| } else {
|
|
|