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

Unified Diff: android_webview/browser/find_helper.cc

Issue 1913543002: Fix for problem with activating find-in-page match via find tickbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and fixed typo in comment. Created 4 years, 8 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 | « android_webview/browser/find_helper.h ('k') | chrome/browser/ui/find_bar/find_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/find_helper.cc
diff --git a/android_webview/browser/find_helper.cc b/android_webview/browser/find_helper.cc
index 8fc9979f607e3dbe782cf4120a199924977a3466..836ba80a509e5314e0470167b90639c141d953a0 100644
--- a/android_webview/browser/find_helper.cc
+++ b/android_webview/browser/find_helper.cc
@@ -22,6 +22,7 @@ FindHelper::FindHelper(WebContents* web_contents)
async_find_started_(false),
find_request_id_counter_(0),
current_request_id_(0),
+ current_session_id_(0),
last_match_count_(-1),
last_active_ordinal_(-1) {
}
@@ -56,7 +57,7 @@ void FindHelper::HandleFindReply(int request_id,
int match_count,
int active_ordinal,
bool finished) {
- if (!async_find_started_ || request_id != current_request_id_)
+ if (!async_find_started_ || request_id < current_session_id_)
return;
NotifyResults(active_ordinal, match_count, finished);
@@ -99,6 +100,7 @@ bool FindHelper::MaybeHandleEmptySearch(const base::string16& search_string) {
void FindHelper::StartNewSession(const base::string16& search_string) {
current_request_id_ = find_request_id_counter_++;
+ current_session_id_ = current_request_id_;
last_search_string_ = search_string;
last_match_count_ = -1;
last_active_ordinal_ = -1;
« no previous file with comments | « android_webview/browser/find_helper.h ('k') | chrome/browser/ui/find_bar/find_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698