[GV] Add an option in the find controller to update matches count only when the last page is reached (bug 1803188).

In GeckoView, on an event, a callback must be executed with the result of an action,
but the callback can be used only one time.
So for each FindInPage event, we must trigger only one matches count update.
This commit is contained in:
Calixte Denizet 2022-11-09 11:09:22 +01:00
parent 8a0ca04399
commit 661f425934
3 changed files with 58 additions and 4 deletions

View file

@ -458,6 +458,8 @@ const PDFViewerApplication = {
const findController = new PDFFindController({
linkService: pdfLinkService,
eventBus,
updateMatchesCountOnProgress:
typeof PDFJSDev === "undefined" || !PDFJSDev.test("GECKOVIEW"),
});
this.findController = findController;