forked from mozilla/pdf.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-factor
PDFDocumentProperties
such that it's properly reset when …
…a new PDF file is opened (issue 8371) This patch contains the following improvements: - Only fetch the various document properties *once* per PDF file opened, and cache the result (in a frozen object). - Always update the *entire* dialog at once, to prevent inconsistent UI state (issue 8371). - Ensure that the dialog, and all its internal properties, are reset when `PDFViewerApplication.close` is called. - Inline, and re-factor, the `getProperties` method in `open`, since that's the only call-site. - Always overwrite the fileSize with the value obtained from `pdfDocument.getDownloadInfo`, to ensure that it's correct. - ES6-ify the code that's touched in this patch. Fixes 8371.
- Loading branch information
1 parent
c5b45d2
commit 8c0de6d
Showing
4 changed files
with
121 additions
and
85 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