| 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 05ce23eed63f5161958e044fa99fd3829756dc3c..cbb110238a4f2956af58bba27bef52de12c241ea 100644
|
| --- a/third_party/WebKit/Source/core/editing/Editor.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/Editor.cpp
|
| @@ -189,6 +189,10 @@ bool Editor::handleTextEvent(TextEvent* event)
|
| if (event->isDrop())
|
| return false;
|
|
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. See http://crbug.com/590369 for more details.
|
| + m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| if (event->isPaste()) {
|
| if (event->pastingFragment())
|
| replaceSelectionWithFragment(event->pastingFragment(), false, event->shouldSmartReplace(), event->shouldMatchStyle());
|
| @@ -530,7 +534,7 @@ bool Editor::canSmartReplaceWithPasteboard(Pasteboard* pasteboard)
|
|
|
| void Editor::replaceSelectionWithFragment(DocumentFragment* fragment, bool selectReplacement, bool smartReplace, bool matchStyle)
|
| {
|
| - frame().document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| + DCHECK(!frame().document()->needsLayoutTreeUpdate());
|
| if (frame().selection().isNone() || !frame().selection().isContentEditable() || !fragment)
|
| return;
|
|
|
|
|