New issue
Advanced search Search tips

Issue 704160 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Small jump at the end of a pinch zoom-in for the PDF viewer

Project Member Reported by mcnee@chromium.org, Mar 22 2017

Issue description

Chrome Version: 59.0.3047.0
OS: Linux and Chrome OS

What steps will reproduce the problem?
(1) With a touchscreen, open a PDF (e.g. http://www.orimi.com/pdf-test.pdf )
(2) Starting with the PDF content width less than the width of the viewer, pinch zoom in until the PDF is wider than the viewer.

What is the expected result?
Upon the end of the pinch, the position of the content should not jump.

What happens instead?
If the pinch gesture was quick, there may be a small jump in the position of the content. If the gesture was done slowly, the jump does not occur.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/08f7da01c04697fb873396bdf84b4ee34175fddd

commit 08f7da01c04697fb873396bdf84b4ee34175fddd
Author: mcnee <mcnee@chromium.org>
Date: Thu Mar 23 13:58:54 2017

PDF Viewer pinch zoom: Compute the zoom needed for the paint offset.

Currently, when pinch zooming in, starting with a document that doesn't
cover the width of the plugin, we record the last zoom before the
document does cover the width. This value is used to compute the
|paint_offset| for the rest of the pinch. However, if the pinch is done
quickly, the last zoom value we record may differ significantly from the
zoom at which the rendered document width matches the plugin width. This
leads to an incorrect |paint_offset| as the gesture continues.

We now compute the correct zoom value, rather than relying on the last
one we see to be accurate.

BUG= 704160 

Review-Url: https://codereview.chromium.org/2764353002
Cr-Commit-Position: refs/heads/master@{#459069}

[modify] https://crrev.com/08f7da01c04697fb873396bdf84b4ee34175fddd/pdf/out_of_process_instance.cc
[modify] https://crrev.com/08f7da01c04697fb873396bdf84b4ee34175fddd/pdf/out_of_process_instance.h

Comment 2 by mcnee@chromium.org, Mar 23 2017

Status: Fixed (was: Started)

Sign in to add a comment