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

Unified Diff: third_party/WebKit/Source/core/editing/commands/EditorCommand.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/editing/commands/EditorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
index 5c5f415d3187d909368a021d2ec52ab3580b5816..cc532e2b9fa07e364b9d039e0fe1fef50ef6be0b 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -518,6 +518,10 @@ static bool executeDeleteWordForward(LocalFrame& frame, Event*, EditorCommandSou
static bool executeFindString(LocalFrame& frame, Event*, EditorCommandSource, const String& value)
{
+ DCHECK(frame.document());
+ // 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();
return frame.editor().findString(value, CaseInsensitive | WrapAround);
}

Powered by Google App Engine
This is Rietveld 408576698