| 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 f766178768616d43e898a6ba39e676d5f6801429..11c0cfc183155f65c5906955e0139497960b01a9 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();
|
| }
|
|
|
|
|