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. |