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

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

Issue 2312663002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in PlainTextRange::create (Closed)
Patch Set: Created 4 years, 3 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index bf81588c350d8e218d6363af97f554643192f438..efa5980324928a22088153e8048b1bd9196feaed 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2407,6 +2407,11 @@ WebRange WebViewImpl::compositionRange()
Element* editable = focused->selection().rootEditableElementOrDocumentElement();
DCHECK(editable);
+
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ editable->document().updateStyleAndLayoutIgnorePendingStylesheets();
+
return PlainTextRange::create(*editable, range);
}
@@ -2722,6 +2727,10 @@ WebRange WebViewImpl::caretOrSelectionRange()
if (!focused)
return WebRange();
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ focused->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
return focused->inputMethodController().getSelectionOffsets();
}
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698