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

Issue 1255403002: Add a scroll offset to PDF documents to account for the top material design toolbar. (Closed)

Created:
5 years, 4 months ago by raymes
Modified:
5 years, 4 months ago
Reviewers:
Sam McNally, tsergeant
CC:
chromium-reviews, arv+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a scroll offset to PDF documents to account for the top material design toolbar. Previously the toolbar in the material design PDF UI would always cover the top of pages when it was first loaded or when a page was navigated to using the page selector. Now we ensure that a blank region is left at the very top of the document when it is first loaded. This is the region that the toolbar covers, so the document is not obscured at all. When pages are navigated to, we ensure that the top of the selected page is always underneath the toolbar so that it is not obscured. The one exception to this is when in fit-to-page mode which causes the page to be zoomed to cover the entire screen, ignoring the toolbar. This is so that users can take advantaging of filling all of the screen real-estate with a page when that is what they want. This is implemented by initially scrolling the document to a negative offset (which is equal to the toolbar height). All subsequent scrolls are relative to this initial scroll. A few small bugs that assumed there was no blank space above the first page have also been fixed. BUG=439114 Committed: https://crrev.com/daad0f1f879b13c8b55797ae5ce106d382283047 Cr-Commit-Position: refs/heads/master@{#341685} Committed: https://crrev.com/bd82a94bbc1738c60459dec25f4d9aa73f7baeab Cr-Commit-Position: refs/heads/master@{#341861}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 6

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -44 lines) Patch
M chrome/browser/resources/pdf/pdf.js View 1 2 3 4 3 chunks +14 lines, -2 lines 0 comments Download
M chrome/browser/resources/pdf/viewport.js View 1 2 3 4 10 chunks +37 lines, -16 lines 0 comments Download
M chrome/test/data/pdf/basic_plugin_test.js View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/data/pdf/navigator_test.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/pdf/viewport_test.js View 1 2 3 4 11 chunks +52 lines, -11 lines 0 comments Download
M pdf/out_of_process_instance.h View 1 chunk +4 lines, -0 lines 0 comments Download
M pdf/out_of_process_instance.cc View 1 2 3 4 5 6 7 7 chunks +26 lines, -9 lines 0 comments Download
M pdf/pdf_engine.h View 1 chunk +3 lines, -0 lines 0 comments Download
M pdf/pdfium/pdfium_engine.h View 2 chunks +1 line, -4 lines 0 comments Download
M pdf/pdfium/pdfium_engine.cc View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (8 generated)
raymes
5 years, 4 months ago (2015-07-28 05:54:33 UTC) #2
raymes
PTAL
5 years, 4 months ago (2015-08-03 07:31:28 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1255403002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1255403002/60001
5 years, 4 months ago (2015-08-03 07:32:01 UTC) #5
Sam McNally
https://codereview.chromium.org/1255403002/diff/60001/chrome/browser/resources/pdf/viewport.js File chrome/browser/resources/pdf/viewport.js (right): https://codereview.chromium.org/1255403002/diff/60001/chrome/browser/resources/pdf/viewport.js#newcode48 chrome/browser/resources/pdf/viewport.js:48: this.topToolbarHeight = 0; Please make this a constructor param ...
5 years, 4 months ago (2015-08-03 08:06:45 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/85658)
5 years, 4 months ago (2015-08-03 09:01:49 UTC) #8
raymes
https://codereview.chromium.org/1255403002/diff/60001/chrome/browser/resources/pdf/viewport.js File chrome/browser/resources/pdf/viewport.js (right): https://codereview.chromium.org/1255403002/diff/60001/chrome/browser/resources/pdf/viewport.js#newcode48 chrome/browser/resources/pdf/viewport.js:48: this.topToolbarHeight = 0; On 2015/08/03 08:06:45, Sam McNally wrote: ...
5 years, 4 months ago (2015-08-04 00:28:46 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1255403002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1255403002/80001
5 years, 4 months ago (2015-08-04 00:29:54 UTC) #11
Sam McNally
LGTM https://codereview.chromium.org/1255403002/diff/80001/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/1255403002/diff/80001/pdf/out_of_process_instance.cc#newcode600 pdf/out_of_process_instance.cc:600: // JS), so we need to subtract the ...
5 years, 4 months ago (2015-08-04 00:48:55 UTC) #12
raymes
https://codereview.chromium.org/1255403002/diff/80001/pdf/out_of_process_instance.cc File pdf/out_of_process_instance.cc (right): https://codereview.chromium.org/1255403002/diff/80001/pdf/out_of_process_instance.cc#newcode600 pdf/out_of_process_instance.cc:600: // JS), so we need to subtract the toolbar ...
5 years, 4 months ago (2015-08-04 01:00:20 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1255403002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1255403002/120001
5 years, 4 months ago (2015-08-04 01:01:00 UTC) #16
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 4 months ago (2015-08-04 05:05:47 UTC) #17
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/daad0f1f879b13c8b55797ae5ce106d382283047 Cr-Commit-Position: refs/heads/master@{#341685}
5 years, 4 months ago (2015-08-04 05:07:38 UTC) #18
Vitaly Buka (NO REVIEWS)
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1267553004/ by vitalybuka@chromium.org. ...
5 years, 4 months ago (2015-08-04 21:42:50 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1255403002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1255403002/140001
5 years, 4 months ago (2015-08-05 05:54:11 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 4 months ago (2015-08-05 07:06:55 UTC) #23
commit-bot: I haz the power
5 years, 4 months ago (2015-08-05 07:09:09 UTC) #24
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/bd82a94bbc1738c60459dec25f4d9aa73f7baeab
Cr-Commit-Position: refs/heads/master@{#341861}

Powered by Google App Engine
This is Rietveld 408576698