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

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodController.cpp

Issue 2003793002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in PlainTextRange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated some comments. Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/core/editing/PlainTextRange.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/InputMethodController.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
index 0bd3b86d91b2380d6a7380e89bc63feae01cc7e0..695b8c39c3ccded865a45f80ca40583871c2c870 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -399,6 +399,10 @@ void InputMethodController::setComposition(const String& text, const Vector<Comp
if (!rootEditableElement)
return;
+ // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
+ // see http://crbug.com/590369 for more details.
+ rootEditableElement->document().updateStyleAndLayoutIgnorePendingStylesheets();
+
// In case of exceeding the right boundary.
// If both |value1| and |value2| exceed right boundary,
// PlainTextRange(value1, value2)::createRange() will return a default
@@ -436,6 +440,10 @@ void InputMethodController::setCompositionFromExistingText(const Vector<Composit
if (!editable)
return;
+ // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
+ // see http://crbug.com/590369 for more details.
+ editable->document().updateStyleAndLayoutIgnorePendingStylesheets();
+
const EphemeralRange range = PlainTextRange(compositionStart, compositionEnd).createRange(*editable);
if (range.isNull())
return;
@@ -501,6 +509,10 @@ bool InputMethodController::setSelectionOffsets(const PlainTextRange& selectionO
if (!rootEditableElement)
return false;
+ // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
+ // see http://crbug.com/590369 for more details.
+ rootEditableElement->document().updateStyleAndLayoutIgnorePendingStylesheets();
+
const EphemeralRange range = selectionOffsets.createRange(*rootEditableElement);
if (range.isNull())
return false;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/PlainTextRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698