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

[api-minor] Remove the, in legacy builds, bundled DOMMatrix polyfill #14645

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

According to the MDN compatibility data, see https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix/DOMMatrix#browser_compatibility, all browsers that we support have native DOMMatrix implementations (since quite some time too).

Hence Node.js is the only environment that lack DOMMatrix support, which probably isn't that surprising given that it's browser functionality.
While the DOMMatrix polyfill isn't that large, it nonetheless seems completely unnecessary to bundle it in the legacy builds when it's not needed in browsers. However, we can avoid that by simply listing dommatrix as a dependency for the pdfjs-dist library.

According to the MDN compatibility data, see https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix/DOMMatrix#browser_compatibility, all browsers that we support have native `DOMMatrix` implementations (since quite some time too).

Hence Node.js is the only environment that lack `DOMMatrix` support, which probably isn't that surprising given that it's browser functionality.
While the `DOMMatrix` polyfill isn't that large, it nonetheless seems completely unnecessary to bundle it in the `legacy` builds when it's not needed in browsers. However, we can avoid that by simply listing `dommatrix` as a dependency for the `pdfjs-dist` library.
@Snuffleupagus
Copy link
Collaborator Author

/botio browsertest

@pdfjsbot
Copy link

pdfjsbot commented Mar 8, 2022

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/ddef2c7f23fc0ac/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 8, 2022

From: Bot.io (Windows)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/f053b03d108ba66/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 8, 2022

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/ddef2c7f23fc0ac/output.txt

Total script time: 20.16 mins

  • Regression tests: FAILED
  different ref/snapshot: 7
  different first/second rendering: 2

Image differences available at: http://54.241.84.105:8877/ddef2c7f23fc0ac/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Mar 8, 2022

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/f053b03d108ba66/output.txt

Total script time: 20.33 mins

  • Regression tests: Passed

@timvandermeij timvandermeij merged commit e85bb0b into mozilla:master Mar 9, 2022
@timvandermeij
Copy link
Contributor

Nice find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants