Only emit finalUpdate found-in-page events
Since Chrome 53 all meaningful results of found-in-page are finalUpdate.
This commit is contained in:
parent
5ccd0a24e9
commit
fbac635687
4 changed files with 11 additions and 12 deletions
|
@ -528,15 +528,17 @@ void WebContents::FindReply(content::WebContents* web_contents,
|
|||
const gfx::Rect& selection_rect,
|
||||
int active_match_ordinal,
|
||||
bool final_update) {
|
||||
if (!final_update)
|
||||
return;
|
||||
|
||||
v8::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
|
||||
mate::Dictionary result = mate::Dictionary::CreateEmpty(isolate());
|
||||
result.Set("requestId", request_id);
|
||||
result.Set("matches", number_of_matches);
|
||||
result.Set("finalUpdate", final_update);
|
||||
result.Set("selectionArea", selection_rect);
|
||||
result.Set("activeMatchOrdinal", active_match_ordinal);
|
||||
result.Set("finalUpdate", final_update); // Deprecate after 2.0
|
||||
Emit("found-in-page", result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue