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

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

Issue 2272793002: Make WebViewImpl::textInputInfo update layout before working on ranges. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually working test added. Created 4 years, 4 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/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 6d49474a82eded6aa0de7bbb54d9341e27a2f48f..1f0ec3d661fd917cad7c9d9fb1f032109dcdabaa 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2438,6 +2438,12 @@ WebTextInputInfo WebViewImpl::textInputInfo()
if (!focused->editor().canEdit())
return info;
+ // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
+ // see http://crbug.com/590369 for more details.
+ focused->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
+ DocumentLifecycle::DisallowTransitionScope(focused->document()->lifecycle());
+
// Emits an object replacement character for each replaced element so that
// it is exposed to IME and thus could be deleted by IME on android.
info.value = plainText(EphemeralRange::rangeOfContents(*element), TextIteratorEmitsObjectReplacementCharacter);

Powered by Google App Engine
This is Rietveld 408576698