Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2414263002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in toNormalizedEphemeralRange (Closed)
Patch Set: fix nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp ('k') | third_party/WebKit/Source/web/WebSurroundingText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698