Adding a new pref for a new SpiderMonkey feature or optimization requires a lot of boilerplate code.
This patch stack lets us eliminate almost all of this boilerplate by parsing `StaticPrefList.yaml`
at SpiderMonkey build time and generating code to automatically expose the `javascript.options.*`
prefs that have the `set_spidermonkey_pref` attribute.
Both JS shell and browser builds will default to the pref value in `StaticPrefList.yaml`.
In the JS shell, it'll be possible to set a pref value with `--setpref` or a custom shell flag.
Code for this will be added in later patches.
Differential Revision: https://phabricator.services.mozilla.com/D199992
I want to restrict a bit activeness setting (in particular, making sure
that this is only explicitly set for top levels, and in the parent
process).
This holds, in practice, except for these tests.
Rewrite test_gamepad_hidden_frame.html to use tabs instead of privileged
APIs.
Differential Revision: https://phabricator.services.mozilla.com/D199368
Looking up the BidiClass property via icu_properties is more efficient than the
built-in version provided in unicode-bidi.
Differential Revision: https://phabricator.services.mozilla.com/D198449
This will cause `./mach vendor rust` to pull it into the tree.
Note that actually running `./mach vendor rust` requires the file-size limit in vendor_rust.py
to be temporarily raised (from 100K to 300K is enough) because of large files in the icu_properties
crate. This does not contribute significant bloat to the binary, though, because only actually-used
data ends up in the build.
Differential Revision: https://phabricator.services.mozilla.com/D198446
Another edge-case difference due to unicode-bidi more closely following the UAX#9 recommendations
regarding directional controls. Any effects on real-world content are just as likely to be
positive as negative.
Differential Revision: https://phabricator.services.mozilla.com/D197893
The failure in bidi-011.xht occurs because unicode-bidi (unlike ICU4C) closely follows the
implementation notes in UAX#9 regarding treatment of the bidi embedding/override controls,
if the characters are not actually removed from the buffer during processing. The (non-normative)
algorithm given in the spec results in embedding initiators taking on the level of the context,
whereas the legacy ICU4C behavior gives them the level of the embedded (or overridden) text.
This difference affects bidi continuation creation when the directional controls occur exactly
at inline element boundaries, and is observable in this test.
We could fix this by post-processing the unicode-bidi results to conform to what ICU4C did,
but I don't think it's worth it for this extremely niche case (which is not mandated by any
spec, AFAICT; and it's unclear whether any particular behavior is better or worse than any
other). Moreover, applying a tweak to fix this will also revert the newly-passing examples
in css-text/white-space/white-space-collapse-002.html, so we'd lose as much as we'd gain.
The new failures in first-letter-punctuation-126 and -127 are because unlike ICU4C, unicode-bidi
(correctly, per spec) assigns level 2 to characters with class AN where the surrounding context
is level 0. These two examples use Arabic numeric punctuation characters that have class AN in
conjunction with a Latin letter (class L), and so we get a bidi level boundary between the letter
and the punctuation, which interferes with our first-letter implementation.
This is such an obscure edge case, extremely unlikely to ever occur in real content, that I'm happy
just marking it as an expected failure for now. Our entire first-letter implementation has much
more serious issues than this.
Differential Revision: https://phabricator.services.mozilla.com/D197892
unicode-bidi more closely follows the UAX#9 recommendations for processing embedding controls
if they're not actually removed from the text; but this is not an actual spec requirement,
so either behavior is acceptable.
Differential Revision: https://phabricator.services.mozilla.com/D197891
Rather than Diplomat-generated, this is hand-written to provide just the functionality needed in intl::Bidi,
to minimize the amount of glue code and ensure a close match to Gecko requirements.
Differential Revision: https://phabricator.services.mozilla.com/D197889
The built-in version is better as it also allows annotating particular
parameters (it not only applies to method declarations).
Differential Revision: https://phabricator.services.mozilla.com/D200432