1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 07:08:08 +02:00
pdf.js/web
Jonas Jenwald 08e2427f9c Ensure that pre-rendering works correctly with spreadModes at higher zoom levels
Having recently worked with this code, in PR 14096 (and indirectly in PR 14112), I happened to notice a pre-existing issue with spreadModes at higher zoom levels.
The `PDFRenderingQueue` code was written back when the viewer only supported "normal" vertical scrolling, and some edge-cases related to spreadModes are thus not perfectly supported. Depending on the zoom level, it's possible that there are "holes" in the currently visible page layout, and those pages will not be pre-rendered as you'd expect.

*Steps to reproduce:*

 0. Open the viewer, e.g. https://mozilla.github.io/pdf.js/web/viewer.html
 1. Enable vertical scrolling.
 2. Enable the ODD spreadMode.
 3. Scroll down, such that both pages 1 and 3 are visible.
 4. Zoom-in until *only* page 1 and 3 are visible.
 5. Open the devtools and, using the DOM Inspector, notice how page 2 is *not* being pre-rendered despite all surrounding pages being rendered.
2021-10-14 11:20:49 +02:00
..
images Add an icon for the "find/highlight the current outlineItem" functionality 2021-01-09 16:09:46 +01:00
.gitignore Remove obselete file from .gitignore 2015-01-26 16:44:45 +01:00
annotation_layer_builder.css [Regression] Fix comb fields scrolling when the last character is entered (PR 14049 follow-up) 2021-10-05 09:36:08 +02:00
annotation_layer_builder.js Re-factor document.getElementsByName lookups in the AnnotationLayer (issue 14003) 2021-09-23 13:05:18 +02:00
app.js Merge pull request #14067 from calixteman/1732344 2021-09-23 15:07:00 -07:00
app_options.js [GENERIC viewer] Warn about AppOptions being overridden by Preferences during loading 2021-09-22 15:43:26 +02:00
base_tree_viewer.js Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050) 2021-01-09 16:09:44 +01:00
base_viewer.js Merge pull request #14096 from Snuffleupagus/spreadMode-preRender 2021-10-02 12:54:19 +02:00
chrome-i18n-allow-access-to-file-urls.json Add translations of "Allow access to file URLs" 2015-08-14 18:59:55 +02:00
chromecom.js Account for formatting changes in Prettier version 2.3.0 2021-05-16 11:44:05 +02:00
compressed.tracemonkey-pldi-09.pdf Add Makefile. Move some files around to make building the website easier. 2011-07-05 10:53:57 -07:00
debugger.js Re-factor loadAndEnablePDFBug and PDFBug.init 2021-08-19 12:06:23 +02:00
download_manager.js [GENERIC viewer] Always show the Download-buttons, to allow saving of forms (issue 13997) 2021-09-15 23:51:56 +02:00
firefox_print_service.js Re-factor the CSS_PIXELS_PER_INCH/PDF_PIXELS_PER_INCH exports (PR 13991 follow-up) 2021-09-11 11:15:25 +02:00
firefoxcom.js Collect all l10n fallback strings, used in the viewer, in one helper function (PR 12981 follow-up) 2021-03-04 11:34:51 +01:00
generic_scripting.js Account for formatting changes in Prettier version 2.3.0 2021-05-16 11:44:05 +02:00
genericcom.js Pass in the "sandboxBundleSrc" option when calling DefaultExternalServices.createScripting 2020-12-23 14:05:49 +01:00
genericl10n.js [GENERIC viewer] Try to fixup "incomplete" language codes (issue 13689) 2021-07-08 12:54:58 +02:00
grab_to_pan.js [GrabToPan] Use Element.matches() rather than prefixed ...matchesSelector versions 2021-03-26 21:37:51 +01:00
interfaces.js [api-minor] Add a wrapper around the addLinkAttributes-function, in the API, to the PDFLinkService implementations 2021-10-02 12:28:00 +02:00
l10n_utils.js [GENERIC viewer] Try to fixup "incomplete" language codes (issue 13689) 2021-07-08 12:54:58 +02:00
overlay_manager.js Fix the linting errors, from the Prettier auto-formatting, that ESLint --fix couldn't handle 2019-12-26 12:35:12 +01:00
password_prompt.js Collect all l10n fallback strings, used in the viewer, in one helper function (PR 12981 follow-up) 2021-03-04 11:34:51 +01:00
pdf_attachment_viewer.js [api-minor] Support the Content-Disposition filename in the Firefox PDF Viewer (bug 1694556, PR 9379 follow-up) 2021-02-26 10:50:29 +01:00
pdf_cursor_tools.js Remove the useless PresentationModeState.CHANGING-case in PDFCursorTools (PR 12788 follow-up) 2021-02-14 10:39:49 +01:00
pdf_document_properties.js Move the getPdfFilenameFromUrl helper function from web/ui_utils.js and into src/display/display_utils.js 2021-03-17 15:48:24 +01:00
pdf_find_bar.js Collect all l10n fallback strings, used in the viewer, in one helper function (PR 12981 follow-up) 2021-03-04 11:34:51 +01:00
pdf_find_controller.js Take the position of the selected element into account when scrolling matches (issue 13596) 2021-06-21 11:49:33 +02:00
pdf_find_utils.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
pdf_history.js Change the parseQueryString function to return a Map rather than an Object (issue 13829) 2021-07-31 23:24:49 +02:00
pdf_layer_viewer.js Account for formatting changes in Prettier version 2.3.0 2021-05-16 11:44:05 +02:00
pdf_link_service.js [api-minor] Add a wrapper around the addLinkAttributes-function, in the API, to the PDFLinkService implementations 2021-10-02 12:28:00 +02:00
pdf_outline_viewer.js [api-minor] Add a wrapper around the addLinkAttributes-function, in the API, to the PDFLinkService implementations 2021-10-02 12:28:00 +02:00
pdf_page_view.js Fix typo "_annotatationMode" => "_annotationMode" 2021-09-23 18:42:33 +02:00
pdf_presentation_mode.js Remove the deprecated properties from the "presentationmodechanged" event (PR 12788 follow-up) 2021-04-06 13:04:23 +02:00
pdf_print_service.js Re-factor the CSS_PIXELS_PER_INCH/PDF_PIXELS_PER_INCH exports (PR 13991 follow-up) 2021-09-11 11:15:25 +02:00
pdf_rendering_queue.js Ensure that pre-rendering works correctly with spreadModes at higher zoom levels 2021-10-14 11:20:49 +02:00
pdf_scripting_manager.js Move the zoomIn/zoomOut functionality into BaseViewer (PR 14038 follow-up) 2021-09-19 11:54:57 +02:00
pdf_sidebar.js Improve the handling of the currentOutlineButton enabling/disabling (PR 12777 follow-up) 2021-04-10 13:12:47 +02:00
pdf_sidebar_resizer.js Use more optional chaining in the web/-folder (PR 12961 follow-up) 2021-03-07 16:20:52 +01:00
pdf_single_page_viewer.js Add previous/next-page functionality that takes scroll/spread-modes into account (issue 11946) 2021-01-22 21:38:15 +01:00
pdf_thumbnail_view.js [api-minor] Change {PDFPageView, PDFThumbnailView}.update to take a parameter object 2021-09-04 11:39:25 +02:00
pdf_thumbnail_viewer.js [api-minor] Change {PDFPageView, PDFThumbnailView}.update to take a parameter object 2021-09-04 11:39:25 +02:00
pdf_viewer.component.js Export the XFA/StructTree-layers in the viewer components 2021-08-28 18:43:08 +02:00
pdf_viewer.css Annotation & XFA: Scale the font size in choicelist using zoom factor (bug 1715996) 2021-08-04 20:36:04 +02:00
pdf_viewer.js Add previous/next-page functionality that takes scroll/spread-modes into account (issue 11946) 2021-01-22 21:38:15 +01:00
pdfjs.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
preferences.js Remove some *indirect* loops in the BasePreferences.getAll-method 2021-03-22 14:38:05 +01:00
print_utils.js Add PDF_TO_CSS_UNITS to the PixelsPerInch-structure 2021-09-20 13:20:09 +02:00
secondary_toolbar.js [api-minor] Add a wrapper around the addLinkAttributes-function, in the API, to the PDFLinkService implementations 2021-10-02 12:28:00 +02:00
struct_tree_layer_builder.js Fix Viewer API definitions and include in CI 2021-08-25 18:45:46 -04:00
text_highlighter.js Fix Viewer API definitions and include in CI 2021-08-25 18:45:46 -04:00
text_layer_builder.css Visually hide br in text selections 2021-08-01 19:42:05 +02:00
text_layer_builder.js Enable XFA by default in the viewer, and components/ examples (issue 13968) 2021-09-14 16:54:36 +02:00
toolbar.js [api-minor] Add a wrapper around the addLinkAttributes-function, in the API, to the PDFLinkService implementations 2021-10-02 12:28:00 +02:00
ui_utils.js Merge pull request #14058 from Snuffleupagus/EventBus-data 2021-09-22 22:26:32 +02:00
view_history.js Add a bit more validation in the ViewHistory constructor 2020-03-21 13:55:06 +01:00
viewer-snippet-chrome-extension.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer-snippet-chrome-overlays.html [CRX] Add file chooser as fallback (fixes #9411) 2018-03-21 18:21:46 +01:00
viewer-snippet-firefox-extension.html Stop bundling the ReadableStream polyfill in MOZCENTRAL builds (PR 10470 follow-up) 2019-01-23 20:33:20 +01:00
viewer-snippet-minified.html Remove XHTML leftovers from the viewer HTML files 2016-02-14 13:23:34 +01:00
viewer-snippet.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer.css Merge pull request #14042 from serdnab/doc-info-color 2021-09-23 18:03:04 -07:00
viewer.html Remove <meta> tag only necessary for IE-compatibility 2021-07-15 13:59:40 +02:00
viewer.js Use CSS variables for setting the width of the zoom dropdown (PR 11570 follow-up) 2021-09-15 15:51:30 +02:00
xfa_layer_builder.css Merge pull request #14049 from calixteman/bg_from_mk 2021-09-29 21:13:20 +02:00
xfa_layer_builder.js Ensure that various URL-related options are applied in the xfaLayer too 2021-10-02 09:32:23 +02:00