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

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.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/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 11f43c80d442f5c4538818d4ca912e626f0ac5f0..8c2d21feb0b7689b08d70bc88f8d6ef79560abcd 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -1814,8 +1814,10 @@ bool CompositeEditCommand::breakOutOfEmptyListItem(EditingState* editingState) {
document().updateStyleAndLayoutIgnorePendingStylesheets();
setEndingSelection(createVisibleSelection(
- Position::firstPositionInNode(newBlock), TextAffinity::Downstream,
- endingSelection().isDirectional()));
+ SelectionInDOMTree::Builder()
+ .collapse(Position::firstPositionInNode(newBlock))
+ .setIsDirectional(endingSelection().isDirectional())
+ .build()));
style->prepareToApplyAt(endingSelection().start());
if (!style->isEmpty()) {

Powered by Google App Engine
This is Rietveld 408576698