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

Unified Diff: third_party/WebKit/Source/web/WebSurroundingText.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
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebSurroundingText.cpp
diff --git a/third_party/WebKit/Source/web/WebSurroundingText.cpp b/third_party/WebKit/Source/web/WebSurroundingText.cpp
index 88bed86241ed9209227c8692606ccbff2e99ec67..c2399fa04ad33624a126a5026ec6adbaad98fa94 100644
--- a/third_party/WebKit/Source/web/WebSurroundingText.cpp
+++ b/third_party/WebKit/Source/web/WebSurroundingText.cpp
@@ -69,6 +69,11 @@ void WebSurroundingText::initialize(const WebNode& webNode,
void WebSurroundingText::initializeFromCurrentSelection(WebLocalFrame* frame,
size_t maxLength) {
LocalFrame* webFrame = toWebLocalFrameImpl(frame)->frame();
+
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ webFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
if (Range* range = createRange(
webFrame->selection().selection().toNormalizedEphemeralRange()))
m_private.reset(new SurroundingText(*range, maxLength));
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698