forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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} Review URL: https://codereview.chromium.org/1255403002 Cr-Commit-Position: refs/heads/master@{#341861}
- Loading branch information
raymes
authored and
Commit bot
committed
Aug 5, 2015
1 parent
fa9f7f4
commit bd82a94
Showing
10 changed files
with
149 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.