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 65611647e36dbe5c7407d91728e52c9fc1fce5cb..48b8ce904a3fb5e1dd84b27e37b48154ddf4f097 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp |
@@ -1861,7 +1861,10 @@ void ReplaceSelectionCommand::completeHTMLReplacement( |
if (m_selectReplacement) { |
setEndingSelection(createVisibleSelection( |
- start, end, SelDefaultAffinity, endingSelection().isDirectional())); |
+ SelectionInDOMTree::Builder() |
+ .setBaseAndExtentDeprecated(start, end) |
+ .setIsDirectional(endingSelection().isDirectional()) |
+ .build())); |
return; |
} |
@@ -2082,8 +2085,10 @@ bool ReplaceSelectionCommand::performTrivialReplace( |
m_endOfInsertedRange = end; |
document().updateStyleAndLayoutIgnorePendingStylesheets(); |
- VisibleSelection selectionAfterReplace = |
- createVisibleSelection(m_selectReplacement ? start : end, end); |
+ VisibleSelection selectionAfterReplace = createVisibleSelection( |
+ SelectionInDOMTree::Builder() |
+ .setBaseAndExtentDeprecated(m_selectReplacement ? start : end, end) |
+ .build()); |
setEndingSelection(selectionAfterReplace); |