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

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

Issue 2415613003: Ensure clean layout for all (but deprecated) functions creating VisiblePositions (Closed)
Patch Set: 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 d51cc9fd89130dbbc415afc66306891d0b060a18..9b16ad8b03461d9d3aa4b3a398bacf613c3a16ce 100644
--- a/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
@@ -361,6 +361,7 @@ bool InsertListCommand::doApplyForSingleParagraph(
if (editingState->isAborted())
return false;
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
Node* firstChildInList =
enclosingListChild(VisiblePosition::firstPositionInNode(listElement)
.deepEquivalent()
@@ -401,6 +402,7 @@ bool InsertListCommand::doApplyForSingleParagraph(
currentSelection.setEnd(newList, Position::lastOffsetInNode(newList),
IGNORE_EXCEPTION);
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
setEndingSelection(VisiblePosition::firstPositionInNode(newList));
return true;

Powered by Google App Engine
This is Rietveld 408576698