Skip to content

Commits

Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Oct 7, 2023

  1. Merge pull request #17090 from timvandermeij/autoprint-intermittent

    Activate the selector check for the `autoprint` integration test as soon as possible
    timvandermeij committed Oct 7, 2023
    Copy the full SHA
    60a458d View commit details
    Browse the repository at this point in the history
  2. Activate the selector check for the autoprint integration test as s…

    …oon as possible
    
    The Windows bot is usually slower than the Linux bot, and therefore
    text layer rendering is as well. However, the `autoprint` test awaited
    text layer rendering to complete before activating the selector check,
    which makes it timing-sensitive and causes it to never resolve because
    the page is already printed (and the printed page div removed) by then.
    
    This commit should fix the issue by activating the selector check as
    soon as possible, namely as soon as the viewer appears, which should
    ensure we're always registering the selector check in time because we're
    doing it even before rendering is starting.
    timvandermeij committed Oct 7, 2023
    Copy the full SHA
    2c1d95b View commit details
    Browse the repository at this point in the history
  3. Merge pull request #17086 from Snuffleupagus/rm-structuredClone-polyfill

    [api-minor] Stop polyfilling `structuredClone` in legacy builds
    timvandermeij committed Oct 7, 2023
    Copy the full SHA
    f2c9b64 View commit details
    Browse the repository at this point in the history
  4. [api-minor] Stop polyfilling structuredClone in legacy builds

    Comparing the currently supported browsers/environments, see [the FAQ](https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support) and the [MDN compatibility data](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone#browser_compatibility), the `structuredClone` polyfill is *only* needed in Google Chrome versions < 98. Because of some limitations in the core-js polyfill we're currently forced to special-case the `transfer` handling to prevent bugs, and it'd be nice to avoid that.
    
    Note that `structuredClone`, with transfers, is only used in two spots:
     - The `LoopbackPort` class, which is only used with fake workers. Given that fake workers should *never* be used in browsers, breaking that edge-case in older Google Chrome versions seem fine.
     - The `AnnotationStorage` class, when Stamp-annotations have been added to the document. Given that Google Chrome isn't the main focus of development, breaking *part* of the editing-functionality in older Google Chrome versions should hopefully be acceptable.
    Snuffleupagus committed Oct 7, 2023
    Copy the full SHA
    8bd3cc0 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #17080 from Snuffleupagus/scripting-module

    Output `pdf.scripting.js` as a JavaScript module (PR 17055 follow-up)
    Snuffleupagus committed Oct 7, 2023
    Copy the full SHA
    e6c3257 View commit details
    Browse the repository at this point in the history
  6. Output pdf.scripting.js as a JavaScript module (PR 17055 follow-up)

    To avoid problems with `export` statements in the QuickJS Javascript Engine, we can work-around that by *explicitly* exposing `pdfjsScripting` globally instead.
    Snuffleupagus committed Oct 7, 2023
    Copy the full SHA
    4b489cd View commit details
    Browse the repository at this point in the history
  7. Merge pull request #17055 from Snuffleupagus/output-modules

    [api-major] Output JavaScript modules in the builds (issue 10317)
    timvandermeij committed Oct 7, 2023
    Copy the full SHA
    bab4c7f View commit details
    Browse the repository at this point in the history
  8. Merge pull request #17077 from Snuffleupagus/css-rm-unneeded-alpha

    Remove unnecessary alpha-value from CSS `rgb` colors
    timvandermeij committed Oct 7, 2023
    Copy the full SHA
    89d8c63 View commit details
    Browse the repository at this point in the history
  9. [api-major] Output JavaScript modules in the builds (issue 10317)

    At this point in time all browsers, and also Node.js, support standard `import`/`export` statements and we can now finally consider outputting modern JavaScript modules in the builds.[1]
    
    In order for this to work we can *only* use proper `import`/`export` statements throughout the main code-base, and (as expected) our Node.js support made this much more complicated since both the official builds and the GitHub Actions-based tests must keep working.[2]
    One remaining issue is that the `pdf.scripting.js` file cannot be built as a JavaScript module, since doing so breaks PDF scripting.
    
    Note that my initial goal was to try and split these changes into a couple of commits, however that unfortunately didn't really work since it turned out to be difficult for smaller patches to work correctly and pass (all) tests that way.[3]
    This is a classic case of every change requiring a couple of other changes, with each of those changes requiring further changes in turn and the size/scope quickly increasing as a result.
    
    One possible "issue" with these changes is that we'll now only output JavaScript modules in the builds, which could perhaps be a problem with older tools. However it unfortunately seems far too complicated/time-consuming for us to attempt to support both the old and modern module formats, hence the alternative would be to do "nothing" here and just keep our "old" builds.[4]
    
    ---
    [1] The final blocker was module support in workers in Firefox, which was implemented in Firefox 114; please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#browser_compatibility
    
    [2] It's probably possible to further improve/simplify especially the Node.js-specific code, but it does appear to work as-is.
    
    [3] Having partially "broken" patches, that fail tests, as part of the commit history is *really not* a good idea in general.
    
    [4] Outputting JavaScript modules was first requested almost five years ago, see issue 10317, and nowadays there *should* be much better support for JavaScript modules in various tools.
    Snuffleupagus committed Oct 7, 2023
    Copy the full SHA
    927e50f View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2023

  1. [api-major] Remove the fallbackWorkerSrc functionality in browsers

    The user should *always* provide a correct `GlobalWorkerOptions.workerSrc` value when using the PDF.js library in browser environments. Note that the fallback:
     - Has been deprecated ever since PR 11418, first released in version `2.4.456` over three years ago.
     - Was always a best-effort solution, with no guarantees that it'd actually work correctly.
     - With upcoming changes, w.r.t. outputting JavaScript modules, it'd now be more diffiult to determine the correct value.
    Snuffleupagus committed Oct 6, 2023
    Copy the full SHA
    0a970ee View commit details
    Browse the repository at this point in the history
  2. [api-minor] Stop building a minified default viewer

    The minified default viewer has never been distributed in either official releases or through pdfjs-dist, which means that it's most likely unused, and it's has never been tested nor actively maintained.
    Snuffleupagus committed Oct 6, 2023
    Copy the full SHA
    8158628 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #16761 from calixteman/editor_add_new_with_keyboard

    [Editor] Add the possibility to create a new editor in using the keyboard (bug 1853424)
    calixteman committed Oct 6, 2023
    Copy the full SHA
    905ad1f View commit details
    Browse the repository at this point in the history
  4. Remove unnecessary alpha-value from CSS rgb colors

    Setting the alpha-value explicitly to `1` in `rgb` colors is unnecessary, since that's the default value, and this way we ever so slightly reduce the size of our CSS files.
    Unfortunately I've not found a Stylelint rule to enforce this automatically, and the patch was generated using search and replace.
    Snuffleupagus committed Oct 6, 2023
    Copy the full SHA
    4ebddcb View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2023

  1. [Editor] Add the possibility to create a new editor in using the keyb…

    …oard (bug 1853424)
    
    When an editing button is disabled, focused and the user press Enter (or space), an
    editor is automatically added at the center of the current page.
    Next creations can be done in using the same keys within the focused page.
    calixteman committed Oct 5, 2023
    Copy the full SHA
    ea5eafa View commit details
    Browse the repository at this point in the history
  2. Merge pull request #17074 from calixteman/issue17071

    Make the toolbar buttons usable with keyboard when Page Fit is used
    calixteman committed Oct 5, 2023
    Copy the full SHA
    2453b79 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #17076 from Snuffleupagus/stylelint-color-rules

    Enable some Stylelint color-related rules to slightly reduce file sizes
    Snuffleupagus committed Oct 5, 2023
    Copy the full SHA
    3747c02 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    3263fd0 View commit details
    Browse the repository at this point in the history
  5. Enable some Stylelint color-related rules to slightly reduce file sizes

     - Use a consistent format for all alpha-values (this rule didn't require any code changes); see https://stylelint.io/user-guide/rules/alpha-value-notation
     - Use modern and slightly shorter color notation, since [according to MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb#browser_compatibility) that should be supported "everywhere" nowadays; see https://stylelint.io/user-guide/rules/color-function-notation/
     - Use "short" hexadecimal colors whenever possible; see https://stylelint.io/user-guide/rules/color-hex-length/
     - Help avoid adding broken hexadecimal colors (this rule didn't require any code changes); see https://stylelint.io/user-guide/rules/color-no-invalid-hex/
    Snuffleupagus committed Oct 5, 2023
    Copy the full SHA
    4277205 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #17075 from calixteman/issue17069_followup

    Add a HTML containter for locked FreeText annotations in order to be able to display a popup (follow-up of #17070)
    calixteman committed Oct 5, 2023
    Copy the full SHA
    a60f90a View commit details
    Browse the repository at this point in the history
  7. Add a HTML containter for locked FreeText annotations in order to be …

    …able to display a popup (follow-up iof #17070)
    calixteman committed Oct 5, 2023
    Copy the full SHA
    e737638 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #17070 from calixteman/17069

    Update the noHTML flag to take into account the hasOwnCanvas one (fixes #17069)
    calixteman committed Oct 5, 2023
    Copy the full SHA
    c4c24c6 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2023

  1. Merge pull request #17072 from calixteman/resizer_role

    [Editor] Add role=spinbutton to resizers when they're used with the keyboard
    calixteman committed Oct 4, 2023
    Copy the full SHA
    66c3b23 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    335cea2 View commit details
    Browse the repository at this point in the history
  3. Update the noHTML flag to take into account the hasOwnCanvas one (fixes

    #17069)
    
    When an element has the hasOwnCanvas flag we must have an HTML container to attach
    the canvas where the element will be rendered.
    So the noHTML flag must take this information into account:
     - in some cases the noHTML flag is resetted depending on the hasOwnCanvas value;
     - in some others, the hasOwnCanvas flag is set depending on the value of noHTML.
    calixteman committed Oct 4, 2023
    Copy the full SHA
    40b1d92 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #17062 from calixteman/resize_keyboard

    [Editor] Support resizing editors with the keyboard (bug 1854340)
    calixteman committed Oct 4, 2023
    Copy the full SHA
    40d6b0e View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    05ca3fd View commit details
    Browse the repository at this point in the history
  6. Merge pull request #17060 from Snuffleupagus/issue-17056

    Add support for "GoToE" actions with destinations (issue 17056)
    Snuffleupagus committed Oct 4, 2023
    Copy the full SHA
    c377f2d View commit details
    Browse the repository at this point in the history
  7. Add support for "GoToE" actions with destinations (issue 17056)

    This shouldn't be very common in practice, since "GoToE" actions themselves seem quite uncommon; see PR 15537.
    Snuffleupagus committed Oct 4, 2023
    Copy the full SHA
    bf9c33e View commit details
    Browse the repository at this point in the history
  8. Merge pull request #17063 from Snuffleupagus/version-4

    Bump library version to `4.0`
    Snuffleupagus committed Oct 4, 2023
    Copy the full SHA
    da4fdc7 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. Merge pull request #17067 from calixteman/issue17065

    Compute correctly the bounding box of a transformed rectangle (fixes #17065)
    calixteman committed Oct 3, 2023
    Copy the full SHA
    0e6d0ca View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    1be9bbd View commit details
    Browse the repository at this point in the history
  3. Merge pull request #17066 from Snuffleupagus/issue-17064

    Ensure that readonly TextWidget-annotations are rendered when forms are disabled (issue 17064)
    Snuffleupagus committed Oct 3, 2023
    Copy the full SHA
    4245d87 View commit details
    Browse the repository at this point in the history
  4. Ensure that readonly TextWidget-annotations are rendered when forms a…

    …re disabled (issue 17064)
    
    To reduced the risk of regressing something else, given that the issue only applies to a (for the default viewer) non-default configuration, this patch is purposely limited to only TextWidget-annotations in the display layer.
    Snuffleupagus committed Oct 3, 2023
    Copy the full SHA
    f113320 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    9cca13b View commit details
    Browse the repository at this point in the history
  6. Merge pull request #16699 from Snuffleupagus/rm-svg

    [api-major] Remove the SVG back-end (PR 15173 follow-up)
    Snuffleupagus committed Oct 3, 2023
    Copy the full SHA
    426209c View commit details
    Browse the repository at this point in the history
Older