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

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

Issue 2705113003: Add clean layout DCHECK to mostBackwardCaretPosition() (Closed)
Patch Set: 2017-02-21T17:42:08 Created 3 years, 10 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/ApplyStyleCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
index e9feef51b6d4d01d24fbb0d82d2e782175275a74..678b2e70681236291d3e46700cf96a0ff9230495 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
@@ -1397,6 +1397,11 @@ void ApplyStyleCommand::removeInlineStyle(EditingStyle* style,
pushDownStart.computeOffsetInContainerNode() ==
pushDownStartContainer->maxCharacterOffset())
pushDownStart = nextVisuallyDistinctCandidate(pushDownStart);
+
+ // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
+
Position pushDownEnd = mostBackwardCaretPosition(end);
// If pushDownEnd is at the start of a text node, then this node is not fully
// selected. Move it to the previous deep equivalent position to avoid

Powered by Google App Engine
This is Rietveld 408576698