Commit Graph

  • cf320f8fa3
    Merge pull request #14788 from Snuffleupagus/debugger-separate-css Tim van der Meij 2022-04-19 21:13:16 +02:00
  • 5bc7339c1b Add support for the /Catalog Base-URI when resolving URLs (issue 14802) Jonas Jenwald 2022-04-19 16:53:44 +02:00
  • fb90ef7b28 [GENERIC viewer] Simplify the styling of the previous/next findbar buttons Jonas Jenwald 2022-04-19 13:43:24 +02:00
  • 32ae0e4867
    Merge pull request #14799 from calixteman/12306-followup Jonas Jenwald 2022-04-18 13:17:17 +02:00
  • c2aa03e194 Fix clipping issue with pattern (follow-up of #14797) Calixte Denizet 2022-04-18 12:14:35 +02:00
  • 5bbed400f2
    Merge pull request #14797 from calixteman/12306 Jonas Jenwald 2022-04-18 11:18:32 +02:00
  • f82879205e
    Merge pull request #14796 from calixteman/minmax Jonas Jenwald 2022-04-18 11:15:23 +02:00
  • 3d74d2c6cb Don't clip when the clip path is empty (issue #12306) Calixte Denizet 2022-04-17 21:59:17 +02:00
  • 4b7691baf6 Simplify min/max computations in constructPath (bug 1135277) - most of the time the current transform is a scaling one (modulo translation), hence it's possible to avoid to apply the transform on each bbox and then apply it a posteriori; - compute the bbox when it's possible in the worker. Calixte Denizet 2022-04-17 15:35:07 +02:00
  • 1ea9740fdb Reduce more duplication in the CSS Jonas Jenwald 2022-04-17 13:52:57 +02:00
  • 379125c37f
    Merge pull request #14777 from calixteman/mask_perf calixteman 2022-04-17 12:37:23 +02:00
  • 03ec7a22f2 Simplify spread-mode handling for the PAGE scroll-mode Jonas Jenwald 2022-04-17 10:53:34 +02:00
  • 0c086467a9 Update l10n files Jonas Jenwald 2022-04-17 10:25:20 +02:00
  • c727fde767 Fix (some) vulnerabilities reported by npm audit Jonas Jenwald 2022-04-17 10:23:09 +02:00
  • bb6bb137cf Remove the web-streams-polyfill Babel-exclusion in gulpfile.js (PR 14560 follow-up) Jonas Jenwald 2022-04-17 10:16:50 +02:00
  • 49d1121f3c Update npm packages Jonas Jenwald 2022-04-17 10:15:10 +02:00
  • f62d961dfe Improve performances with image masks (bug 857031) - it's the second part of the fix for https://bugzilla.mozilla.org/show_bug.cgi?id=857031; - some image masks can be used several times but at different positions; - an image need to be pre-process before to be rendered: * rescale it; * use the fill color/pattern. - the two operations above are time consuming so we can cache the generated canvas; - the cache key is based on the current transform matrix (without the translation part) and the current fill color when it isn't a pattern. - the rendering of the pdf in the above bug is really faster than without this patch. Calixte Denizet 2022-04-13 15:44:33 +02:00
  • d7fd8d3883 Remove some outdated CSS rules related to printing Jonas Jenwald 2022-04-16 16:03:17 +02:00
  • 7023bac8d3 Move the PDFBug-related CSS from viewer.css and into its own file Jonas Jenwald 2022-04-05 18:14:17 +02:00
  • b73a6cc213
    Merge pull request #14785 from Snuffleupagus/core-js-structuredClone-transfers Tim van der Meij 2022-04-16 12:36:44 +02:00
  • 681a9b8927
    Merge pull request #14784 from calixteman/intersect calixteman 2022-04-15 22:38:19 +02:00
  • 7501fe6f30 Improve performance of shared/utils.js::intersect - avoid to call normalizeRect which clones the rectangles: it's useless and time consuming; - in profiling the pdf in bug 1135277, the time spent in intersect drops from ~1s to ~30ms. Calixte Denizet 2022-04-15 18:31:14 +02:00
  • b996e107c3 Update core-js to allow removing a structuredClone work-around Jonas Jenwald 2022-04-15 22:01:51 +02:00
  • fffce7910e
    Merge pull request #14722 from Rob--W/scripting-manager-mousedown-grab-to-pan-conflict Jonas Jenwald 2022-04-15 11:59:18 +02:00
  • 3f5c31e203
    Merge pull request #14780 from Snuffleupagus/rm-CSS-viewport-scale-factor Tim van der Meij 2022-04-14 21:12:29 +02:00
  • c4a9fd635e
    Merge pull request #14773 from Snuffleupagus/rm-dropdownToolbarButton-styling Tim van der Meij 2022-04-14 21:02:57 +02:00
  • 5ca26bcc05
    Merge pull request #14772 from Snuffleupagus/rm-unneeded-CSS Tim van der Meij 2022-04-14 20:57:04 +02:00
  • e9aedf2d91
    Merge pull request #14771 from Snuffleupagus/dialog-backdrop-rm-user-select Tim van der Meij 2022-04-14 20:54:22 +02:00
  • 97377085c1
    Merge pull request #14770 from Snuffleupagus/sidebarContainer-transitionend Tim van der Meij 2022-04-14 20:47:49 +02:00
  • c4336808fe
    Merge pull request #14769 from Snuffleupagus/cleanup-media-840px Tim van der Meij 2022-04-14 20:41:59 +02:00
  • e67cd7fae0 Replace the --viewport-scale-factor CSS variable Jonas Jenwald 2022-04-14 12:43:44 +02:00
  • 11b30c974e Remove some dropdownToolbarButton-related CSS rules Jonas Jenwald 2022-04-12 15:34:24 +02:00
  • 3752b8975b Reduce (some) duplication in the CSS rules for the sidebarViews Jonas Jenwald 2022-04-12 13:47:13 +02:00
  • f788035a58 Remove unnecessary min-width CSS rules Jonas Jenwald 2022-04-12 13:30:37 +02:00
  • 93c5c6e5e9 Use background-color rather than background in a few CSS rules Jonas Jenwald 2022-04-12 12:33:51 +02:00
  • 3aed103ce8 Simplify the dialog::backdrop CSS rules (PR 14710 follow-up) Jonas Jenwald 2022-04-12 11:49:16 +02:00
  • 0fbe5832ab Always remove the sidebarMoving CSS class when the sidebar is closed Jonas Jenwald 2022-04-11 10:28:51 +02:00
  • 0a83538e64 Remove unnecessary @media CSS rules (PR 8993 follow-up) Jonas Jenwald 2022-04-11 10:08:48 +02:00
  • 143ba30bef
    Merge pull request #14767 from Snuffleupagus/fileInput-refactor Tim van der Meij 2022-04-10 15:07:08 +02:00
  • 8f26e70cf1
    Merge pull request #14765 from Snuffleupagus/requestFullscreen-Promise Tim van der Meij 2022-04-10 15:01:08 +02:00
  • cdb3481d6c
    Merge pull request #14764 from apeltop/correct-typos Tim van der Meij 2022-04-10 14:55:08 +02:00
  • 07ac5c337f [GENERIC viewer] Remove some, now unnecessary, checks used with fileInput Jonas Jenwald 2022-04-10 12:50:35 +02:00
  • 2c135b02e0
    Merge pull request #14766 from calixteman/mask2 calixteman 2022-04-09 22:48:28 +02:00
  • 687c9a8710 Improve performance of applyMaskImageData - write some uint32 instead of uint8 to avoid the check before clamping; - unroll the loop to write data in the buffer - but keep a loop for the last element of a line: it likely doesn't hurt that much since it's executed only for one time for each line; - I tested on a macbook with an Apple chip, and on Firefox nightly the new code is almost 3.5x faster than before (~1.8x with Chrome). Calixte Denizet 2022-04-09 20:18:29 +02:00
  • 5390d2b377 [GENERIC viewer] Re-factor the fileInput initialization Jonas Jenwald 2022-04-09 16:30:02 +02:00
  • 08e1abe68e
    Merge pull request #14754 from calixteman/smask calixteman 2022-04-09 20:04:51 +02:00
  • 040fcae5ab Improve performance with image masks (bug 857031) - it aims to partially fix performance issue reported: https://bugzilla.mozilla.org/show_bug.cgi?id=857031; - the idea is too avoid to use byte arrays but use ImageBitmap which are a way faster to draw: * an ImageBitmap is Transferable which means that it can be built in the worker instead of in the main thread: - this is achieved in using an OffscreenCanvas when it's available, there is a bug to enable them for pdf.js: https://bugzilla.mozilla.org/show_bug.cgi?id=1763330; - or in using createImageBitmap: in Firefox a task is sent to the main thread to build the bitmap so it's slightly slower than using an OffscreenCanvas. * it's transfered from the worker to the main thread by "reference"; * the byte buffers used to create the image data have a very short lifetime and ergo the memory used is globally less than before. - Use the localImageCache for the mask; - Fix the pdf issue4436r.pdf: it was expected to have a binary stream for the image; - Move the singlePixel trick from operator_list to image: this way we can use this trick even if it isn't in a set as defined in operator_list. Calixte Denizet 2022-04-06 15:34:08 +02:00
  • bde6d9ffba Re-factor how PDFPresentationMode, internally, tracks the current PresentationModeState Jonas Jenwald 2022-04-09 11:38:05 +02:00
  • 8d61b7c088 Simplify handling of requestFullscreen errors in PDFPresentationMode Jonas Jenwald 2022-04-09 11:25:53 +02:00
  • a97dd26389 Correct typos apeltop 2022-04-09 09:43:18 +09:00
  • 2b673a6941
    Merge pull request #14750 from Snuffleupagus/rm-_getCurrentVisiblePage Tim van der Meij 2022-04-08 20:05:51 +02:00
  • 106b69a101
    Merge pull request #14751 from Snuffleupagus/isLittleEndian-isEvalSupported Tim van der Meij 2022-04-08 20:02:23 +02:00
  • 497c0610cd
    Merge pull request #14761 from Snuffleupagus/viewer-more-optional-chaining Jonas Jenwald 2022-04-07 16:44:08 +02:00
  • bb25b6dec5 Use a bit more optional chaining in the viewer Jonas Jenwald 2022-04-07 16:20:41 +02:00
  • a919959d83 Slightly simplify the Catalog._readMarkInfo method Jonas Jenwald 2022-04-05 16:04:09 +02:00
  • 1dc4713a0b Re-factor the isLittleEndian/isEvalSupported caching Jonas Jenwald 2022-04-05 16:01:01 +02:00
  • 55838303c7 Tweak the pdfOpenParams parameter, in the "updateviewarea" event, in PresentationMode Jonas Jenwald 2022-04-05 13:56:51 +02:00
  • 5ef294b3a7 Remove the BaseViewer._getCurrentVisiblePage helper method Jonas Jenwald 2022-04-05 13:32:09 +02:00
  • 27e738dff9
    Merge pull request #14663 from Snuffleupagus/issue-14525 Jonas Jenwald 2022-04-04 19:10:55 +02:00
  • 45553d60f8
    Merge pull request #14739 from calixteman/14685_fw calixteman 2022-04-03 21:14:17 +02:00
  • f4fcb59a5e Refactor some xfa*** getters in document.js - it's a follow-up of PR #14735. Calixte Denizet 2022-04-01 12:55:28 +02:00
  • 3e50e578c2
    Merge pull request #14745 from Snuffleupagus/debugger-module Tim van der Meij 2022-04-03 14:51:51 +02:00
  • 94e51f9883
    Merge pull request #14744 from timvandermeij/updates Tim van der Meij 2022-04-03 14:44:36 +02:00
  • 8fa73dbfab Convert web/debugger.js to a *basic* module Jonas Jenwald 2022-04-03 11:51:49 +02:00
  • 312595eb47
    Update translations to the most recent versions Tim van der Meij 2022-04-02 16:21:14 +02:00
  • c04373dda2
    Update dependencies to the most recent versions Tim van der Meij 2022-04-02 16:19:17 +02:00
  • 349fc51f2c
    Update GitHub Actions workflow steps to the most recent versions Tim van der Meij 2022-04-02 15:55:47 +02:00
  • 7c8a92da77
    Merge pull request #14742 from Snuffleupagus/debugger-loops Tim van der Meij 2022-04-02 13:52:04 +02:00
  • bc1cde238d Replace most loops in web/debugger.js with for...of loops Jonas Jenwald 2022-04-02 11:53:59 +02:00
  • 38e9a46a85
    Merge pull request #14738 from Snuffleupagus/xfa-datasets-decode Jonas Jenwald 2022-04-01 12:36:57 +02:00
  • f33ce5fc2d Decode non-ASCII values found in the xfa:datasets (PR 14735 follow-up) Jonas Jenwald 2022-04-01 11:50:18 +02:00
  • b0ec83262b
    Merge pull request #14734 from Snuffleupagus/setAttribute-string-conversion Jonas Jenwald 2022-04-01 11:38:02 +02:00
  • 36a289d747
    Merge pull request #14735 from calixteman/14685 Jonas Jenwald 2022-04-01 11:30:16 +02:00
  • 0b597304c1 [Annotations] Some annotations can have their values stored in the xfa:datasets - it aims to fix #14685; - add a basic object to get values from the parsed datasets; - these annotations don't have an appearance so we must create one when printing or saving. Calixte Denizet 2022-03-31 19:18:30 +02:00
  • 966da4babe [GENERIC viewer] Try to improve a11y, for search results, in the findbar (issue 14525) Jonas Jenwald 2022-03-31 23:12:56 +02:00
  • f1b17773c0 Don't manually convert setAttribute values to strings (PR 14554 follow-up) Jonas Jenwald 2022-03-31 17:26:28 +02:00
  • 54d4d345d3
    Merge pull request #14733 from Snuffleupagus/String-repeat Jonas Jenwald 2022-03-30 16:34:10 +02:00
  • addb4cb12b Use String.prototype.repeat() in a couple of spots Jonas Jenwald 2022-03-30 15:38:07 +02:00
  • d6592b5e37
    Merge pull request #14710 from Snuffleupagus/overlays-dialog Jonas Jenwald 2022-03-30 11:47:36 +02:00
  • 4d4c67dd6e
    Merge pull request #14720 from calixteman/12189 calixteman 2022-03-30 11:12:21 +02:00
  • ad3fb71a02 [Annotations] Add support for printing/saving choice list with multiple selections - it aims to fix issue #12189. Calixte Denizet 2022-03-26 22:45:50 +01:00
  • c9f262c480 Add a <dialog> polyfill for the generic-legacy build Jonas Jenwald 2022-03-25 14:10:33 +01:00
  • b3d58e1000 Try to improve a11y for the PasswordPrompt and PDFDocumentProperties dialogs Jonas Jenwald 2022-03-25 14:10:28 +01:00
  • 923bd52cdb Re-factor the OverlayManager class to use a WeakMap internally Jonas Jenwald 2022-03-25 14:10:22 +01:00
  • f0aa08b464 Convert the existing overlays to use <dialog> elements (issue 14698) Jonas Jenwald 2022-03-25 14:10:13 +01:00
  • dc6e2ed6f8 PDFScriptingManager: Bind mousedown listener with capture=true Rob Wu 2022-03-28 02:34:00 +02:00
  • 0dd6bc9a85
    Merge pull request #14703 from calixteman/14627 Jonas Jenwald 2022-03-27 15:20:19 +02:00
  • 18e79e3c0b [text selection] Add the whitespaces present in the pdf in the text chunk - it aims to fix issue #14627; - the basic idea of the recent text refactoring was to only consider the rendered visible whitespaces. But sometimes, the heuristics aren't correct and although some whitespaces are in the text stream they weren't in the text chunks because they were too small. Hence we added some exceptions, for example, we always add a whitespace when it is between two non-whitespace chars but only when in the same Tj. So basically, this patch removes the constraint to have the chars in the same Tj (in using a circular buffer to save the two last chars) but don't add a space when the visible space is really too small (hence NOT_A_SPACE_FACTOR). Calixte Denizet 2022-03-21 22:10:46 +01:00
  • 20d60d92ba
    Merge pull request #14715 from Snuffleupagus/issue-13230 Tim van der Meij 2022-03-27 14:22:35 +02:00
  • 973b92060c
    Merge pull request #14717 from Snuffleupagus/issue-14716 Tim van der Meij 2022-03-27 14:09:36 +02:00
  • d4714b3043
    Merge pull request #14693 from Snuffleupagus/CSS-dir-factor Tim van der Meij 2022-03-27 14:07:24 +02:00
  • 7f0589c74a Change the type of the container property, in the TextLayerRenderParameters typedef (issue 14716) Jonas Jenwald 2022-03-24 22:33:11 +01:00
  • fd6e2e2ab3 Avoid the textLayer becoming visible in high contrast mode (issue 13230) Jonas Jenwald 2022-03-24 14:13:57 +01:00
  • f8d60da94e Remove the remaining dir-dependent CSS rules Jonas Jenwald 2022-03-19 16:56:47 +01:00
  • db4f3adc5e
    Merge pull request #14691 from Snuffleupagus/border-inline Tim van der Meij 2022-03-23 20:43:15 +01:00
  • a3e34002cb
    Merge pull request #14699 from Snuffleupagus/getDocument-validation Tim van der Meij 2022-03-23 20:41:05 +01:00
  • 30612d2f4e
    Merge pull request #14704 from Snuffleupagus/OverlayManager-private Tim van der Meij 2022-03-23 20:38:05 +01:00
  • cd133dbcac Change OverlayManager.open to always error if the overlay is already active Jonas Jenwald 2022-03-22 09:50:28 +01:00
  • bace0623e5 Convert the OverlayManager class to use private fields/methods Jonas Jenwald 2022-03-21 16:01:32 +01:00
  • 849de5a508 Slightly improve validation of (some) parameters in getDocument Jonas Jenwald 2022-03-21 12:55:54 +01:00