See the comment in the code for the rationale. Having it in the other order
(before this patch) caused a but real rare intermittent on Linux and macOS, the
two OSes where this is used and the clock has a high enough resolution. This
happened when the first call was made before a millisecond mark and the second
one after, with the same time source: machines on treeherder don't suspend, the
numbers should be equal, but rarely the time excluding suspend was longer by 1ms
compared to the time including suspend.
Differential Revision: https://phabricator.services.mozilla.com/D109370
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
Apply the same technique as in addWatcherDataEntry in order
to better handle the case when a content process is being destroyed
while we call one of these two methods.
Differential Revision: https://phabricator.services.mozilla.com/D109336
The backend CompositorD3D11/CompositorOGL layers compositors can already do
partial clear optimizations for us if applicable. The only thing we need to
do is pass in the actual dirty/opaque regions so that it can utilize it.
Like with RenderCompositorSWGL, we move the actual allocation of the framebuffer
into StartCompositing when this information is known, rather than BeginFrame
which is too early in the frame to have this information yet.
Differential Revision: https://phabricator.services.mozilla.com/D109092
This fixes an inconsistency where IdIsIndex used MAX_ARRAY_INDEX (UINT32_MAX - 1)
as maximum index value and isIndex on JSLinearString/JSAtom used UINT32_MAX.
We now use MAX_ARRAY_INDEX as maximum index value for all of these.
In the future it might make sense to optimize index values >= UINT32_MAX better
(for example for large typed array indexes) and separate these two kinds again
somehow, but for now it's better to be consistent.
Differential Revision: https://phabricator.services.mozilla.com/D109268
IOUtils now provides a shutdown client for clients to register IO jobs with
that need to run before shutdown finishes. This allows IO jobs to run during
the profileBeforeChange phase.
IOUtils' event queuing has been refactored into a singleton EventQueue class,
which is responsible for running tasks and setting up shutdown blockers. It is
now guarded behind a StaticDataMutex so that is more explicitly clear what is
and is not re-entrant. (The atomic sShutdownFinished cannot be placed behind
the mutex because we need to keep track of that state even when we do not have
an EventQueue.)
Differential Revision: https://phabricator.services.mozilla.com/D103973
This lets the WindowServer do all of the color correction for us
including WebGL and 2D canvas.
There's some concern that this will increase GPU usage as
reported in https://bugs.chromium.org/p/chromium/issues/detail?id=417150#c34.
However, the alernative of doing everything in device space isn't very
attractive because we'd have to color manage canvas and webgl ourselves.
Further, Chrome doesn't seem to be using the device space and it seems
like there's typically already a mix of color spaces in use so hopefully
the GPU increase is not high.
Differential Revision: https://phabricator.services.mozilla.com/D109383
Bug 1650705's geckoview-junit test counts the number of input event times.
It is unnecessary to wait for selection event and Gecko may not sometimes
fire selection event on input or textarea element. So use
InputConnection.setSelection directly instead of waiting for DOM event.
Differential Revision: https://phabricator.services.mozilla.com/D109354
Everybody uses the promise-style equivalent so we can just move over
the documentation and drop the function.
Depends on D109248
Differential Revision: https://phabricator.services.mozilla.com/D109249
The test basically was written for Fission, but unfortunately it fails
intermittently without Fission becasue, I assume, there was a pre-existing race
condition causing the failure without Fission, so we are going to skip the
test without Fission for now.
Differential Revision: https://phabricator.services.mozilla.com/D109250