| Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| index 6c61399702937550d546461f5c9bfd3fce95a2d2..6e464c6aecf66892e4f2d2f857ff24075f0c9f93 100644
|
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| @@ -1111,6 +1111,11 @@ void WebLocalFrameImpl::replaceMisspelledRange(const WebString& text) {
|
| // does.
|
| if (pluginContainerFromFrame(frame()))
|
| return;
|
| +
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. see http://crbug.com/590369 for more details.
|
| + frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| frame()->spellChecker().replaceMisspelledRange(text);
|
| }
|
|
|
| @@ -1128,6 +1133,10 @@ bool WebLocalFrameImpl::hasSelection() const {
|
| }
|
|
|
| WebRange WebLocalFrameImpl::selectionRange() const {
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. See http://crbug.com/590369 for more details.
|
| + frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| return frame()->selection().selection().toNormalizedEphemeralRange();
|
| }
|
|
|
| @@ -1154,6 +1163,11 @@ WebString WebLocalFrameImpl::selectionAsMarkup() const {
|
| if (pluginContainer)
|
| return pluginContainer->plugin()->selectionAsMarkup();
|
|
|
| + // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
|
| + // needs to be audited. See http://crbug.com/590369 for more details.
|
| + // Selection normalization and markup generation require clean layout.
|
| + frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +
|
| return frame()->selection().selectedHTMLForClipboard();
|
| }
|
|
|
|
|