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

Move the various DOM-factories into their own files #18988

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

Snuffleupagus
Copy link
Collaborator

  • Over time the number and size of these factories have increased, especially the DOMFilterFactory class, and this split should thus aid readability/maintainability of the code.

  • By introducing a couple of new import maps we can avoid bundling the DOMCMapReaderFactory/DOMStandardFontDataFactory classes in the Firefox PDF Viewer, since they are dead code there given that worker-thread fetching is always being used.

  • This patch has been successfully tested, by running $ ./mach test toolkit/components/pdfjs/, in a local Firefox artifact-build.

Note: This patch reduces the size of the gulp mozcentral output by 1.3 kilo-bytes, which isn't a lot but still cannot hurt.

 - Over time the number and size of these factories have increased, especially the `DOMFilterFactory` class, and this split should thus aid readability/maintainability of the code.

 - By introducing a couple of new import maps we can avoid bundling the `DOMCMapReaderFactory`/`DOMStandardFontDataFactory` classes in the Firefox PDF Viewer, since they are dead code there given that worker-thread fetching is always being used.

 - This patch has been successfully tested, by running `$ ./mach test toolkit/components/pdfjs/`, in a local Firefox artifact-build.

*Note:* This patch reduces the size of the `gulp mozcentral` output by `1.3` kilo-bytes, which isn't a lot but still cannot hurt.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/9136ce09f711f89/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/9136ce09f711f89/output.txt

Total script time: 0.99 mins

Published

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/23499ba8f1e065a/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/23499ba8f1e065a/output.txt

Total script time: 32.21 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  errors: 18
  different ref/snapshot: 23
  different first/second rendering: 1

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

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

Total script time: 46.25 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: Passed

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this. Grouping the base factories together with their implementations makes the code clearer to me.

@timvandermeij timvandermeij merged commit 3634dab into mozilla:master Nov 2, 2024
10 checks passed
@Snuffleupagus Snuffleupagus deleted the split-dom-factory branch November 2, 2024 20:55
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