New issue
Advanced search Search tips

Issue 683437 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Incorrect find-in-page results for non-existent text in PDFs

Project Member Reported by thestig@chromium.org, Jan 21 2017

Issue description

Chrome Version: 55.x
OS: Linux, ChromeOS (All desktop?)

What steps will reproduce the problem?
(1) Load http://www.lenovo.com/psref/pdf/psref354.pdf
(2) Search for: x20
(3) Press '1' to make it a search for: x201

What is the expected result?

The find-in-page result should be 0 of 0.

What happens instead?

The find-in-page result shows 1 of N, for some value of N between 1 and 393.
 
It turns out because the PDF has 471 pages and takes a while to search, "1 of N" will eventually turn to "0 of 0" if one waits long enough. Besides not being a good user experience, in debug mode, pressing ctrl+g while the search is happening results in a NOTREACHED() in PDFiumEngine::SelectFindResult().
Cc: paulmeyer@chromium.org
+paulmeyer for advice on how to get find-in-page to display 0 of 0, instead of 1 of N. Do we need a new better PPB_Find_Private API?
I'm looking into this. Not sure what to do yet.
Owner: paulmeyer@chromium.org
Status: Assigned (was: Untriaged)
I'm wondering if perhaps each new find request should just set the find results to "0 of 0" right away, and then if and when matches are found, it will then change to reflect that (as always). I think this would be fine to do in general, not just for PDF case, so I will attempt to add this mechanism.
Status: Started (was: Assigned)
Status: Fixed (was: Started)
This was fixed by this CL: https://codereview.chromium.org/2836973002/

Sign in to add a comment