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

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.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
Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index 7b206b85564fac4b3a2bf3597e24adbb46a4c7bf..fcb6de27e613b5243ba2041aa1d09c6b658e5214 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -589,6 +589,11 @@ WebRange WebFrameWidgetImpl::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);
}
@@ -787,6 +792,10 @@ WebRange WebFrameWidgetImpl::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/core/editing/PlainTextRange.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698