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

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

Issue 2442673002: Get rid of createVisibleSelection() taking one Position (Closed)
Patch Set: 2016-10-24T17:42:38 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/TypingCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
index 534f7b5c34170b3aa9ab0a11d95a38e015df6363..937bc729b0f3b8cb3b804d80ed4c8b629cc759cb 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
@@ -513,9 +513,11 @@ bool TypingCommand::makeEditableRootEmpty(EditingState* editingState) {
if (editingState->isAborted())
return false;
document().updateStyleAndLayoutIgnorePendingStylesheets();
- setEndingSelection(createVisibleSelection(Position::firstPositionInNode(root),
- TextAffinity::Downstream,
- endingSelection().isDirectional()));
+ setEndingSelection(createVisibleSelection(
+ SelectionInDOMTree::Builder()
+ .collapse(Position::firstPositionInNode(root))
+ .setIsDirectional(endingSelection().isDirectional())
+ .build()));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698