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

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: Feedback addressed. 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/iterators/SearchBuffer.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/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 4de8fdfe02df84ea7e30dec0b42d212158c8746c..fb62e50657718f5e44de270e0613d16c0c2f8421 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -566,6 +566,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);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/iterators/SearchBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698