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

Issue 475933004: OOP PDF - Update zoom factor to fall within range (Closed)

Created:
6 years, 4 months ago by Nikhil
Modified:
6 years, 4 months ago
Reviewers:
Lei Zhang, raymes
CC:
chromium-reviews, arv+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

OOP PDF - Update zoom factor to fall within range Currently setZoom() doesn't check whether zoom factor provided falls within range or not. It is possible to pass big zoom level through 'zoom' open pdf parameter which can make browser unresponsive. This patch updates the zoom factor provided in setZoom() to fall within range. BUG=303491 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291387

Patch Set 1 #

Total comments: 3

Patch Set 2 : Review feedback (use Viewport.ZOOM_FACTORS to set range) #

Total comments: 2

Patch Set 3 : Review feedback (fix indentation) #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -0 lines) Patch
M chrome/browser/resources/pdf/viewport.js View 1 2 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
Nikhil
PTAL. Thanks!
6 years, 4 months ago (2014-08-21 10:39:48 UTC) #1
raymes
https://codereview.chromium.org/475933004/diff/1/chrome/browser/resources/pdf/viewport.js File chrome/browser/resources/pdf/viewport.js (right): https://codereview.chromium.org/475933004/diff/1/chrome/browser/resources/pdf/viewport.js#newcode82 chrome/browser/resources/pdf/viewport.js:82: Viewport.ZOOM_FACTOR_RANGE = {min: 0.1, max: 10.0}; could we set ...
6 years, 4 months ago (2014-08-22 01:02:23 UTC) #2
Nikhil
https://codereview.chromium.org/475933004/diff/1/chrome/browser/resources/pdf/viewport.js File chrome/browser/resources/pdf/viewport.js (right): https://codereview.chromium.org/475933004/diff/1/chrome/browser/resources/pdf/viewport.js#newcode82 chrome/browser/resources/pdf/viewport.js:82: Viewport.ZOOM_FACTOR_RANGE = {min: 0.1, max: 10.0}; On 2014/08/22 01:02:23, ...
6 years, 4 months ago (2014-08-22 03:07:42 UTC) #3
raymes
> Hmm, I've set min to 0.1 and max to 10.0 based on values which ...
6 years, 4 months ago (2014-08-22 03:54:03 UTC) #4
raymes
> Hmm, I've set min to 0.1 and max to 10.0 based on values which ...
6 years, 4 months ago (2014-08-22 03:54:05 UTC) #5
Nikhil
Updated to use ZOOM_FACTORS to set the range. PTAL. Thanks! https://codereview.chromium.org/475933004/diff/1/chrome/browser/resources/pdf/viewport.js File chrome/browser/resources/pdf/viewport.js (right): https://codereview.chromium.org/475933004/diff/1/chrome/browser/resources/pdf/viewport.js#newcode82 ...
6 years, 4 months ago (2014-08-22 04:59:04 UTC) #6
raymes
https://codereview.chromium.org/475933004/diff/20001/chrome/browser/resources/pdf/viewport.js File chrome/browser/resources/pdf/viewport.js (right): https://codereview.chromium.org/475933004/diff/20001/chrome/browser/resources/pdf/viewport.js#newcode84 chrome/browser/resources/pdf/viewport.js:84: Viewport.ZOOM_FACTORS.length - 1]}; Perhaps indent this like: Viewport.ZOOM_FACTOR_RANGE = ...
6 years, 4 months ago (2014-08-22 05:14:32 UTC) #7
Nikhil
Looks so much better now. Thanks :) Missing "git cl format" already. https://codereview.chromium.org/475933004/diff/20001/chrome/browser/resources/pdf/viewport.js File chrome/browser/resources/pdf/viewport.js ...
6 years, 4 months ago (2014-08-22 05:20:51 UTC) #8
raymes
lgtm
6 years, 4 months ago (2014-08-22 06:54:45 UTC) #9
Nikhil
thestig@ - OWNERS review please. On 2014/08/22 06:54:45, raymes wrote: > lgtm Thanks for reviewing ...
6 years, 4 months ago (2014-08-22 07:04:42 UTC) #10
Lei Zhang
lgtm
6 years, 4 months ago (2014-08-22 07:08:29 UTC) #11
Nikhil
Thanks raymes@ and thestig@ for quick reviews! Going to submit this now.
6 years, 4 months ago (2014-08-22 07:10:37 UTC) #12
Nikhil
The CQ bit was checked by n.bansal@samsung.com
6 years, 4 months ago (2014-08-22 07:10:45 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/n.bansal@samsung.com/475933004/40001
6 years, 4 months ago (2014-08-22 07:12:11 UTC) #14
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-22 08:05:18 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-22 08:10:10 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/8441)
6 years, 4 months ago (2014-08-22 08:10:11 UTC) #17
Nikhil
The CQ bit was checked by n.bansal@samsung.com
6 years, 4 months ago (2014-08-22 09:50:21 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/n.bansal@samsung.com/475933004/40001
6 years, 4 months ago (2014-08-22 09:50:37 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-22 09:56:00 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-22 10:04:29 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/8465)
6 years, 4 months ago (2014-08-22 10:04:31 UTC) #22
Nikhil
Rebase
6 years, 4 months ago (2014-08-22 11:21:34 UTC) #23
Nikhil
The CQ bit was checked by n.bansal@samsung.com
6 years, 4 months ago (2014-08-22 11:21:52 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/n.bansal@samsung.com/475933004/60001
6 years, 4 months ago (2014-08-22 11:22:05 UTC) #25
commit-bot: I haz the power
6 years, 4 months ago (2014-08-22 12:19:07 UTC) #26
Message was sent while issue was closed.
Committed patchset #4 (60001) as 291387

Powered by Google App Engine
This is Rietveld 408576698