Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Issue 2503633002: Propagate browser zoom changes to embedded PDFs. (Closed)

Created:
4 years, 1 month ago by Kevin McNee
Modified:
4 years ago
CC:
chromium-reviews, arv+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Propagate browser zoom changes to embedded PDFs. Currently, changes to the browser zoom are ignored by embedded PDF viewers. This patch propagates browser zoom changes so that the zoom level of the viewer may be updated. For embedded viewers, we apply the internal change in zoom to the new browser zoom, rather than overwriting the viewer's zoom level. This patch also initializes an embedded viewer's zoom level to its parent's zoom level. BUG=88802 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/2999413a1038cfd7a2020edf431671a17db0e8d8 Cr-Commit-Position: refs/heads/master@{#436695}

Patch Set 1 #

Patch Set 2 : Apply internal pdf zoom to browser zoom. #

Total comments: 11

Patch Set 3 : Apply browser zoom separately. #

Patch Set 4 : Rebase only. #

Patch Set 5 : Use getDefaultZoom for clarity. #

Total comments: 9

Patch Set 6 : Rebase only. #

Patch Set 7 : Code review changes. #

Patch Set 8 : Use American spelling of behaviour. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -75 lines) Patch
M chrome/browser/resources/pdf/browser_api.js View 1 2 3 4 5 6 7 7 chunks +37 lines, -13 lines 0 comments Download
M chrome/browser/resources/pdf/pdf.js View 1 2 3 4 5 6 7 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/resources/pdf/viewport.js View 1 2 3 4 5 6 20 chunks +67 lines, -34 lines 0 comments Download
M chrome/browser/resources/pdf/zoom_manager.js View 1 2 3 4 5 6 7 2 chunks +129 lines, -13 lines 0 comments Download
M chrome/test/data/pdf/zoom_manager_test.js View 1 2 3 4 5 6 7 7 chunks +36 lines, -12 lines 0 comments Download

Messages

Total messages: 41 (14 generated)
Kevin McNee
4 years, 1 month ago (2016-11-14 21:01:52 UTC) #4
Kevin McNee
Hello thestig. I have another pdf JS change. I'm not sure who I should be ...
4 years, 1 month ago (2016-11-14 21:21:26 UTC) #6
Lei Zhang
I don't feel qualified to review this because my JS-fu is too weak. You can ...
4 years, 1 month ago (2016-11-14 21:33:50 UTC) #7
Kevin McNee
Hello, raymes. Could you take a look at this pdf JS change? Thanks.
4 years, 1 month ago (2016-11-14 22:26:53 UTC) #9
raymes
Thanks for taking a look at this Kevin! I'm not actually sure if we want ...
4 years, 1 month ago (2016-11-14 23:34:32 UTC) #10
wjmaclean
On 2016/11/14 23:34:32, raymes wrote: > Thanks for taking a look at this Kevin! I'm ...
4 years, 1 month ago (2016-11-15 01:54:17 UTC) #11
raymes
On 2016/11/15 01:54:17, wjmaclean wrote: > On 2016/11/14 23:34:32, raymes wrote: > > Thanks for ...
4 years, 1 month ago (2016-11-15 02:11:56 UTC) #12
wjmaclean
On 2016/11/15 02:11:56, raymes wrote: > > Hmm, would a better option be to keep ...
4 years, 1 month ago (2016-11-15 02:19:03 UTC) #13
raymes
On 2016/11/15 02:19:03, wjmaclean wrote: > On 2016/11/15 02:11:56, raymes wrote: > > > > ...
4 years, 1 month ago (2016-11-15 02:56:03 UTC) #14
raymes
> > That's not terribly unlike what we were thinking; the main difference seems to ...
4 years, 1 month ago (2016-11-15 03:10:38 UTC) #15
Kevin McNee
raymes: How's this? Also, in the interest of clarity, I went ahead and factored the ...
4 years, 1 month ago (2016-11-16 23:51:35 UTC) #16
raymes
Thanks Kevin. I tested the patch again on http://plugindoc.mozdev.org/testpages/pdf.html and zooming all the way out ...
4 years, 1 month ago (2016-11-17 00:59:57 UTC) #20
raymes
I'm deferring to sammc@ on this - hopefully he will be able to help! He ...
4 years, 1 month ago (2016-11-17 13:32:14 UTC) #21
Sam McNally
https://codereview.chromium.org/2503633002/diff/20001/chrome/browser/resources/pdf/pdf.js File chrome/browser/resources/pdf/pdf.js (right): https://codereview.chromium.org/2503633002/diff/20001/chrome/browser/resources/pdf/pdf.js#newcode140 chrome/browser/resources/pdf/pdf.js:140: this.browserApi_.getInitialZoom(), On 2016/11/17 00:59:57, raymes wrote: > Hmm, how ...
4 years, 1 month ago (2016-11-18 04:59:23 UTC) #22
Kevin McNee
Here's an implementation where the browser zoom level is applied on a separate internal zoom ...
4 years, 1 month ago (2016-11-22 23:17:33 UTC) #23
Sam McNally
https://codereview.chromium.org/2503633002/diff/20001/chrome/browser/resources/pdf/pdf.js File chrome/browser/resources/pdf/pdf.js (right): https://codereview.chromium.org/2503633002/diff/20001/chrome/browser/resources/pdf/pdf.js#newcode140 chrome/browser/resources/pdf/pdf.js:140: this.browserApi_.getInitialZoom(), On 2016/11/22 23:17:32, Kevin McNee wrote: > On ...
4 years ago (2016-11-28 07:25:13 UTC) #24
Kevin McNee
https://codereview.chromium.org/2503633002/diff/20001/chrome/browser/resources/pdf/pdf.js File chrome/browser/resources/pdf/pdf.js (right): https://codereview.chromium.org/2503633002/diff/20001/chrome/browser/resources/pdf/pdf.js#newcode140 chrome/browser/resources/pdf/pdf.js:140: this.browserApi_.getInitialZoom(), On 2016/11/28 07:25:13, Sam McNally wrote: > On ...
4 years ago (2016-11-28 16:18:44 UTC) #25
Kevin McNee
https://codereview.chromium.org/2503633002/diff/20001/chrome/browser/resources/pdf/pdf.js File chrome/browser/resources/pdf/pdf.js (right): https://codereview.chromium.org/2503633002/diff/20001/chrome/browser/resources/pdf/pdf.js#newcode140 chrome/browser/resources/pdf/pdf.js:140: this.browserApi_.getInitialZoom(), On 2016/11/28 16:18:44, Kevin McNee wrote: > On ...
4 years ago (2016-11-28 17:03:32 UTC) #26
Sam McNally
https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js File chrome/browser/resources/pdf/browser_api.js (right): https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js#newcode159 chrome/browser/resources/pdf/browser_api.js:159: BrowserApi.ZoomBehaviour = { I believe we're meant to use ...
4 years ago (2016-12-04 23:56:45 UTC) #28
Kevin McNee
https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js File chrome/browser/resources/pdf/browser_api.js (right): https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js#newcode159 chrome/browser/resources/pdf/browser_api.js:159: BrowserApi.ZoomBehaviour = { On 2016/12/04 23:56:45, Sam McNally wrote: ...
4 years ago (2016-12-05 22:21:00 UTC) #29
Sam McNally
LGTM https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js File chrome/browser/resources/pdf/browser_api.js (right): https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js#newcode159 chrome/browser/resources/pdf/browser_api.js:159: BrowserApi.ZoomBehaviour = { On 2016/12/05 22:21:00, Kevin McNee ...
4 years ago (2016-12-05 23:16:47 UTC) #30
raymes
rs lgtm
4 years ago (2016-12-05 23:34:46 UTC) #31
Kevin McNee
https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js File chrome/browser/resources/pdf/browser_api.js (right): https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js#newcode159 chrome/browser/resources/pdf/browser_api.js:159: BrowserApi.ZoomBehaviour = { On 2016/12/05 23:16:47, Sam McNally wrote: ...
4 years ago (2016-12-06 18:07:16 UTC) #32
Kevin McNee
https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js File chrome/browser/resources/pdf/browser_api.js (right): https://codereview.chromium.org/2503633002/diff/80001/chrome/browser/resources/pdf/browser_api.js#newcode159 chrome/browser/resources/pdf/browser_api.js:159: BrowserApi.ZoomBehaviour = { On 2016/12/06 18:07:16, Kevin McNee wrote: ...
4 years ago (2016-12-06 18:43:07 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2503633002/140001
4 years ago (2016-12-06 18:46:05 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years ago (2016-12-06 20:30:06 UTC) #39
commit-bot: I haz the power
4 years ago (2016-12-06 20:32:26 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/2999413a1038cfd7a2020edf431671a17db0e8d8
Cr-Commit-Position: refs/heads/master@{#436695}

Powered by Google App Engine
This is Rietveld 408576698