Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Unified Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp

Issue 2451613003: Get rid of createVisibleSelection() taking two Position (Closed)
Patch Set: 2016-10-26T15:09:55 Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698