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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2122263004: Don't report single find match after all matches have already been reported. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index db7242bce67a9b0995cde3fe8a29c56a4d2fa453..c2250893db7c04d4ba30d52ece355b576c86f17c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5196,8 +5196,10 @@ void RenderFrameImpl::OnFind(int request_id,
// increment the current match ordinal; we need to re-generate it.
WebRange current_selection = frame_->selectionRange();
- if (frame_->find(request_id, search_text, options,
- false /* wrapWithinFrame */, &selection_rect, &active_now)) {
+ bool result = frame_->find(request_id, search_text, options,
+ false /* wrapWithinFrame */, &selection_rect,
+ &active_now);
+ if (result && !options.findNext) {
// Indicate that at least one match has been found. 1 here means possibly
// more matches could be coming. -1 here means that the exact active match
// ordinal is not yet known.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698