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

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

Issue 2451093002: Get rid of EditCommand::setEndingSelection() taking one VisiblePosition (Closed)
Patch Set: 2016-10-26T16:39:39 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/InsertLineBreakCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
index 13782f40fcfa1eb2c2ba1cf223e353a4b55691a7..2f347a9ef57456ed078d5b46e21f91ae98bad185 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
@@ -229,8 +229,9 @@ void InsertLineBreakCommand::doApply(EditingState* editingState) {
// So, this next call sets the endingSelection() to a caret just after the
// line break that we inserted, or just before it if it's at the end of a
// block.
- document().updateStyleAndLayoutIgnorePendingStylesheets();
- setEndingSelection(endingSelection().visibleEnd());
+ setEndingSelection(SelectionInDOMTree::Builder()
+ .collapse(endingSelection().end())
+ .build());
}
rebalanceWhitespace();

Powered by Google App Engine
This is Rietveld 408576698