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

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

Issue 2450213002: Utilize EditCommand::setEndingSelection() taking SelectionInDOMTree (Closed)
Patch Set: 2016-10-28T14:44:14 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/InsertListCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
index d40ee973811632974e06d3b6aef33227e8c20961..8fc2bade0deba66a61dd33b00993fe7cd0b7777b 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
@@ -162,7 +162,7 @@ void InsertListCommand::doApply(EditingState* editingState) {
builder.collapse(visibleStart.toPositionWithAffinity());
if (newEnd.isNotNull())
builder.extend(newEnd.deepEquivalent());
- setEndingSelection(createVisibleSelection(builder.build()));
+ setEndingSelection(builder.build());
if (!endingSelection().rootEditableElement())
return;
}
@@ -286,14 +286,13 @@ void InsertListCommand::doApply(EditingState* editingState) {
visibleStartOfSelection = createVisiblePosition(startOfSelection);
}
- setEndingSelection(createVisibleSelection(
- SelectionInDOMTree::Builder()
- .setAffinity(visibleStartOfSelection.affinity())
- .setBaseAndExtentDeprecated(
- visibleStartOfSelection.deepEquivalent(),
- visibleEndOfSelection.deepEquivalent())
- .setIsDirectional(endingSelection().isDirectional())
- .build()));
+ setEndingSelection(SelectionInDOMTree::Builder()
+ .setAffinity(visibleStartOfSelection.affinity())
+ .setBaseAndExtentDeprecated(
+ visibleStartOfSelection.deepEquivalent(),
+ visibleEndOfSelection.deepEquivalent())
+ .setIsDirectional(endingSelection().isDirectional())
+ .build());
return;
}

Powered by Google App Engine
This is Rietveld 408576698