Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Allow custom search for pdf.js embedder #2

Draft
wants to merge 210 commits into
base: master
Choose a base branch
from

Commits on Jun 18, 2024

  1. Configuration menu
    Copy the full SHA
    c77dbe0 View commit details
    Browse the repository at this point in the history
  2. Upgrade eslint-plugin-unicorn to version 54.0.0

    This is a major version bump, but the changelog at
    https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v54.0.0
    doesn't indicate any breaking changes that should impact us.
    timvandermeij committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    58dd289 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Configuration menu
    Copy the full SHA
    390afcb View commit details
    Browse the repository at this point in the history
  2. Update the regular expression in tweakWebpackOutput to support mini…

    …fied-legacy builds (issue 18290)
    Snuffleupagus committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    df058ed View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18284 from calixteman/editor_signal

    [Editor] Remove the various listeners when destroying the editor manager
    calixteman authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    c53f71a View commit details
    Browse the repository at this point in the history
  4. Add a new helper, in the viewer, to close everything during testing

    This has two advantages, as far as I'm concerned:
     - The tests don't need to manually invoke multiple functions to properly clean-up, which reduces the risk of missing something.
     - By collecting all the relevant clean-up in one method, rather than spreading it out, we get a much better overview of exactly what is being reset.
    Snuffleupagus committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    c771ac8 View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18278 from timvandermeij/updates

    Update dependencies to the most recent versions and upgrade `eslint-plugin-unicorn` to version 54.0.0
    timvandermeij authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    764e67e View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18292 from Snuffleupagus/tweakWebpackOutpu…

    …t-improve-regex
    
    Update the regular expression in `tweakWebpackOutput` to support minified-legacy builds (issue 18290)
    timvandermeij authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    b7d194f View commit details
    Browse the repository at this point in the history
  7. Add test for CSS-only zoom above maxCanvasPixels

    This commit introduces a test to ensure that:
    - When zooming below the maxCanvasPixels limit, the canvas is rendered
      with the correct size (the two sides are multiplied by the zoom factor).
    - When zooming above the maxCanvasPixels limit, the canvas size is capped.
    nicolo-ribaudo committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    12692d2 View commit details
    Browse the repository at this point in the history
  8. Respect maxCanvasPixels when computing canvas dimensions

    Ensure that we never round the canvas dimensions above `maxCanvasPixels`
    by rounding them to the preceeding multiple of the display ratio rather
    than the succeeding one.
    nicolo-ribaudo committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    de23bb9 View commit details
    Browse the repository at this point in the history
  9. Merge pull request mozilla#18289 from Snuffleupagus/app-testingClose

    Add a new helper, in the viewer, to close everything during testing
    Snuffleupagus authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    94cbe9e View commit details
    Browse the repository at this point in the history
  10. Merge pull request mozilla#18218 from nicolo-ribaudo/test-maxCanvasPi…

    …xels
    
    Respect `maxCanvasPixels` when computing canvas dimensions
    timvandermeij authored Jun 19, 2024
    Configuration menu
    Copy the full SHA
    3e1d779 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Configuration menu
    Copy the full SHA
    7d7ae34 View commit details
    Browse the repository at this point in the history
  2. Close PDFFindBar when closing the viewer during testing

    By closing `PDFFindBar` we also disconnect the `ResizeObserver`, since we've seen at least one case where that's running during shutdown: http://54.193.163.58:8877/91c40554d1b07c0/output.txt
    Snuffleupagus committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    02c0315 View commit details
    Browse the repository at this point in the history
  3. Don't throw if there's not enough data to get the header in `FlateStr…

    …eam` (issue 18298)
    
    Following in the footsteps of PR 17340.
    Snuffleupagus committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    3fae2d7 View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18301 from calixteman/no_signal

    [Editor] Don't create an observer for the stamp annotation after the viewer has been closed
    calixteman authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    9afd3a5 View commit details
    Browse the repository at this point in the history
  5. [Editor] Correctly set the accessibility data when copying & pasting …

    …a stamp with an alt text (bug 1903589)
    calixteman committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    67f9756 View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18304 from Snuffleupagus/issue-18298

    Don't throw if there's not enough data to get the header in `FlateStream` (issue 18298)
    Snuffleupagus authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    e76242d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8c9a665 View commit details
    Browse the repository at this point in the history
  8. Merge pull request mozilla#18296 from calixteman/bug1903589

    [Editor] Correctly set the accessibility data when copying & pasting a stamp with an alt text (bug 1903589)
    calixteman authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    d09aed8 View commit details
    Browse the repository at this point in the history
  9. Merge pull request mozilla#18302 from Snuffleupagus/testingClose-find…

    …bar-close
    
    Close `PDFFindBar` when closing the viewer during testing
    timvandermeij authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    1cf19e9 View commit details
    Browse the repository at this point in the history
  10. Merge pull request mozilla#18306 from calixteman/bug1903731

    Always use DW if it's a number for the font default width (bug 1903731)
    calixteman authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    a081dd2 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. Expose entireWord in updateFindControlState

    Allow apps with supportsIntegratedFind to better monitor the find state.
    
    A recognized use case is the Firefox findbar, its "not found" sound must
    consider `entireWord` and only make noise when it is off.
    
    See related implementation in
    https://hg.mozilla.org/mozilla-central/rev/16b902cbcf26
    
    This change can help if we have to move the implementation from cpp to jsm.
    bootleq committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    890c567 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1480e67 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18308 from nicolo-ribaudo/patch-1

    Use the new formatted issue templates
    timvandermeij authored Jun 21, 2024
    Configuration menu
    Copy the full SHA
    ba0e732 View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18303 from bootleq/findbar-state-entire-word

    Expose entireWord in updateFindControlState
    timvandermeij authored Jun 21, 2024
    Configuration menu
    Copy the full SHA
    f9ff613 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3b9208b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a89c700 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2024

  1. Try to shutdown Fluent "more" when closing the viewer during testing

    Even with PR 18280 fixed, we still *occasionally* see l10n-related errors when closing the integration-tests on the bots.
    Snuffleupagus committed Jun 22, 2024
    Configuration menu
    Copy the full SHA
    6492587 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18312 from timvandermeij/updates

    Update dependencies and translations to the most recent versions
    timvandermeij authored Jun 22, 2024
    Configuration menu
    Copy the full SHA
    658b5fa View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18313 from Snuffleupagus/l10n-destroy

    Try to shutdown Fluent "more" when closing the viewer during testing
    timvandermeij authored Jun 22, 2024
    Configuration menu
    Copy the full SHA
    c18a987 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2024

  1. Disable system addon updates for Firefox in testing mode

    This commit fixes the following log line that currently shows up for
    every type of tests that involve a browser:
    
    `System addon update list error SyntaxError: XMLHttpRequest.open:
    'http://%(server)s/dummy-system-addons.xml' is not a valid URL.`
    
    If Firefox is in testing mode, the system addons update URL is
    configured to a dummy URL so that it can't actually update (see for
    example the same value in Marionette at
    https://searchfox.org/mozilla-central/source/testing/marionette/client/marionette_driver/geckoinstance.py#109),
    but this doesn't stop Firefox from trying to update, and when it does
    it logs this line because the URL is obviously invalid.
    
    Hence this patch which disables system addon updates altogether so
    Firefox doesn't attempt to use the dummy URL anymore. The browser
    updates are all managed by Puppeteer, and regular updates have already
    been disabled too (see
    https://github.com/puppeteer/puppeteer/blob/6937a76f0a442eca0c6381587b47298793798913/packages/browsers/src/browser-data/firefox.ts#L302-L303).
    timvandermeij committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    327738d View commit details
    Browse the repository at this point in the history
  2. Close the page in the text layer caret selection integration test

    This integration test is currently the only one that spawns a separate
    browser instance. However, while it closes the browser once it's done,
    it doesn't close the page (and therefore doesn't call the `testingClose`
    method) like the other integration tests do.
    
    This commit fixes this difference by closing the page before closing the
    browser, thereby ensuring all regular cleanup logic gets called and we
    avoid (intermittent) shutdown tracebacks in the logs. This allows
    upcoming integration tests that spawn a separate browser instance to
    reuse this pattern to cleanly end the test.
    
    Given that we integrate the `closeSinglePage` code from mozilla#17962 for this
    patch, @calixteman is credited as the co-author.
    
    Co-authored-by: Calixte Denizet <calixte.denizet@gmail.com>
    timvandermeij and calixteman committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    f4053c2 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18316 from timvandermeij/integration-test-…

    …addons-xpi
    
    Disable system addon updates for Firefox in testing mode
    timvandermeij authored Jun 23, 2024
    Configuration menu
    Copy the full SHA
    7057142 View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18317 from timvandermeij/integration-test-…

    …separate-browser-cleanup
    
    Close the page in the text layer caret selection integration test
    timvandermeij authored Jun 23, 2024
    Configuration menu
    Copy the full SHA
    b4393a7 View commit details
    Browse the repository at this point in the history
  5. Fix the "copy/paste from a tab to an other" stamp editor integration …

    …test
    
    This integration test contains three issues:
    
    - The `page.bringToFront()` call is not awaited, even though it returns
      a promise (see https://pptr.dev/api/puppeteer.page.bringtofront). Note
      that in other tests we do this correctly already.
    - The `page.waitForSelector()` call at the end is unnecessary because
      that exact condition is already checked at the end of the
      `waitForImage` function we call just before this line; see
      https://github.com/mozilla/pdf.js/blob/master/test/integration/stamp_editor_spec.mjs#L74.
    - The pages should be closed in reversed order; please refer to the
      description in mozilla#18318 for more details.
    
    Fixes mozilla#18318.
    timvandermeij committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    287fd6a View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18320 from timvandermeij/integration-test-…

    …tabs
    
    Fix the "copy/paste from a tab to an other" stamp editor integration test
    timvandermeij authored Jun 23, 2024
    Configuration menu
    Copy the full SHA
    6784124 View commit details
    Browse the repository at this point in the history
  7. Don't ignore errors in the Jasmine suite start/end stages

    Currently errors in `afterAll` are logged, but don't fail the tests.
    This could cause new errors during test teardown to go by unnoticed.
    
    Moreover, the integration test use a different reporting mechanism which
    also handled errors differently (this is extra reason to do mozilla#12730).
    
    This patch fixes the issues by consistently handling errors in
    `suiteStarted` and `suiteDone` in both reporting mechanisms.
    
    Fixes mozilla#18319.
    timvandermeij committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    2f3bf6f View commit details
    Browse the repository at this point in the history
  8. Include a security policy for PDF.js

    This makes sure that security researchers can find the required
    information for reporting security vulnerabilities in a standardized
    manner across GitHub repositories. Please refer to
    https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository
    for more information.
    timvandermeij committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    2beae7a View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Merge pull request mozilla#18321 from timvandermeij/integration-test-…

    …ignored-errors
    
    Don't ignore errors in the Jasmine suite start/end stages
    timvandermeij authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    8923f9a View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18311 from timvandermeij/security-policy

    Include a security policy for PDF.js
    timvandermeij authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    8123719 View commit details
    Browse the repository at this point in the history
  3. Improve the security policy

    This commit fixes two issues that have been found after commit 2beae7a
    landed, namely:
    
    - The security checkbox image is not rendering at
      https://github.com/mozilla/pdf.js/security/policy because the
      `SECURITY.md` file is apparently served differently there (because it
      does work as expected at
      https://github.com/mozilla/pdf.js/blob/master/.github/SECURITY.md),
      which causes the relative link not to work. We switch to an absolute
      link to fix the issue.
    - If a security policy is defined it turns out that GitHub automatically
      adds a row to the "New issue" page; see
      https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository
      where it states "When someone creates an issue in your repository, they
      will see a link to your project's security policy". Since we now have
      two rows at https://github.com/mozilla/pdf.js/issues/new/choose about
      the security policy, we remove our own version in favor of the
      standard GitHub-provided one.
    timvandermeij committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    4033913 View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18323 from timvandermeij/security-followup

    Improve the security policy
    timvandermeij authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    e16707d View commit details
    Browse the repository at this point in the history
  5. Fix the computation of unitsPerEm when the fontMatrix has some negati…

    …ve coefficients
    
    It's a follow-up of mozilla#18253.
    calixteman committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    42bb2b0 View commit details
    Browse the repository at this point in the history
  6. Fix the timeout logic in the waitForEvent integration test helper f…

    …unction
    
    Debugging mozilla#17931, by printing all parts of the event lifecycle including
    timestamps, uncovered that some events for which a timeout was logged
    actually did get triggered correctly in the browser. Going over the code
    and discovering https://stackoverflow.com/questions/47107465/puppeteer-how-to-listen-to-object-events#comment117661238_65534026
    showed what went wrong: if the event we wait for is triggered then
    `Promise.race` resolves, but that doesn't automatically cancel the
    timeout. The tests didn't fail on this because `Promise.race` resolved
    correctly, but slightly later once the timeout was reached we would see
    spurious log lines about timeouts for the already-triggered events.
    
    This commit fixes the issue by canceling the timeout if the event we're
    waiting for has triggered.
    timvandermeij committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    51dcd6a View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Merge pull request mozilla#18324 from calixteman/bug1539074_1

    Fix the computation of unitsPerEm when the fontMatrix has some negative coefficients
    calixteman authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    4899b2e View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18325 from timvandermeij/integration-test-…

    …timeouts
    
    Fix the timeout logic in the `waitForEvent` integration test helper function
    timvandermeij authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    4b95d68 View commit details
    Browse the repository at this point in the history
  3. Use waitForEvent in the pasteFromClipboard integration test helpe…

    …r function
    
    This code contains the same bug that the previous commit fixed in
    `waitForEvent`, namely that we don't clear the timeout if the event
    is triggered. By using the now fixed `waitForEvent` function we not
    only deduplicate this code but we also fix this issue so that no
    incorrect timeout logs show up anymore.
    timvandermeij committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f974b75 View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18326 from timvandermeij/integration-test-…

    …pastefromclipboard
    
    Use `waitForEvent` in the `pasteFromClipboard` integration test helper function
    timvandermeij authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    5885874 View commit details
    Browse the repository at this point in the history
  5. Overrride the minimum font size when rendering the text layer

    Browsers have an accessibility option that allows user to enforce
    a minimum font size for all text rendered in the page, regardless
    of what the font-size CSS property says. For example, it can be
    found in Firefox under `font.minimum-size.x-western`.
    
    When rendering the <span>s in the text layer, this causes the
    text layer to not be aligned anymore with the underlying canvas.
    While normally accessibility features should not be worked around,
    in this case it is *not* improving accessibility:
    - the text is transparent, so making it bigger doesn't make it more
      readable
    - the selection UX for users with that accessibility option enabled
      is worse than for other users (it's basically unusable).
    
    While there is tecnically no way to ignore that minimum font size,
    this commit does it by multiplying all the `font-size`s in the text
    layer by minFontSize, and then scaling all the `<span>`s down by
    1/minFontSize.
    nicolo-ribaudo committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    5b29e93 View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18283 from nicolo-ribaudo/ignore-browser-m…

    …in-font-size
    
    Override the minimum font size when rendering the text layer
    timvandermeij authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    11cb3a8 View commit details
    Browse the repository at this point in the history
  7. Remove the requestAnimationFrame work-around in `L10n.prototype.des…

    …troy` (PR 18313 follow-up)
    
    With `@fluent/dom 0.10.0` just published this work-around is no longer necessary.
    Snuffleupagus committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f676ce5 View commit details
    Browse the repository at this point in the history
  8. Merge pull request mozilla#18333 from Snuffleupagus/l10n-destroy-rm-r…

    …equestAnimationFrame
    
    Remove the `requestAnimationFrame` work-around in `L10n.prototype.destroy` (PR 18313 follow-up)
    Snuffleupagus authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    7f58618 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    35474f8 View commit details
    Browse the repository at this point in the history
  10. Merge pull request mozilla#18332 from calixteman/bug1904585

    Add the possibility to dispatch some pdf.js events at the chrome level (bug 1904585)
    calixteman authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    2fbd619 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. Refactor the copy/paste logic in the integration tests

    The integration tests are currently not consistent in how they do
    copy/pasting: some tests use the `kbCopy`/`kbPaste` functions with
    waiting for the event inline, some have their own helper function to
    combine those actions and some even call `kbCopy`/`kbPaste` without
    waiting for the event at all (which can cause intermittent failures).
    
    This commit fixes the issues by providing a set of four helper functions
    that all tests use and that abstract e.g. waiting for the event away
    from the caller. This makes the invididual tests simpler and consistent,
    reduces code duplication and fixes possible intermittent failures
    due to not waiting for events to trigger.
    timvandermeij committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    55ba4aa View commit details
    Browse the repository at this point in the history
  2. Fix a race condition involving the waitForEvent integration test he…

    …lper function
    
    Debugging mozilla#17931 uncovered a race condition in the way we use the
    `waitForEvent` function. Currently the following happens:
    
    1. We call `waitForEvent`, which starts execution of the function body
       and immediately returns a promise.
    2. We do the action that triggers the event.
    3. We await the promise, which resolves if the event is triggered or
       the timeout is reached.
    
    The problem is in step 1: function body execution has started, but not
    necessarily completed. Given that we don't await the promise, we
    immediately trigger step 2 and it's not unlikely that the event we
    trigger arrives before the event listener is actually registered in the
    function body of `waitForEvent` (which is slower because it needs to be
    evaluated in the page context and there is some other logic before the
    actual `addEventListener` call).
    
    This commit fixes the issue by passing the action to `waitForEvent` as
    a callback so `waitForEvent` itself can call it once it's safe to do so.
    This should make sure that we always register the event listener before
    triggering the event, and because we shouldn't miss events anymore we
    can also remove the retry logic for pasting.
    timvandermeij committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7128b95 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18331 from timvandermeij/integration-test-…

    …copy-pasting
    
    Refactor the copy/paste logic in the integration tests and fix a race condition involving the `waitForEvent` integration test helper function
    timvandermeij authored Jun 26, 2024
    Configuration menu
    Copy the full SHA
    6d57908 View commit details
    Browse the repository at this point in the history
  4. Cancel the requestAnimationFrame in the watchScroll helper (PR 18…

    …193 follow-up)
    
    While the event listener is removed during testing, the `requestAnimationFrame` isn't cancelled and that occasionally shows up when the integration-tests are run on the bots.
    Snuffleupagus committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    4dad1e3 View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18335 from Snuffleupagus/watchScroll-cance…

    …lAnimationFrame
    
    Cancel the `requestAnimationFrame` in the `watchScroll` helper (PR 18193 follow-up)
    timvandermeij authored Jun 26, 2024
    Configuration menu
    Copy the full SHA
    af16aa6 View commit details
    Browse the repository at this point in the history
  6. Cancel the requestAnimationFrame in the API when cancelling rendering

    Errors related to this `requestAnimationFrame` show up intermittently when running the integration-tests on the bots, however I've been unable to reproduce it locally.
    Hence I cannot guarantee that it's enough to fix the timing issues, however this should be generally safe since the `requestAnimationFrame` invokes the `_next`-method and the first thing that one does is check that rendering hasn't been cancelled.
    Snuffleupagus committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a4f1a9a View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Fix intermittent failures with freetext and stamp tests

    They're potentially due to some concurrent access to the system clipboard.
    So this patch makes them sequential.
    calixteman committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    0e94f2b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f006aa3 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18336 from Snuffleupagus/InternalRenderTas…

    …k-cancel-cancelAnimationFrame
    
    Cancel the `requestAnimationFrame` in the API when cancelling rendering
    timvandermeij authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    53aca5f View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18339 from calixteman/add_port_option

    Add a port option to gulp server
    calixteman authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    abdc3fa View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18338 from calixteman/fix_stamp_test

    Fix intermittent failures with freetext and stamp tests
    calixteman authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    a609bd8 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2024

  1. Configuration menu
    Copy the full SHA
    4d91ae3 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18341 from calixteman/issue17779_not_in_talos

    Ignore test issue17779.pdf in talos because it times out
    calixteman authored Jun 28, 2024
    Configuration menu
    Copy the full SHA
    8709202 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dacf8bb View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18345 from calixteman/issue18305

    Take into account PageOpen and PageClose actions which are present in some fields
    calixteman authored Jun 28, 2024
    Configuration menu
    Copy the full SHA
    fb3a4e4 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2024

  1. Configuration menu
    Copy the full SHA
    046e281 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2024

  1. Merge pull request mozilla#18346 from Snuffleupagus/webserver-dev-note

    Add a comment about `test/webserver.mjs` being development-only code
    timvandermeij authored Jun 30, 2024
    Configuration menu
    Copy the full SHA
    40b0c84 View commit details
    Browse the repository at this point in the history
  2. [api-minor] Remove the deprecated renderTextLayer and `updateTextLa…

    …yer` functions (PR 18104 follow-up)
    Snuffleupagus committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    f3d177e View commit details
    Browse the repository at this point in the history
  3. Introduce a GitHub Actions workflow for publishing a release

    This commit migrates this functionality away from the bots. Note that
    the NPM token must be configured as a repository secret before this
    workflow can execute.
    
    The following resources are relevant for this patch:
    
    - Publishing packages to the NPM registry:
      https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
    - Creating secrets for a repository:
      https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository
    timvandermeij committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    a5f2b9f View commit details
    Browse the repository at this point in the history
  4. Fix npm publish warnings about the package.json format

    This commit removes the following warnings from the `npm publish` output:
    
    ```
    npm warn publish npm auto-corrected some errors in your package.json when publishing.  Please run "npm pkg fix" to address these errors.
    npm warn publish errors corrected:
    npm warn publish Removed invalid "scripts"
    npm warn publish "repository.url" was normalized to "git+https://github.com/mozilla/pdfjs-dist.git"
    ```
    
    For the "scripts" section it turns out that if the package doesn't have
    any scripts it's expected to explicitly set it to an empty object; refer
    to npm/cli#6918 and
    denoland/dnt#414.
    timvandermeij committed Jun 30, 2024
    Configuration menu
    Copy the full SHA
    dddb74d View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Merge pull request mozilla#18350 from timvandermeij/github-actions-re…

    …lease
    
    Introduce a GitHub Actions workflow for publishing a release and fix `npm publish` warnings about the `package.json` format
    calixteman authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    b5d554e View commit details
    Browse the repository at this point in the history
  2. Use npm ci, not npm install, on CI

    This PR switches from `npm install` to `npm ci` on CI. This enables some additional checks to ensure repo integrity when using CI/CD.
    
    Read more: https://docs.npmjs.com/cli/v10/commands/npm-ci
    wojtekmaj committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    6b449d8 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18353 from wojtekmaj/npm-ci

    Use `npm ci`, not `npm install`, on CI
    timvandermeij authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    8556a26 View commit details
    Browse the repository at this point in the history
  4. Generate provenance statements on npm publish

    This PR adds [Provenance statements](https://docs.npmjs.com/generating-provenance-statements) on `npm publish`, increasing supply-chain security.
    wojtekmaj committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    aaa65bf View commit details
    Browse the repository at this point in the history
  5. Disable new tab page stuff in Firefox when running tests

    It should help to have such a garbage in the logs:
    ```
    console.warn: TopSitesFeed: Failed to fetch data from Contile server: NetworkError when attempting to fetch resource.
    JavaScript error: , line 0: TypeError: NetworkError when attempting to fetch resource.
    ```
    calixteman committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    efb45a7 View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18356 from calixteman/no_newtabpage

    Disable new tab page stuff in Firefox when running tests
    timvandermeij authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    067ec20 View commit details
    Browse the repository at this point in the history
  7. Merge pull request mozilla#18352 from wojtekmaj/provenance

    Generate provenance statements on npm publish
    timvandermeij authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    7114796 View commit details
    Browse the repository at this point in the history
  8. Fix the repository URL in the package.json file for pdfjs-dist

    For provenance, enabled in PR mozilla#18352, to work the repository URL in
    `package.json` is required to match the repository URL of the GitHub
    Actions invocation. This should fix the following error we encountered
    publishing a new release today:
    
    ```
    npm error 422 Unprocessable Entity - PUT https://registry.npmjs.org/pdfjs-dist - Error verifying sigstore provenance bundle: Failed to validate repository information: package.json: "repository.url" is "git+https://github.com/mozilla/pdfjs-dist.git", expected to match "https://github.com/mozilla/pdf.js" from provenance
    ```
    timvandermeij committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    bf5dd7e View commit details
    Browse the repository at this point in the history
  9. Merge pull request mozilla#18358 from timvandermeij/npm-url

    Fix the repository URL in the `package.json` file for `pdfjs-dist`
    timvandermeij authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    19fbc89 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2f4d5d2 View commit details
    Browse the repository at this point in the history
  11. Merge pull request mozilla#18359 from timvandermeij/bump

    Bump the stable version in `pdfjs.config`
    timvandermeij authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    c280c52 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

  1. [Editor] Take into account the page translation when computing the qu…

    …adpoints when saving an highlight
    
    It fixes mozilla#18360.
    calixteman committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    576aaf7 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18361 from calixteman/issue18360.pdf

    [Editor] Take into account the page translation when computing the quadpoints when saving an highlight
    calixteman authored Jul 2, 2024
    Configuration menu
    Copy the full SHA
    75129fd View commit details
    Browse the repository at this point in the history
  3. [api-minor][Editor] When switching to editing mode, redraw pages cont…

    …aining editable annotations
    
    Right now, editable annotations are using their own canvas when they're drawn, but
    it induces several issues:
     - if the annotation has to be composed with the page then the canvas must be correctly
       composed with its parent. That means we should move the canvas under canvasWrapper
       and we should extract composing info from the drawing instructions...
       Currently it's the case with highlight annotations.
     - we use some extra memory for those canvas even if the user will never edit them, which
       the case for example when opening a pdf in Fenix.
    
    So with this patch, all the editable annotations are drawn on the canvas. When the
    user switches to editing mode, then the pages with some editable annotations are redrawn but
    without them: they'll be replaced by their counterpart in the annotation editor layer.
    calixteman committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    64635f3 View commit details
    Browse the repository at this point in the history
  4. [Firefox] Generate a PDF.js default-prefs file that can be used direc…

    …tly in mozilla-central (bug 1905864)
    Snuffleupagus committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    ecb39a7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    033623c View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18134 from calixteman/hide_annotations

    [api-minor][Editor] When switching to editing mode, redraw pages containing editable annotations (bug 1883884)
    calixteman authored Jul 2, 2024
    Configuration menu
    Copy the full SHA
    bdcc4a0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2060944 View commit details
    Browse the repository at this point in the history
  8. Update pdfjs.config

    Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com>
    calixteman and Snuffleupagus authored Jul 2, 2024
    Configuration menu
    Copy the full SHA
    c154b1d View commit details
    Browse the repository at this point in the history
  9. Merge pull request mozilla#18365 from calixteman/bump_4.5

    Bump library version to 4.5
    calixteman authored Jul 2, 2024
    Configuration menu
    Copy the full SHA
    4f1d4c6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6817532 View commit details
    Browse the repository at this point in the history
  11. Merge pull request mozilla#18366 from calixteman/clean_switch_annot

    [Editor] Make sure everything is cleaned up when we switch to annotation editor mode
    calixteman authored Jul 2, 2024
    Configuration menu
    Copy the full SHA
    59620d3 View commit details
    Browse the repository at this point in the history
  12. Merge pull request mozilla#18349 from Snuffleupagus/rm-renderTextLayer

    [api-minor] Remove the deprecated `renderTextLayer` and `updateTextLayer` functions (PR 18104 follow-up)
    timvandermeij authored Jul 2, 2024
    Configuration menu
    Copy the full SHA
    ccad2f8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    bb54e7e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4e8a015 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Configuration menu
    Copy the full SHA
    832fc93 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fd6d0be View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2024

  1. Merge pull request mozilla#18369 from calixteman/bug1905623

    Use vertical variant of a char when it's in a missing vertical font (bug 1905623)
    calixteman authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    617f513 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#15209 from Snuffleupagus/createDefaultPref…

    …sFile
    
    [Firefox] Generate a PDF.js default-prefs file that can be used directly in mozilla-central (bug 1905864)
    Snuffleupagus authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    396231b View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18367 from timvandermeij/updates

    Update dependencies and translations to the most recent versions
    timvandermeij authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    944f3ac View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    53ddfd1 View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18374 from calixteman/test_editor_visible

    Make sure the editor is visible before getting its rect
    timvandermeij authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    03a0500 View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18383 from calixteman/fix_print_test

    Fix the integration tests related to printing
    timvandermeij authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    790470c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    74cbfbd View commit details
    Browse the repository at this point in the history
  8. Merge pull request mozilla#18389 from calixteman/remove_pref_stamp

    [Editor] Remove the option enableStamp
    calixteman authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    8c5b019 View commit details
    Browse the repository at this point in the history
  9. Move the internal API/Worker isEditing-state into `RenderingIntentF…

    …lag`
    
    In *hindsight* this seems like a better idea, since it avoids the need to manually pass `isEditing` around as a boolean value.
    Note that `RenderingIntentFlag` is *internal* functionality, not exposed in the official API, which means that it can be extended and modified as necessary.
    Snuffleupagus committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    a4ffc10 View commit details
    Browse the repository at this point in the history
  10. Merge pull request mozilla#18387 from Snuffleupagus/RenderingIntentFl…

    …ag-IS_EDITING
    
    Move the internal API/Worker `isEditing`-state into `RenderingIntentFlag`
    timvandermeij authored Jul 4, 2024
    Configuration menu
    Copy the full SHA
    9065ee4 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2024

  1. Check the relevant parameters inside of the mustBeViewedWhenEditing

    … method
    
    Similar to the `mustBeViewed` method, we can check the relevant parameters within the `mustBeViewedWhenEditing` method itself since that (in my opinion) slightly helps readability of the code in the `src/core/document.js` file.
    Snuffleupagus committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    5f74490 View commit details
    Browse the repository at this point in the history
  2. Remove the renderForms parameter from the Annotation `getOperatorLi…

    …st` methods
    
    The `renderForms` parameter pre-dates the introduction of the general `intent` parameter, which means that we're now effectively passing the same state twice to these `getOperatorList` methods.
    Snuffleupagus committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    38528d1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5274bab View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18394 from Snuffleupagus/rm-annotation-get…

    …OperatorList-renderForms
    
    Remove the `renderForms` parameter from the Annotation `getOperatorList` methods
    timvandermeij authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    cf9dfbc View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18393 from Snuffleupagus/mustBeViewedWhenE…

    …diting-params
    
    Check the relevant parameters inside of the `mustBeViewedWhenEditing` method
    timvandermeij authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    ccb141e View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18380 from calixteman/avoid_dbl_ml_queries

    [Editor] Avoid to query ML engine several times for the same image
    calixteman authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    e777ae2 View commit details
    Browse the repository at this point in the history
  7. Allow to change the toolbar height when changing the pref toolbar.den…

    …sity in Firefox (bug 1171799)
    
    It's a first step to just dispatch the pref change to the toolbar.
    The second one, to effectively use it, will come after PR mozilla#18385 is merged.
    calixteman committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    0910f17 View commit details
    Browse the repository at this point in the history
  8. [Editor] Change the enableML pref for enableAltText (bug 1905923)

    We want to use this pref to make a Nimbus experiment in the next weeks.
    calixteman committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    0fba6e5 View commit details
    Browse the repository at this point in the history
  9. Fix the "must check that charLimit is correctly set" scripting integr…

    …ation test
    
    This integration test fails intermittently because we're not (correctly)
    awaiting the character limit increase sandbox action.
    
    For the first increase an attempt was made to handle this, but it doesn't
    work correctly because the text in the field is `abcdefghijklmnopq` and
    it's not be truncated until the sandbox action is completed, so because
    we didn't await that we would could pass the `value !== "abcdefgh"` check
    because `abcdefghijklmnopq !== abcdefgh` is true. For the second increase
    we didn't have a check in place.
    
    This commit fixes the issues by using the `waitForSandboxTrip` and
    `waitForSelector` helper functions to make sure that we can only proceed
    if the sandbox action is completed and the DOM element is updated.
    timvandermeij committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    70b4425 View commit details
    Browse the repository at this point in the history
  10. Merge pull request mozilla#18397 from calixteman/toolbar_density

    Allow to change the toolbar height when changing the pref toolbar.density in Firefox (bug 1171799)
    calixteman authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    9f00105 View commit details
    Browse the repository at this point in the history
  11. Merge pull request mozilla#18399 from timvandermeij/intermittent-char…

    …limit
    
    Fix the "must check that charLimit is correctly set" scripting integration test
    timvandermeij authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    7a5f561 View commit details
    Browse the repository at this point in the history
  12. Merge pull request mozilla#18398 from calixteman/bug1905923

    [Editor] Change the enableML pref for enableAltText (bug 1905923)
    calixteman authored Jul 5, 2024
    Configuration menu
    Copy the full SHA
    db91156 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2024

  1. Fix orphaned browser processes due to uncaught exceptions in the tests

    If uncaught exceptions occur in the tests (which happened in mozilla#17962 and
    can be triggered manually by throwing an error in `integration-boot.js`)
    the teardown logic of the tests doesn't get to run and thus spawned
    browser processes are not closed properly. Given that `test.mjs` is the
    only process that has a reference to them they will become orphaned and
    keep running if `test.mjs` exits without explicitly closing them.
    
    This commit fixes the issue by always closing the browsers if uncaught
    exceptions occur, and we make sure to log them for debugging purposes.
    timvandermeij committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    3afe2d3 View commit details
    Browse the repository at this point in the history
  2. Move the "updatedPreference" event listener registration

    This patch fixes a situation that'll probably never happen, but nonetheless seems like something that we should address.
    Currently the "updatedPreference" listener isn't registered *until after* the preferences have been read and initialized, which leaves a very short window of time where a preference change could theoretically be skipped.
    Snuffleupagus committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    9e352a8 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18401 from timvandermeij/test-orphaned-bro…

    …wsers
    
    Fix orphaned browser processes due to uncaught exceptions in the tests
    timvandermeij authored Jul 6, 2024
    Configuration menu
    Copy the full SHA
    fe69243 View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18402 from Snuffleupagus/updatedPreference…

    …-move-listener
    
    Move the "updatedPreference" event listener registration
    timvandermeij authored Jul 6, 2024
    Configuration menu
    Copy the full SHA
    bb3e316 View commit details
    Browse the repository at this point in the history
  5. Fix the "caches image resources at the document/page level as expecte…

    …d (issue 11878)" unit test
    
    This unit test fails occasionally (albeit much less than before thanks
    to PR mozilla#17663), so we change the parsing time check's divisor to prevent
    it from happening again. If the last page's rendering time is less than
    or equal to 50% of the first page's rendering time that should be enough
    proof that no worker thread re-parsing occurred while also providing a
    wide enough range to avoid intermittents.
    
    Note that the assertion is now equal to the one we already have in the
    "caches image resources at the document/page level, with main-thread
    copying of complex images (issue 11518)" unit test which seems to work
    reliably so far.
    timvandermeij committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    2a44203 View commit details
    Browse the repository at this point in the history
  6. Handle toUnicode cmaps that omit leading zeros in hex encoded UTF-16 …

    …(issue 18099)
    
    Add unit test to check compatability with such cmaps
    
    In the PDF in issue 18099. the toUnicode cmap had a line to map the glyph char codes from 00 to 7F to the corresponding code points. The syntax to map a range of char codes to a range of unicode code points is
    <start_char_code> <end_char_code> <start_unicode_codepoint>
    As the unicode code points are supposed to be given in UTF-16 BE, the PDF's line SHOULD have probably read
    <00> <7F> <0000>
    Instead it omitted two leading zeros from the UTF-16 like this
    <00> <7F> <00>
    This confused PDF.js into mapping these character codes to the UTF-16 characters with the corresponding HIGH bytes (01 became \u0100, 02 became \u0200, et cetera), which ended up turning latin text in the PDF into chinese when it was copied
    I'm not sure if the PDF spec actually allows PDFs to do this, but since there's at least one PDF in the wild that does and other PDF readers read it correctly, PDF.js should probably support this
    alexcat3 committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    1c36442 View commit details
    Browse the repository at this point in the history
  7. Merge pull request mozilla#18404 from timvandermeij/fix-unit-intermit…

    …tent
    
    Fix the "caches image resources at the document/page level as expected (issue 11878)" unit test
    timvandermeij authored Jul 6, 2024
    Configuration menu
    Copy the full SHA
    145951d View commit details
    Browse the repository at this point in the history
  8. Merge pull request mozilla#18390 from alexcat3/fix-issue-18099

    Handle toUnicode cMaps that omit leading zeros in hex encoded UTF-16 (issue 18099)
    Snuffleupagus authored Jul 6, 2024
    Configuration menu
    Copy the full SHA
    5ee6169 View commit details
    Browse the repository at this point in the history
  9. Introduce a waitForScripting helper function and use it in all scri…

    …pting integration tests
    
    Code inspection uncovered that quite a few integration tests don't wait
    for scripting to be ready before proceeding, which is a source of
    intermittent failures, especially on slower machines where e.g. creating
    the sandbox takes longer.
    
    This commit fixes the issues by introducing a `waitForScripting` helper
    function and calling it consistently in all scripting integration tests.
    timvandermeij committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    b540b63 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2024

  1. Merge pull request mozilla#18405 from timvandermeij/intermittent-wait…

    …forscripting
    
    Introduce a `waitForScripting` helper function and use it in all scripting integration tests
    calixteman authored Jul 7, 2024
    Configuration menu
    Copy the full SHA
    2a125bd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5bfe759 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#17962 from calixteman/chrome_bidi

    Use BiDi protocol for Chrome tests
    timvandermeij authored Jul 7, 2024
    Configuration menu
    Copy the full SHA
    1bdd692 View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Extend test-coverage for non-embedded Type1 fonts where .notdef glyph…

    …s are replaced with spaces
    Snuffleupagus committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    7ffa9a2 View commit details
    Browse the repository at this point in the history
  2. Revert "Remove the unused Font.prototype.spaceWidth getter (PR 1342…

    …4 follow-up)"
    
    This reverts commit 4aee672.
    Snuffleupagus committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    f9d6320 View commit details
    Browse the repository at this point in the history
  3. Also update the width/unicode data when replacing missing glyphs in n…

    …on-embedded Type1 fonts (issue 18059)
    
    *Please note:* This causes a little bit of movement in the `issue2770` test-case, however this matches the rendering in both Adobe Reader and PDFium.
    Snuffleupagus committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    56653e5 View commit details
    Browse the repository at this point in the history
  4. Re-factor BasePreferences to essentially be a wrapper around `AppOp…

    …tions`
    
    In the MOZCENTRAL build the `BasePreferences` class is almost unused, since it's only being used to initialize and update the `AppOptions` which means that theoretically we could move the relevant code there.
    However for the other build targets (e.g. GENERIC and CHROME) we still need to keep the `BasePreferences` class, although we can re-factor things to move the necessary validation inside of `AppOptions` and thus simplify the code and reduce duplication.
    
    The patch also moves the event dispatching, for changed preference values, into `AppOptions` instead.
    Snuffleupagus committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    d9f0ec0 View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18413 from Snuffleupagus/BasePreferences-A…

    …ppOptions-wrapper
    
    Re-factor `BasePreferences` to essentially be a wrapper around `AppOptions`
    timvandermeij authored Jul 9, 2024
    Configuration menu
    Copy the full SHA
    7ffea2f View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

  1. [Editor] Wait for 'pagerendered' to switch to editing mode

    The focus can potentially be stolen when the DOM is modified when adding
    a new canvas element for the page being redrawn.
    calixteman committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    d27efb4 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18418 from calixteman/wait_for_rendering

    [Editor] Wait for 'pagerendered' to switch to editing mode
    calixteman authored Jul 10, 2024
    Configuration menu
    Copy the full SHA
    b1bf8b4 View commit details
    Browse the repository at this point in the history
  3. Fix ensureMinFontSizeComputed calculation if <body> is a flex con…

    …tainer
    
    Given:
    
    ```css
    html,
    body {
      height: 100%;
    }
    
    body {
      display: flex;
    }
    ```
    
    The `<div>` appended to the `<body>` will take up the full height of the
    viewport due to the implicit `align-items: stretch` of flex containers.
    
    This results in an incorrect computed `minFontSize` value.
    razh committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    665fff0 View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18416 from razh/ensureMinimumFontSize-body…

    …-flex
    
    Fix `ensureMinFontSizeComputed` calculation if `<body>` is a flex container
    timvandermeij authored Jul 10, 2024
    Configuration menu
    Copy the full SHA
    cf58113 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. Allow e.g. /FitH destinations without additional parameter (bug 1907000)

    According to the PDF specification these destinations should have a coordinate parameter, which may however be `null`, but it shouldn't be omitted; please see https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2095870
    
    Hence we try to work-around bad PDF generators by making the coordinate parameter optional when validating explicit destinations in both the worker and the viewer.
    Snuffleupagus committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    403d023 View commit details
    Browse the repository at this point in the history
  2. [Editor] Update the freetext annotation dictionary instead of creatin…

    …g a new one when updating an existing freetext
    calixteman committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    6711123 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18421 from Snuffleupagus/bug-1907000

    Allow e.g. /FitH destinations without additional parameter (bug 1907000)
    Snuffleupagus authored Jul 11, 2024
    Configuration menu
    Copy the full SHA
    b56e420 View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18412 from Snuffleupagus/issue-18059

    Also update the width/unicode data when replacing missing glyphs in non-embedded Type1 fonts (issue 18059)
    Snuffleupagus authored Jul 11, 2024
    Configuration menu
    Copy the full SHA
    e8d35c2 View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18419 from calixteman/reuse_old_dict_when_…

    …updating
    
    [Editor] Update the freetext annotation dictionary instead of creating a new one when updating an existing freetext
    calixteman authored Jul 11, 2024
    Configuration menu
    Copy the full SHA
    9b1b5ff View commit details
    Browse the repository at this point in the history
  6. Create absolute filter-URLs when needed in DOMFilterFactory (issue …

    …18406)
    
    This functionality is purposely limited to development mode and GENERIC builds, since it's unnecessary in e.g. the *built-in* Firefox PDF Viewer, and will only be used when a `<base>`-element is actually present.
    
    *Please note:* We also have tests in mozilla-central that will *indirectly* ensure that relative filter-URLs work as intended in the Firefox PDF Viewer, see https://searchfox.org/mozilla-central/source/toolkit/components/pdfjs/test/browser_pdfjs_filters.js
    
    ---
    
    To test that the issue is fixed, the following code can be used:
    
    ```html
    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="UTF-8">
      <base href=".">
      <title>base href (issue 18406)</title>
    </head>
    <body>
    
    <ul>
      <li>Place this code in a file, named `base_href.html`, in the root of the PDF.js repository</li>
      <li>Run <pre>npx gulp dist-install</pre></li>
      <li>Run <pre>npx gulp server</pre></li>
      <li>Open <a href="http://localhost:8888/base_href.html">http://localhost:8888/base_href.html</a> in a browser</li>
      <li>Compare rendering with <a href="http://localhost:8888/web/viewer.html?file=/test/pdfs/issue16287.pdf">http://localhost:8888/web/viewer.html?file=/test/pdfs/issue16287.pdf</a></li>
    </ul>
    
    <canvas id="the-canvas" style="border: 1px solid black; direction: ltr;"></canvas>
    
    <script src="/node_modules/pdfjs-dist/build/pdf.mjs" type="module"></script>
    
    <script id="script" type="module">
      //
      // If absolute URL from the remote server is provided, configure the CORS
      // header on that server.
      //
      const url = '/test/pdfs/issue16287.pdf';
    
      //
      // The workerSrc property shall be specified.
      //
      pdfjsLib.GlobalWorkerOptions.workerSrc =
        '/node_modules/pdfjs-dist/build/pdf.worker.mjs';
    
      //
      // Asynchronous download PDF
      //
      const loadingTask = pdfjsLib.getDocument(url);
      const pdf = await loadingTask.promise;
      //
      // Fetch the first page
      //
      const page = await pdf.getPage(1);
      const scale = 1.5;
      const viewport = page.getViewport({ scale });
      // Support HiDPI-screens.
      const outputScale = window.devicePixelRatio || 1;
    
      //
      // Prepare canvas using PDF page dimensions
      //
      const canvas = document.getElementById("the-canvas");
      const context = canvas.getContext("2d");
    
      canvas.width = Math.floor(viewport.width * outputScale);
      canvas.height = Math.floor(viewport.height * outputScale);
      canvas.style.width = Math.floor(viewport.width) + "px";
      canvas.style.height = Math.floor(viewport.height) + "px";
    
      const transform = outputScale !== 1
        ? [outputScale, 0, 0, outputScale, 0, 0]
        : null;
    
      //
      // Render PDF page into canvas context
      //
      const renderContext = {
        canvasContext: context,
        transform,
        viewport,
      };
      page.render(renderContext);
    </script>
    
    </body>
    </html>
    ```
    Snuffleupagus committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    50a5a15 View commit details
    Browse the repository at this point in the history
  7. Remove the remaining zoomDisabledTimeout usage (issue 17727)

    With https://bugzilla.mozilla.org/show_bug.cgi?id=1882168 now marked as fixed by the landing of https://bugzilla.mozilla.org/show_bug.cgi?id=1902017 we should *hopefully* be able to remove this work-around.
    Snuffleupagus committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    6b47ddd View commit details
    Browse the repository at this point in the history
  8. Merge pull request mozilla#18417 from Snuffleupagus/DOMFilterFactory-…

    …baseUrl
    
    Create absolute filter-URLs when needed in `DOMFilterFactory` (issue 18406)
    Snuffleupagus authored Jul 11, 2024
    Configuration menu
    Copy the full SHA
    8082c2d View commit details
    Browse the repository at this point in the history
  9. Merge pull request mozilla#18423 from Snuffleupagus/rm-setZoomDisable…

    …dTimeout
    
    Remove the remaining `zoomDisabledTimeout` usage (issue 17727)
    Snuffleupagus authored Jul 11, 2024
    Configuration menu
    Copy the full SHA
    acc70ce View commit details
    Browse the repository at this point in the history
  10. [Editor] Make editor toolbars usable whatever their z-index (bug 1879…

    …104)
    
    Because of editor z-index, the toolbar belonging to an highlight created
    before a second adjacent one, can be overlapped by this new one.
    So when the user select an editor we just show it on front of all the other
    ones to make sure that it can be used normally.
    calixteman committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    9a64749 View commit details
    Browse the repository at this point in the history
  11. Merge pull request mozilla#18425 from calixteman/bug1879104

    [Editor] Make editor toolbars usable whatever their z-index (bug 1879104)
    calixteman authored Jul 11, 2024
    Configuration menu
    Copy the full SHA
    df5bc54 View commit details
    Browse the repository at this point in the history
  12. [Editor] Disable existing highlights when drawing a new one (bug 1879…

    …035)
    
    When the mouse was hovering an existing highlight, all the text in the page
    was selected.
    So when the user is selecting some text or drawing a free highlight, the mouse
    is disabled for the existing editors.
    calixteman committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    4e7c30d View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2024

  1. Merge pull request mozilla#18424 from calixteman/avoid_hovering_when_…

    …selecting
    
    [Editor] Disable existing highlights when drawing a new one (bug 1879035)
    calixteman authored Jul 12, 2024
    Configuration menu
    Copy the full SHA
    2d25437 View commit details
    Browse the repository at this point in the history
  2. [Editor] Add an option to use the new 'add an image' flow (bug 1907207)

    UX team designed in a new flow we'll implement soon and we want to be able to
    make an experiment to be able to compare current flow vs the new one.
    calixteman committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    dfccc8f View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2024

  1. Configuration menu
    Copy the full SHA
    49eba2f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c77b97d View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18432 from timvandermeij/updates

    Update dependencies to the most recent versions and update the JS/CSS files for the new Prettier/Stylelint versions
    timvandermeij authored Jul 13, 2024
    Configuration menu
    Copy the full SHA
    07c58aa View commit details
    Browse the repository at this point in the history
  4. Disable network connections to Contile for the tests

    In PR mozilla#18356 the new tab page logic was disabled to prevent Firefox
    from logging failed network connections to Contile, the Mozilla Tiles
    service that is used for the new tab page [1]. However, recently this
    log reappeared locally and on the bots:
    
    ```
    console.warn: TopSitesFeed: Failed to fetch data from Contile server:
    NetworkError when attempting to fetch resource.
    ```
    
    It looks like Contile communication is also triggered from other places
    in Firefox such as the URL bar [2], so this commit fixes the issue by
    disabling network connections to Contile [3] altogether regardless of
    their origin within Firefox. Note that we don't revert the change from
    PR mozilla#18356 because as noted in [4] it can't hurt to keep that disabled
    too to avoid overhead for a feature we don't use in the tests.
    
    [1] https://github.com/mozilla-services/contile
    [2] https://github.com/mozilla/gecko-dev/blob/196ef8360e4d3b5c334f1f8f91b3b1fdb434eb63/browser/components/urlbar/UrlbarProviderTopSites.sys.mjs#L38
    [3] https://github.com/mozilla/gecko-dev/blob/196ef8360e4d3b5c334f1f8f91b3b1fdb434eb63/browser/components/newtab/lib/TopSitesFeed.sys.mjs#L111
    [4] mozilla#18356 (comment)
    timvandermeij committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    aea409d View commit details
    Browse the repository at this point in the history
  5. Remove obsolete pdfjs-dist code from the Gulpfile

    The Git logic for pushing to the `pdfjs-dist` repository was already
    removed in PR mozilla#18350, but it was forgotten to also remove the logic to
    create a Git repository in the first place. This commit fixes the open
    action for that from
    mozilla#18358 (comment).
    
    Moreover, we implement the suggestion from
    mozilla#18358 (comment)
    about moving the Git URL to a separate variable for consistency and we
    update the homepage URL to the HTTPS scheme to avoid an HTTP -> HTTPS
    redirect and enforce TLS-encrypted connections.
    timvandermeij committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    1c5c5da View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18433 from timvandermeij/contile

    Disable network connections to Contile for the tests
    timvandermeij authored Jul 13, 2024
    Configuration menu
    Copy the full SHA
    08967a5 View commit details
    Browse the repository at this point in the history
  7. Merge pull request mozilla#18434 from timvandermeij/pdfjs-dist

    Remove obsolete `pdfjs-dist` code from the Gulpfile
    timvandermeij authored Jul 13, 2024
    Configuration menu
    Copy the full SHA
    5059187 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. Merge pull request mozilla#18429 from calixteman/bug1907207

    [Editor] Add an option to use the new 'add an image' flow (bug 1907207)
    calixteman authored Jul 15, 2024
    Configuration menu
    Copy the full SHA
    87e74a7 View commit details
    Browse the repository at this point in the history
  2. Fix DOMFilterFactory.#createUrl in MOZCENTRAL builds (18417 PR foll…

    …ow-up)
    
    Somehow I managed to mess up the URL creation relevant to e.g. MOZCENTRAL builds, which is breaking the pending PDF.js update in mozilla-central; sorry about that!
    
    To avoid future issues, we'll now always check if absolute filter-URLs are necessary regardless of the build-target.
    Snuffleupagus committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    4c45948 View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18430 from Snuffleupagus/pr-18417-followup

    Fix `DOMFilterFactory.#createUrl` in MOZCENTRAL builds (18417 PR follow-up)
    Snuffleupagus authored Jul 15, 2024
    Configuration menu
    Copy the full SHA
    f9e3b6b View commit details
    Browse the repository at this point in the history
  4. [Editor] When in non-editing mode, add a new editor only once the edi…

    …ting mode has switched
    
    Switching to an editing mode can be asynchronous (e.g. if an editable annotation exists on a
    visible page), so we must add a new editor only when the page rendering is done.
    calixteman committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    6dd75c0 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

  1. [api-minor] Remove Outliner from the official API

    As far as I can tell `Outliner` is only exposed in the API because we need to access it when running some of the reference-tests, but is otherwise not used.
    Hence this seems like something that should be kept *internal* and thus only exposed in TESTING-builds.
    Snuffleupagus committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    8a979c2 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18440 from calixteman/fix_add_highlight

    [Editor] When in non-editing mode, add a new editor only once the editing mode has switched
    calixteman authored Jul 16, 2024
    Configuration menu
    Copy the full SHA
    e190ceb View commit details
    Browse the repository at this point in the history
  3. Merge pull request mozilla#18441 from Snuffleupagus/api-rm-Outliner

    [api-minor] Remove `Outliner` from the official API
    Snuffleupagus authored Jul 16, 2024
    Configuration menu
    Copy the full SHA
    86eb5ba View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. Configuration menu
    Copy the full SHA
    37db3a7 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18445 from calixteman/issue18444

    Remove active smask when restoring the initial canvas state
    calixteman authored Jul 17, 2024
    Configuration menu
    Copy the full SHA
    15b71b8 View commit details
    Browse the repository at this point in the history
  3. Include additional data when fetching browser preferences in the PDF …

    …Viewer (bug 1908401)
    
    To avoid having to request and await various browser data early during the PDF Viewer initialization, we can include that data in the existing preference fetching instead. With other planned changes to the PDF Viewer, the current situation would only become worse over time.
    
    *Note:* Technically this data aren't preference-values, however we're already including other non-prefs in this list (e.g. `isInAutomation`) and doing it this way simplifies the overall implementation.
    Snuffleupagus committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    99f34f4 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Configuration menu
    Copy the full SHA
    6cc32b6 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18449 from calixteman/bug1908483

    Add the possibility to change some pdfjs preferences from the viewer (bug 1908483)
    calixteman authored Jul 18, 2024
    Configuration menu
    Copy the full SHA
    e1f64a5 View commit details
    Browse the repository at this point in the history
  3. Allow /XYZ destinations without zoom parameter (issue 18408)

    According to the PDF specification these destinations should have a zoom parameter, which may however be `null`, but it shouldn't be omitted; please see https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2095870
    
    Hence we try to work-around bad PDF generators by making the zoom parameter optional when validating explicit destinations in both the worker and the viewer.
    Snuffleupagus committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    d24a61c View commit details
    Browse the repository at this point in the history
  4. Merge pull request mozilla#18453 from Snuffleupagus/issue-18408

    Allow /XYZ destinations without zoom parameter (issue 18408)
    Snuffleupagus authored Jul 18, 2024
    Configuration menu
    Copy the full SHA
    31f247f View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18448 from Snuffleupagus/AppOptions-more-b…

    …rowser-params
    
    Include additional data when fetching browser preferences in the PDF Viewer (bug 1908401)
    Snuffleupagus authored Jul 18, 2024
    Configuration menu
    Copy the full SHA
    5be6658 View commit details
    Browse the repository at this point in the history
  6. [Editor] Allow to change a preference from the editor UI manager

    We want to be able to update a global pref (i.e. enableAltText) in using a toggle button in the new alt-text dialog.
    calixteman committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    5946d20 View commit details
    Browse the repository at this point in the history
  7. Merge pull request mozilla#18454 from calixteman/setpref_event

    [Editor] Allow to change a preference from the editor UI manager
    calixteman authored Jul 18, 2024
    Configuration menu
    Copy the full SHA
    5b0e15a View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. Configuration menu
    Copy the full SHA
    b71fa72 View commit details
    Browse the repository at this point in the history
  2. Merge pull request mozilla#18461 from calixteman/bug1908938

    Load the image-to-text model when opening the pdf viewer in Firefox (bug 1908938)
    calixteman authored Jul 19, 2024
    Configuration menu
    Copy the full SHA
    ed83d7c View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2024

  1. Add more validation when setting AppOptions (PR 18413 follow-up)

    After the changes in PR 18413 we're now relying even more on `AppOptions` and it thus seems like a good idea to ensure that no invalid values can be added.
    Hence the `AppOptions.{set, setAll}` methods will now *unconditionally* validate that the type of the values agree with the default-options.
    Snuffleupagus committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    216d3a9 View commit details
    Browse the repository at this point in the history
  2. Stop using downloadComplete in PDFViewerApplication.progress

    This was only necessary to prevent (unlikely) visual glitches when `disableAutoFetch = true` is being used.
    However, it turns out that we can move this functionality into the `ProgressBar` class instead by checking if the entire PDF document has loaded. This works since the API is always reporting 100% loading progress regardless of how the document was loaded; see [this code](https://github.com/mozilla/pdf.js/blob/ed83d7c5e16798a56c493d56aaa8200dd280bb17/src/display/api.js#L2735-L2740).
    Snuffleupagus committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    0062424 View commit details
    Browse the repository at this point in the history
  3. Avoid downloading the document twice in PDFViewerApplication.download

    The old implementation in `PDFViewerApplication.download` means that if the `getDocument`-call hasn't yet downloaded the *entire* PDF document it will be re-downloaded. This seems generally undesirable since:
     - In some (probably rare) cases a URL may not be valid an arbitrary number of times, which means that the download may fail.
     - It will lead to wasted resources, since we'll end up fetching the same PDF document *twice* in that case (once via the `getDocument`-call and once to allow the user to save it).
    
    Hence this patch suggests that we change this very old code to instead always call the `PDFDocumentProxy.getData` method, since that'll trigger immediate downloading of the remaining document via the existing `getDocument`-call.
    
    Finally, the patch removes the `PDFViewerApplication.downloadComplete` property since it's now unused.
    Snuffleupagus committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    64a4f0d View commit details
    Browse the repository at this point in the history
  4. Reduce a tiny bit of duplication in `PDFViewerApplication.setTitleUsi…

    …ngUrl`
    
    Rather than repeating code, we can always fallback to the raw URL instead.
    Snuffleupagus committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    482d621 View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18464 from Snuffleupagus/setTitleUsingUrl-…

    …url-fallback
    
    Reduce a tiny bit of duplication in `PDFViewerApplication.setTitleUsingUrl`
    timvandermeij authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    9db1ae4 View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18463 from Snuffleupagus/app-rm-downloadCo…

    …mplete
    
    Re-factor the code to remove all uses of `PDFViewerApplication.downloadComplete`
    timvandermeij authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    7a8acee View commit details
    Browse the repository at this point in the history
  7. Merge pull request mozilla#18450 from Snuffleupagus/AppOptions-set-va…

    …lidation
    
    Add more validation when setting `AppOptions` (PR 18413 follow-up)
    timvandermeij authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    e92a6a1 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2024

  1. Change the compatibilityParams, used with AppOptions, to a Map

    This is needed for upcoming changes, and simplifies both checking if an entry exists and iteration of the entries.
    Snuffleupagus committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    57ee035 View commit details
    Browse the repository at this point in the history
  2. Change the userOptions, used with AppOptions, to a Map

    This is needed for upcoming changes, and simplifies both checking if an entry exists and iteration of the entries.
    Snuffleupagus committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    7bd9206 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    26989fd View commit details
    Browse the repository at this point in the history
  4. Move the Preferences initialization as early as possible

    Given that the entire default viewer initialization depends on the preferences being available, try to do this as early as possible.
    Snuffleupagus committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    f8aa15a View commit details
    Browse the repository at this point in the history
  5. Merge pull request mozilla#18470 from Snuffleupagus/move-Preferences-…

    …init
    
    Move the `Preferences` initialization as early as possible
    timvandermeij authored Jul 21, 2024
    Configuration menu
    Copy the full SHA
    9f62c0f View commit details
    Browse the repository at this point in the history
  6. Merge pull request mozilla#18469 from Snuffleupagus/AppOptions-Maps

    Introduce some `Map`-usage in the AppOptions
    timvandermeij authored Jul 21, 2024
    Configuration menu
    Copy the full SHA
    ebb3d27 View commit details
    Browse the repository at this point in the history
  7. Use shorter local variable names in a few AppOptions methods

    Besides being slightly shorter, this should help reduce the risk of confusion given the very similar global Object/Map names.
    Snuffleupagus committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    45ce3a0 View commit details
    Browse the repository at this point in the history
  8. Disable system fonts on Android (issue 18210)

    To avoid introducing any inline "hacks" in the viewer-code this meant adding `useSystemFonts` to the AppOptions, which thus required some new functionality since the default value should be `undefined` given how the option is handled in the API; note [this code](https://github.com/mozilla/pdf.js/blob/ed83d7c5e16798a56c493d56aaa8200dd280bb17/src/display/api.js#L298-L301).
    
    Finally, also moves the definition of the development-mode `window.isGECKOVIEW` property to the HTML file such that it's guaranteed to be set regardless of how and when it's accessed.
    Snuffleupagus committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    80d6bf6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5860c7b View commit details
    Browse the repository at this point in the history
  10. Merge pull request mozilla#18471 from calixteman/bug1909097

    Add a pref containing the url for the sumo page about alt text (bug 1909097)
    calixteman authored Jul 21, 2024
    Configuration menu
    Copy the full SHA
    d0b580e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b759470 View commit details
    Browse the repository at this point in the history
  12. Merge pull request mozilla#18465 from Snuffleupagus/issue-18210

    Disable system fonts on Android (issue 18210)
    timvandermeij authored Jul 21, 2024
    Configuration menu
    Copy the full SHA
    0c34efb View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    71bae38 View commit details
    Browse the repository at this point in the history
  14. Remove the unused AppOptions.remove method

    This method has *never* been used anywhere in the code-base, so I really don't know why I added it originally.
    Snuffleupagus committed Jul 21, 2024
    Configuration menu
    Copy the full SHA
    d9ff29a View commit details
    Browse the repository at this point in the history
  15. Merge pull request mozilla#18472 from calixteman/bug1908939

    Add the possibility to delete a model (bug 1908939)
    calixteman authored Jul 21, 2024
    Configuration menu
    Copy the full SHA
    998bc07 View commit details
    Browse the repository at this point in the history
  16. Merge pull request mozilla#18468 from calixteman/dont_throw_with_inva…

    …lid_cs
    
    Fallback on DeviceGray when a colorspace cannot be parsed
    calixteman authored Jul 21, 2024
    Configuration menu
    Copy the full SHA
    422b3e4 View commit details
    Browse the repository at this point in the history
  17. Merge pull request mozilla#18475 from Snuffleupagus/rm-AppOptions-remove

    Remove the unused `AppOptions.remove` method
    timvandermeij authored Jul 21, 2024
    Configuration menu
    Copy the full SHA
    98e7727 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. wip

    nicolo-ribaudo committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    a8f7fba View commit details
    Browse the repository at this point in the history