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

Re-factor how the GenericL10n class fetches localization-data #17277

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

Snuffleupagus
Copy link
Collaborator

  • Re-factor the existing fetchData helper function such that it can fetch more types of data, and it now supports "arraybuffer", "json", and "text". This only needed minor adjustments in the DOMCMapReaderFactory and DOMStandardFontDataFactory classes.[1]

  • Expose the fetchData helper function in the API, such that the viewer is able to access it.

  • Use the fetchData helper function in the GenericL10n class, since this should allow fetching of localization-data even if the default viewer is run in an environment without support for the Fetch API.


[1] While testing this I also noticed a minor inconsistency when handling standard font-data on the worker-thread.

 - Re-factor the existing `fetchData` helper function such that it can fetch more types of data, and it now supports "arraybuffer", "json", and "text".
   This only needed minor adjustments in the `DOMCMapReaderFactory` and `DOMStandardFontDataFactory` classes.[1]

 - Expose the `fetchData` helper function in the API, such that the viewer is able to access it.

 - Use the `fetchData` helper function in the `GenericL10n` class, since this should allow fetching of localization-data even if the default viewer is run in an environment without support for the Fetch API.

---
[1] While testing this I also noticed a minor inconsistency when handling standard font-data on the worker-thread.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@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/d3cdecaeff7c32c/output.txt

@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/c325af0a3e6426c/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

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

Total script time: 24.87 mins

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

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

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

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

Total script time: 35.18 mins

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

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

@Snuffleupagus Snuffleupagus merged commit 1df6487 into mozilla:master Nov 14, 2023
9 checks passed
@Snuffleupagus Snuffleupagus deleted the L10n-fetchData branch November 14, 2023 15:09
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.

None yet

3 participants