Otherwise autoplay blocking until-in-foreground breaks with the other
patch in this bug, because it unblocks media playback once a browsing
context is active for the first time.
Differential Revision: https://phabricator.services.mozilla.com/D42329
The following operations on WebAssembly.Table can take an optional parameter.
* new WebAssembly.Table(descr, <initvalue>)
* table.set(index, <newvalue>)
* table.grow(delta, <initvalue>)
Current support is inconsistent. The constructor didn't support the parameter at
all, the setter always required the parameter, and grow supported the parameter
as optional.
One additional wrinkle is that the behavior for an omitted parameter depends on
the table type. funcref (and presumably eqref, but unspecified) defaults to null
when the value is not specified. externref is to default to undefined. [1]
This behavior is odd, but appears to be required to be backwards compatible with
respect to funcref, and to be consistent with JS semantics of optional parameters
meaning 'undefined' for externref.
[1] https://webassembly.github.io/reference-types/js-api/index.html#dom-table-table
Differential Revision: https://phabricator.services.mozilla.com/D101946
The visibilityState being hidden doesn't necessarily mean that pageshow
hasn't run, it might also mean that the browser is not yet active, so
the test is racy. If the browser becomes active before pageshow runs,
then this code works as intended, but if pageshow has already fired but
the browser is not yet active, then the activeness change will fire a
visibilitychange event, but not a pageshow, and the document will become
visible but the test won't continue.
This race will become more frequent with D42329. Since we know that
pageshow has to have fired once the visibilityState is visible, wait for
that.
Differential Revision: https://phabricator.services.mozilla.com/D102638
Use Registers::SetType and FloatRegisters::SetType as casts when we can,
and use PackedRegisterMask where it's intended - or what's the point of
having it?
Differential Revision: https://phabricator.services.mozilla.com/D102433
Enabling help and feedback links in Windows and Linux by making sure the functions for these are available in the About dialog in Windows and Linux builds.
Differential Revision: https://phabricator.services.mozilla.com/D102512
These lines are parsed by the `htmlparser` and are expected to be on a single
line. The `black` reformat has moved some of these definitions to multiple lines
due to line length. This commit moves all declarations back to a single line and
adds `fmt: {off,on}` statements so they will be ignored in future reformats.
Differential Revision: https://phabricator.services.mozilla.com/D102626
Under software WebRender, performance is substantially improved if we make the approximations in ClipItemKind::get_clip_result more accurate.
That function's job is to decide whether a primitive falls entirely inside a
clip, entirely outside it, or has regions of both. If the primitive is known to
fall entirely inside the clip, WebRender doesn't bother applying the clip to it.
This also saves WR the trouble of rendering the clip mask itself - which is what
the cs_rectangle_clip shader is spending a lot of time on when displaying these
pages.
Before this change, ClipItemKind::get_clip_result handles rounded rectangle clip
regions by computing an 'inner rect', a rectangle inset from the rounded
rectangle on each side by the relevant rounding radii. This is a correct
conservative approximation, but it means that any primitive that lies flush with
one of the flat sides of the clip is considered to only be partially within the
clip, and thus needs to have the clip mask applied - even though simple
rectangle intersection would serve.
With this change, instead of an 'inner rect', we approximate the rounded
rectangle by a rectangle with rectangular chunks taken out of each corner. This
lets us recognize more primitives as being fully within the clip, and apply the
clip mask less often.
Differential Revision: https://phabricator.services.mozilla.com/D102526
Apple Silicon does not provide any way to figure out the JSCVT flag at runtime.
This patch hard code in the MOZ_AARCH64_JSCVT macro the expected value of the
JSCVT flag expected on Apple Silicon hardware.
Differential Revision: https://phabricator.services.mozilla.com/D101208
Otherwise autoplay blocking until-in-foreground breaks with the other
patch in this bug, because it unblocks media playback once a browsing
context is active for the first time.
Differential Revision: https://phabricator.services.mozilla.com/D42329
This uses a similar approach to LICM / BoundsCheckHoisting / etc.
Note that if we would have hit the unbox anyway, then we'll hit it after bailing out and update the CacheIR, so this won't cause us to recompile additional times. This means that we could end up turning off FoldLoadsWithUnbox in cases where it's not the problem, but unlike LICM it's not making a big enough difference to justify special treatment.
Differential Revision: https://phabricator.services.mozilla.com/D102505
This prevents us from instantiating accessibility (and incurring a significant performance cost later in the runtime) when we already know the answers a caller will receive if a11y were instantiated.
Differential Revision: https://phabricator.services.mozilla.com/D102371
This renames the data structures inside Chunk:
ChunkInfo -> TenuredChunkInfo
PerArenaBitmap -> DecommitBitmap
ChunkBitmap -> MarkBitmap
ChunkBase -> TenuredChunkBase
This also renames TenuredChunkBase::bitmap to markBits.
Depends on D102394
Differential Revision: https://phabricator.services.mozilla.com/D102395
Currently the decommit task uses Chunk's next pointer to for a singly linked list of chunks awaiting decommit. This is kind of dubious since they are supposed to be NurseryChunks at this point.
This changes the decommit task to use a vector and simplifies the threading requirements by having us always wait for the previous decommit to finish before starting a new one.
Depends on D102393
Differential Revision: https://phabricator.services.mozilla.com/D102394
We used to not do anything on navigation for the error count
at the toolbox level, but the test we had to check that the
count was reset on navigation was working; this is because
there's a hook in the console panel to clear the error count
when the console is cleared, and in the test, the console panel
was selected.
This patch fixes that and adds a new test that run some assertion
on reload, without ever enabling the console panel.
Since some assertions seem redundant with the test we already had,
we remove them from the old test.
Differential Revision: https://phabricator.services.mozilla.com/D102325
EventStateManager::PostHandleEvent would do the same thing, but need to handle
the cases that PresShell is destroyed and frame is destroyed in
pointerup/pointercancel event listener.
The former case would be handled in D102403. For the latter case, we allow
EventStateManager::PostHandleEvent to handle pointerup/pointercancel event while
frame is no longer available in this patch.
Differential Revision: https://phabricator.services.mozilla.com/D102404
Found a possible leak from running layout/base/tests/test_bug993936.html after
enable implicit pointer capture for touch event. The test synthesize touchstart
and touchmove event, but no touchend, so we don't run the release steps and the
PointerCaptureInfo still hold a reference to Element which cause the leak.
This could also possible happens in real world, for example, user touch a page
with finger that triggers pointer capture, and then tab get closed before touch
is released.
Differential Revision: https://phabricator.services.mozilla.com/D102403