| 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 a2982225f5a44cdfe7bfe5dddffd14aa687f5f2c..a52e97a07198745f62b5d2d781f7c613e723cdf8 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
|
| @@ -302,6 +302,11 @@ void ApplyStyleCommand::applyBlockStyle(EditingStyle *style, EditingState* editi
|
| nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStart));
|
| }
|
|
|
| + // Update style and layout again, since added or removed styles could have
|
| + // affected the layout. We need clean layout in order to compute
|
| + // plain-text ranges below.
|
| + document().updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| EphemeralRange startEphemeralRange = PlainTextRange(startIndex).createRangeForSelection(toContainerNode(scope));
|
| if (startEphemeralRange.isNull())
|
| return;
|
|
|