New issue
Advanced search Search tips

Issue 605379 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 540866
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Feature



Sign in to add a comment

Improve PDF pinch-zoom

Project Member Reported by alessandroa@google.com, Apr 21 2016

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 7834.60.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.95 Safari/537.36

Example URL:
Any pdf

Steps to reproduce the problem:
1. Open a pdf from a touch screen device
2. Try to pinch zoom

What is the expected behavior?

What went wrong?

Does it occur on multiple sites: Yes

Is it a problem with a plugin? Yes PDF plugin

Did this work before? No 

Does this work in other browsers? N/A 

Chrome version: 49.0.2623.95  Channel: n/a
OS Version: 
Flash Version:
 

Comment 1 by bokan@chromium.org, Apr 21 2016

Cc: wjmaclean@chromium.org
Components: -Blink Internals>Plugins>PDF
Labels: -Type-Bug OS-Chrome OS-Mac OS-Windows Type-Feature
Owner: bokan@chromium.org
Status: Assigned (was: Unconfirmed)
This bug tracks improving the UX for pinch-zoom in Chrome's PDF plugin. Currently, when a user pinch-zooms on a touch screen while viewing a PDF, they activate "browser pinch-zoom", which scales the PDF, along with scaling all their controls off the screen. Additionally, the PDF content isn't rerastered at the new zoom-level.

This project replaces the built-in browser pinch-zoom by capturing the touch events directly and translating them into zoom events inside the PDF plugin. This scales only the content of the PDF and not the surrounding controls and rasters the PDF at the new zoom level.
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 21 2016

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

commit d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7
Author: alessandroa <alessandroa@google.com>
Date: Thu Apr 21 19:35:25 2016

Added SetLayerTransform to PPAPI.

SetLayerTransform() sets a transformation factor that will be applied for the current
layer displayed on the output device.
This function has no effect until you call Flush().
@param[in] scale The scale to be applied.
@param[in] origin The origin of the scale.
@param[in] translate The translation to be applied.

@return Returns true on success or false if the resource is invalid or the scale factor is 0 or less.

BUG= 605379 
NOPRESUBMIT=true

Reason:
** Presubmit ERRORS **
TODOs found in stable public PPAPI files:
ppapi/cpp/graphics_2d.h

Review URL: https://codereview.chromium.org/1881603002

Cr-Commit-Position: refs/heads/master@{#388851}

[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/content/renderer/pepper/pepper_graphics_2d_host.cc
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/content/renderer/pepper/pepper_graphics_2d_host.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/content/renderer/pepper/pepper_plugin_instance_impl.cc
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/content/renderer/pepper/pepper_plugin_instance_impl.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/api/ppb_graphics_2d.idl
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/c/pp_macros.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/c/ppb_graphics_2d.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/cpp/graphics_2d.cc
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/cpp/graphics_2d.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/proxy/graphics_2d_resource.cc
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/proxy/graphics_2d_resource.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/proxy/ppapi_messages.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/tests/test_graphics_2d.cc
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/tests/test_graphics_2d.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/thunk/interfaces_ppb_public_stable.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/thunk/ppb_graphics_2d_api.h
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/ppapi/thunk/ppb_graphics_2d_thunk.cc
[modify] https://crrev.com/d55efd0d4b7573d763dd6e4d1d9ccfe4ca5be2f7/tools/metrics/histograms/histograms.xml

Project Member

Comment 3 by sheriffbot@chromium.org, Jun 2 2016

Labels: Hotlist-Google
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 25 2016

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

commit 9fb5007ba0a99358e8418f0c2b3791705006a7c0
Author: mcnee <mcnee@google.com>
Date: Tue Oct 25 20:49:19 2016

Specify the rect invalidated by SetLayerTransform.

When SetLayerTransform was introduced, instead of specifying the rect
that is invalidated, the no_update_visible flag was manually set to
false to indicate that the flush callback needs to be executed. Since
nothing was invalidated, we don't get calls to ViewInitiatedPaint,
which delays the callback.

By setting the op_rect like the other queued commands do, the
invalidations and callback scheduling are done correctly.

BUG= 605379 

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

[modify] https://crrev.com/9fb5007ba0a99358e8418f0c2b3791705006a7c0/content/renderer/pepper/pepper_graphics_2d_host.cc
[modify] https://crrev.com/9fb5007ba0a99358e8418f0c2b3791705006a7c0/content/renderer/pepper/pepper_graphics_2d_host.h

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 9 2016

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

commit 6e1abbfb2450eedddb1ab128be1b31cc93104e41
Author: mcnee <mcnee@google.com>
Date: Wed Nov 09 18:05:31 2016

Improved Pinch-Zoom for PDF.

Currently, when the PDF viewer is pinch-zoomed, the content is not
rerastered and the viewer's controls are scaled off screen.

We now have the viewer handle the pinch-zoom events, instead of the
browser. We compute scrollbars and scale after a pinch and apply transforms
on the existing bitmap. This allows us to keep the controls fixed and only
scale the content as well as reraster the content when needed.

BUG= 605379 

patch from issue 1901903002 at patchset 80001 (http://crrev.com/1901903002#ps80001)
This is a continuation of 1901903002 under a new owner (alessandroa -> mcnee).
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

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

[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/chrome/browser/pdf/pdf_extension_test.cc
[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/chrome/browser/resources/component_extension_resources.grd
[add] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/chrome/browser/resources/pdf/gesture_detector.js
[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/chrome/browser/resources/pdf/index.html
[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/chrome/browser/resources/pdf/pdf.js
[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/chrome/browser/resources/pdf/viewport.js
[add] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/chrome/test/data/pdf/gesture_detector_test.js
[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/pdf/out_of_process_instance.cc
[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/pdf/out_of_process_instance.h
[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/pdf/paint_manager.cc
[modify] https://crrev.com/6e1abbfb2450eedddb1ab128be1b31cc93104e41/pdf/paint_manager.h

Comment 6 by mcnee@google.com, Nov 9 2016

Mergedinto: 540866
Status: Duplicate (was: Assigned)

Sign in to add a comment