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

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

Issue 2426523002: Audit use of updateStyleAndLayoutIgnorePendingStylesheets in EditingStyle::styleAtSelectionStart (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/EditorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
index ff85ce3bc51b913dff926f9520c5a6386fe128e4..5bf5641f217797943aec1684d08f14b31c42d26e 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -431,6 +431,7 @@ static TriState selectionListState(const FrameSelection& selection,
static TriState stateStyle(LocalFrame& frame,
CSSPropertyID propertyID,
const char* desiredValue) {
+ frame.document()->updateStyleAndLayoutIgnorePendingStylesheets();
if (frame.editor().behavior().shouldToggleStyleBasedOnStartOfSelection())
return frame.editor().selectionStartHasStyle(propertyID, desiredValue)
? TrueTriState
@@ -439,6 +440,8 @@ static TriState stateStyle(LocalFrame& frame,
}
static String valueStyle(LocalFrame& frame, CSSPropertyID propertyID) {
+ frame.document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
// FIXME: Rather than retrieving the style at the start of the current
// selection, we should retrieve the style present throughout the selection
// for non-Mac platforms.
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingStyle.cpp ('k') | third_party/WebKit/Source/web/ContextMenuClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698