Firstly we need to find a usable ScriptLoader for code in the content script sandbox,
for that we use the normal ScriptLoader associated with DOMWindow wrapped by the sandbox.
Secondly we need to execute the module in the global of the sandbox instead of the
"ScriptGlobal" the ScriptLoader is actually associated with. The main
behavior change here comes from using xpc::NativeGlobal in HostImportModuleDynamically
and passing that global around inside ScriptFetchOptions.
To ensure that content-scripts and the webpage don't share imported modules,
the module map (mFetchingModules and mFetchedModules) now uses a complex key
of <URI, Global>. The Global is a nullptr for normal imports from a webpage.
Differential Revision: https://phabricator.services.mozilla.com/D107076
This fixes an inconsistency where CacheChildrenInSubtree uses the
flattened tree via DOM child iterators, but ProcessInvalidationList uses
GetContainerAccessible that doesn't currently use the flattened tree.
Differential Revision: https://phabricator.services.mozilla.com/D108980
This lets us speed up JSAtom to PropertyKey conversions. This matters for example
for megamorphic GetElem lookups (a very hot code path for modern JS frameworks).
Although this calls isIndexSlow for each atom we create, it still results in a lot
less calls to that method compared to before, when browsing some popular websites.
Differential Revision: https://phabricator.services.mozilla.com/D108743
StringIsArrayIndex is almost identical to isIndex/CheckStringIsIndex, but it's
limited to UINT32_MAX - 2 instead of UINT32_MAX.
This patch de-duplicates this with an explicit check for the smaller max length.
This ensures we can benefit from the index-value optimization and the ATOM_IS_INDEX
flag added in the next patch.
The difference in maximum length is still confusing and should probably be cleaned
up separately.
Differential Revision: https://phabricator.services.mozilla.com/D108742
Many WPT reftests compare Ahem glyphs (squares) with a reference that uses simple shapes
such as a <div> with a solid background that is expected to have the exact same size.
If antialiasing is applied to the Ahem font, such tests will often fail because of
faint antialiasing pixels at the edges of the square glyphs, even though the test is
"passing" in terms of what it actually aims to check.
Rather than annotate all such tests as "fuzzy", Gecko has an option to disable antialiasing
for the Ahem font, despite it being enabled for font rendering in general, and we use this
when running the WPT reftests. However, this depends on the font-family name being exactly
"Ahem".
Therefore, in the tests which load Ahem via @font-face and override some descriptors,
we still want to use "Ahem" as the resulting family name (shadowing the standard Ahem,
if it is locally installed) so that the non-antialiased rendering will be used.
(In the case of metrics-override-normal-keyword, there are multiple "custom" versions
of Ahem loaded by the testcase, so we instead take the approach of also loading it with
a modified family name in the reference; then both testcase and reference will get
the default antialiased font rendering rather than special "Ahem" treatment.)
Differential Revision: https://phabricator.services.mozilla.com/D109290
Also removes dead code from the old "Recommended themes" section, along with the unnecessary negative margins that went with it.
Differential Revision: https://phabricator.services.mozilla.com/D108362
This commit adds a simple pageload test, a warm pageload of https://www.google.com.
Low-level perfstats are collected.
All platforms were included. Not running as a cron job.
The motivation is that we can now collect low-level perfStats timings and determine how useful they will be for performance work.
Differential Revision: https://phabricator.services.mozilla.com/D109072
asan and debug builds are always set to the 'default' update channel (used by
FeatureGate to determine the build channel) while the independent build channel
determines conditional variables depending on it.
The HTTP/3 feature preference network.http.http3.enabled depends on the
variable EARLY_BETA_OR_EARLIER since bug 1699490).
Differential Revision: https://phabricator.services.mozilla.com/D109205