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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2626933002: Make Editor::appliedEditing update layout before changing selection (Closed)
Patch Set: Rebased Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 84b695cd5b9df1ebf064cbaf24bb9204e4380142..df9b6b2c8d2c381b0398a16ccea23fd72380f3b3 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -858,6 +858,14 @@ void Editor::appliedEditing(CompositeEditCommand* cmd) {
composition->startingRootEditableElement(),
composition->endingRootEditableElement(), cmd->inputType(),
cmd->textDataForInputEvent(), isComposingFromCommand(cmd));
+
+ // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ // The clean layout is consumed by |mostBackwardCaretPosition|, called through
+ // |changeSelectionAfterCommand|. In the long term, we should postpone visible
+ // selection canonicalization so that selection update does not need layout.
+ frame().document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
VisibleSelection newSelection(cmd->endingSelection());
// Don't clear the typing style with this selection change. We do those things
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698