Commit d1f8c914 authored by Christos Froussios's avatar Christos Froussios Committed by Commit Bot

Reland "Fix search restart after zero entries (again)."

This reverts commit 735b1fdc.

Reason for revert: Speculative revert did not fix the failure

Original change's description:
> Revert "Fix search restart after zero entries (again)."
> 
> This reverts commit d41579e2.
> 
> Reason for revert: Speculative revert.
> This is the only CL in https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/chromeos-kevin-rel/325 when it started to break.
> 
> Original change's description:
> > 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/1477835
> > Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
> > Reviewed-by: Kentaro Hara <haraken@chromium.org>
> > Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#634599}
> 
> TBR=haraken@chromium.org,rakina@chromium.org,allan.jensen@qt.io
> 
> Change-Id: I5b59c759eb23e526892b8fdab7ed580306cfd6d6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 669983
> Reviewed-on: https://chromium-review.googlesource.com/c/1482455
> Reviewed-by: Christos Froussios <cfroussios@chromium.org>
> Commit-Queue: Christos Froussios <cfroussios@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#634625}

TBR=haraken@chromium.org,cfroussios@chromium.org,rakina@chromium.org,allan.jensen@qt.io

Change-Id: Ia19ee92cf309fa3b2554c226170412c4722bcbce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 669983
Reviewed-on: https://chromium-review.googlesource.com/c/1483079Reviewed-by: default avatarChristos Froussios <cfroussios@chromium.org>
Commit-Queue: Christos Froussios <cfroussios@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634631}
parent 9a357d6d
...@@ -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