| 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 111f99f500c8fdbcfbccd4ebdf19219354c29551..680124d6f0e313ab8289ee1f8093904af88ee9fd 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| @@ -1872,26 +1872,22 @@ void ReplaceSelectionCommand::completeHTMLReplacement(
|
| m_startOfInsertedRange = start;
|
| m_endOfInsertedRange = end;
|
|
|
| - document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| -
|
| if (m_selectReplacement) {
|
| - setEndingSelection(createVisibleSelection(
|
| - SelectionInDOMTree::Builder()
|
| - .setBaseAndExtentDeprecated(start, end)
|
| - .setIsDirectional(endingSelection().isDirectional())
|
| - .build()));
|
| + setEndingSelection(SelectionInDOMTree::Builder()
|
| + .setBaseAndExtentDeprecated(start, end)
|
| + .setIsDirectional(endingSelection().isDirectional())
|
| + .build());
|
| return;
|
| }
|
|
|
| if (end.isNotNull()) {
|
| - setEndingSelection(createVisibleSelection(
|
| - SelectionInDOMTree::Builder()
|
| - .collapse(end)
|
| - .setIsDirectional(endingSelection().isDirectional())
|
| - .build()));
|
| + setEndingSelection(SelectionInDOMTree::Builder()
|
| + .collapse(end)
|
| + .setIsDirectional(endingSelection().isDirectional())
|
| + .build());
|
| return;
|
| }
|
| - setEndingSelection(createVisibleSelection(SelectionInDOMTree()));
|
| + setEndingSelection(SelectionInDOMTree());
|
| }
|
|
|
| void ReplaceSelectionCommand::mergeTextNodesAroundPosition(
|
| @@ -2099,14 +2095,11 @@ bool ReplaceSelectionCommand::performTrivialReplace(
|
| m_startOfInsertedRange = start;
|
| m_endOfInsertedRange = end;
|
|
|
| - document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| - VisibleSelection selectionAfterReplace = createVisibleSelection(
|
| + setEndingSelection(
|
| SelectionInDOMTree::Builder()
|
| .setBaseAndExtentDeprecated(m_selectReplacement ? start : end, end)
|
| .build());
|
|
|
| - setEndingSelection(selectionAfterReplace);
|
| -
|
| return true;
|
| }
|
|
|
|
|