PDF Viewer: Fix edge case at bottom of document
If more than one page was visible in the viewport, getPageAtY_(y) fell through to returning 0 when y was the bottom of the document, because in the last iteration of the loop, where max = min = page = N-1 (for an N page document), the bottom of the page was exactly equal to y, rather than strictly > y. This resulted in the most visible page being set to N-1 rather than N when the document was scrolled to the bottom in this case. Bug: 1000121 Change-Id: I541204141d1fb7891f1df1bc95d00be28d39bbfd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1851086 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by:Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#704717}
Showing
Please register or sign in to comment