Chrome PDF scrollwheel zooming should center the zoom on the mouse position |
||||||||
Issue descriptionCurrently, scrolling with the ctrl+mouse wheel will zoom the PDF document in/out. But, the display location of the document seems.... random. We should switch the display to zoom around the mouse location instead of what it's currently doing.
,
Apr 27 2017
The pdf viewer is separate from web pages, I'm not sure if we need to do the exact same thing. (I believe we are currently doing the same thing as Blink). The desire for this is if you have a large document, zooming into a specific part of that document is difficult. Being able to zoom at the point the mouse is pointed at makes it a lot simpler.
,
Oct 11 2017
dsinclair, is there someone familiar with how zoom, especially for PDFs work, that should look at how difficult this change would be?
,
Oct 11 2017
+ mcnee@, who has some knowledge of how PDF zoom works.
,
Oct 12 2017
Zoom changes for the pdf viewer preserve the scroll position, which I believe is the same behaviour as web pages. We're going to use the ctrl wheel events for mac pinch zooming ( crbug.com/715662 ). The mouse position will be the anchor in that case. So we should get the same behaviour for non-pinch ctrl wheel events.
,
Oct 17 2017
This is very useful in maps and other documents with large pages. I don't think we need to worry about matching what Blink does, as PDFs have fixed page dimensions while webpages adjust to the viewport. The meaning of zoom in each case is different.
,
Oct 17 2017
,
Oct 20 2017
,
Nov 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bc61eb6a67219aa4352a4767d62d5b46719ca03e commit bc61eb6a67219aa4352a4767d62d5b46719ca03e Author: Kevin McNee <mcnee@chromium.org> Date: Mon Nov 13 20:39:14 2017 PDF viewer: Handle ctrl-wheel zooming with the viewer's pinch zoom mechanism. When pinch zooming with a Mac trackpad, we generate synthetic ctrl-wheels so that JS can handle the gesture. We now use these wheel events in the PDF viewer's gesture detector to create pinch events for the viewer's pinch zoom mechanism, as we currently do for pinches from touch events. We also use this for non-synthetic ctrl-wheels. This allows us to have zooming with the mouse wheel anchor the zoom around the mouse position instead of the scroll position. Bug: 715662 , 715670 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: Ia672a266cdd69c3e87d1451548c7470176ed8fd6 Reviewed-on: https://chromium-review.googlesource.com/730648 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Kevin McNee <mcnee@chromium.org> Cr-Commit-Position: refs/heads/master@{#516034} [modify] https://crrev.com/bc61eb6a67219aa4352a4767d62d5b46719ca03e/chrome/browser/pdf/pdf_extension_test.cc [modify] https://crrev.com/bc61eb6a67219aa4352a4767d62d5b46719ca03e/chrome/browser/resources/pdf/gesture_detector.js [modify] https://crrev.com/bc61eb6a67219aa4352a4767d62d5b46719ca03e/chrome/test/data/pdf/gesture_detector_test.js [modify] https://crrev.com/bc61eb6a67219aa4352a4767d62d5b46719ca03e/content/public/test/browser_test_utils.cc [modify] https://crrev.com/bc61eb6a67219aa4352a4767d62d5b46719ca03e/content/public/test/browser_test_utils.h
,
Nov 14 2017
,
Oct 12
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by thestig@chromium.org
, Apr 26 2017