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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2144673003: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in SearchBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sure the tests correctly flush the pipeline. 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
Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index a0980bf95495e200242827965456f8678fe99b32..6f78402dab4a45c11b3b3342961a5cdf9ffde25c 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -873,6 +873,10 @@ bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar
if (!isCurrentlyDisplayedInFrame())
return false;
+ // Up-to-date, clean tree is required for finding text in page, since it relies
+ // on TextIterator to look over the text.
+ frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
// FIXME (13016): Support searchInFrames and showDialog
FindOptions options = (backwards ? Backwards : 0) | (caseSensitive ? 0 : CaseInsensitive) | (wrap ? WrapAround : 0) | (wholeWord ? WholeWord | AtWordStarts : 0);
return frame()->editor().findString(string, options);

Powered by Google App Engine
This is Rietveld 408576698