Commit d41579e2 authored by Allan Sandfeld Jensen's avatar Allan Sandfeld Jensen Committed by Commit Bot

Fix search restart after zero entries (again).

The fix was lost in refactoring that ended up duplicating
the last_find_request_completed_with_no_matches_ member.

BUG=669983

Change-Id: I09229496d183ef3f9b69c6089a6ac3ecd8b5ef82
Reviewed-on: https://chromium-review.googlesource.com/c/1477835Reviewed-by: default avatarRakina Zata Amni <rakina@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634599}
parent ab5a3160
...@@ -301,4 +301,8 @@ void FindTaskController::Trace(Visitor* visitor) { ...@@ -301,4 +301,8 @@ void FindTaskController::Trace(Visitor* visitor) {
visitor->Trace(resume_finding_from_range_); visitor->Trace(resume_finding_from_range_);
} }
void FindTaskController::ResetLastFindRequestCompletedWithNoMatches() {
last_find_request_completed_with_no_matches_ = false;
}
} // namespace blink } // namespace blink
...@@ -76,6 +76,8 @@ class CORE_EXPORT FindTaskController final ...@@ -76,6 +76,8 @@ class CORE_EXPORT FindTaskController final
void Trace(Visitor* visitor); void Trace(Visitor* visitor);
void ResetLastFindRequestCompletedWithNoMatches();
private: private:
void RequestIdleFindTask(int identifier, void RequestIdleFindTask(int identifier,
const WebString& search_text, const WebString& search_text,
......
...@@ -206,7 +206,7 @@ bool TextFinder::Find(int identifier, ...@@ -206,7 +206,7 @@ bool TextFinder::Find(int identifier,
} }
// We found something, so the result of the previous scoping may be outdated. // We found something, so the result of the previous scoping may be outdated.
last_find_request_completed_with_no_matches_ = false; find_task_controller_->ResetLastFindRequestCompletedWithNoMatches();
return true; return true;
} }
...@@ -661,7 +661,6 @@ TextFinder::TextFinder(WebLocalFrameImpl& owner_frame) ...@@ -661,7 +661,6 @@ TextFinder::TextFinder(WebLocalFrameImpl& owner_frame)
find_match_markers_version_(0), find_match_markers_version_(0),
should_locate_active_rect_(false), should_locate_active_rect_(false),
scoping_in_progress_(false), scoping_in_progress_(false),
last_find_request_completed_with_no_matches_(false),
find_match_rects_are_valid_(false) {} find_match_rects_are_valid_(false) {}
TextFinder::~TextFinder() = default; TextFinder::~TextFinder() = default;
......
...@@ -240,10 +240,6 @@ class CORE_EXPORT TextFinder final ...@@ -240,10 +240,6 @@ class CORE_EXPORT TextFinder final
// Keeps track of whether there is an scoping effort ongoing in the frame. // Keeps track of whether there is an scoping effort ongoing in the frame.
bool scoping_in_progress_; bool scoping_in_progress_;
// Keeps track of whether the last find request completed its scoping effort
// without finding any matches in this frame.
bool last_find_request_completed_with_no_matches_;
// Determines if the rects in the find-in-page matches cache of this frame // Determines if the rects in the find-in-page matches cache of this frame
// are invalid and should be recomputed. // are invalid and should be recomputed.
bool find_match_rects_are_valid_; bool find_match_rects_are_valid_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment