On CI, where we open and close menu items in quick succession, we sometimes got
into a state where the new menu was opened while we were still in the old menu's
nested event loop. So we had the following sequence of events:
```
- old menu +[NSMenu popUpContextMenu:withEvent:forView:]
- nested event loop for old menu
- old menu -[NSMenu cancelTrackingWithoutAnimation]
- new menu +[NSMenu popUpContextMenu:withEvent:forView:]
- nested event loop for new menu
- new menu -[NSMenu cancelTrackingWithoutAnimation]
- new menu's event loop is exited, but old menu's event loop remains on the
stack
- shutdown hang here
```
MOZMenuOpeningCoordinator makes sure that +[NSMenu popUpContextMenu:withEvent:forView:]
is always called in sequence, never in a nested fashion.
Differential Revision: https://phabricator.services.mozilla.com/D113373
XPCOM complains when events are dispatched during shutdown. Since we're
shutting down, there's no really any point in dispatching these messages
anyway, so we can safely ignore them.
Differential Revision: https://phabricator.services.mozilla.com/D113203
Marionette uses GVE and sometimes closes the last tab and calls |Quit| at the
same time. When the last tab is closed, GVE will try to open a new tab with the
same content in it, to avoid leaving the browser in the "zero tabs" state. This
causes a race condition where the browser is shutting down and a new tab is
being created, which trips an assertion in our widget code.
During real life usage of the browser, calling Quit only happens during errors.
Because of that, and the fact that we're not seing this crash in the wild,
it should be safe to just fix the problem in GVE instead of supporting this
edge case in GeckoView.
To support the Marionette case, we allow GVE to stay at zero tabs. Some menu
elements need to be disabled (like reload tab and the url bar).
This has the added benefit of being able to test the "no windows" case in GVE
which wasn't possible until now.
Differential Revision: https://phabricator.services.mozilla.com/D113202
We've been using 3 on Nightly for a long time without
any problems and it's generally much better to keep the GPU
process around than give up on it.
We also bump the Nightly value to increase the chances of us
finding any problems where we should give up on using the GPU process.
Differential Revision: https://phabricator.services.mozilla.com/D113393
In some situations the FileIO stream's underlying file might not
exist anymore. Discarding the stream should not fail.
Depends on D112004
Differential Revision: https://phabricator.services.mozilla.com/D113379
Recent changes in cs_clip_image are exposing some cases where we are letting rectangles being warped
by perspective transform get considered as axis-aligned. This makes the axis-alignment check stronger
for clipping to guard against the Z dependency in the W coordinate that is messing up clipping.
Differential Revision: https://phabricator.services.mozilla.com/D113259
We currently wait for the "sessionstore-single-window-restored" notification and
*then* start listening for individual "SSTabRestored" events. This doesn't work
because we may fire those events before we get the chance to create the listener.
Listening for "browser-window-before-show" works consistently, but we need
references to the windows *before* they start restoring, so we have
to manually run the "Restore All Windows" code, instead of clicking the Library
button.
Originally part of the patch stack for bug 1703556.
Differential Revision: https://phabricator.services.mozilla.com/D112887
CLOSED TREE
Backed out changeset 9dea771db2ce (bug 1703934)
Backed out changeset 2a51d2530939 (bug 1703934)
Backed out changeset 6af76624ce86 (bug 1703934)
On Fenix we see many users with a value of opengl for the
gfx_status_compositor telemetry probe, despite the fact they are
running versions of gecko for which webrender should be enabled on
their device.
The theory is that although gecko is being initialized the user has
not opened a tab, and therefore initialized a compositor, since they
have been updated to a version which should be running webrender by
default. To verify that this is the case, this patch adds a new probe
gfx_status_last_compositor_gecko_version, which reports the gecko
version at the time a compositor is initialized. This will be used to
confirm that the users whose compositor unexpectedly reports opengl
have indeed not initialized a compositor in a while.
Differential Revision: https://phabricator.services.mozilla.com/D112339
We had about 9 gaps / unused bits. I moved the devtools ones at the end
because I think we should be able to remove them (but separate bug).
Differential Revision: https://phabricator.services.mozilla.com/D113365
The test got imported from the upstream web-platform-tests repository in
bug 1706987.
SharedArrayBuffer is only enabled on Android for Nightly builds (bug 1703968).
It will be enabled for all release channels including Beta and Release in
bug 1619655.
Differential Revision: https://phabricator.services.mozilla.com/D113363
The latest synchronization of the web-platform-tests with the upstrem
repository in bug 1707476 dropped 'PASS' as a possible result of this test on
macOS opt. Add it back to account for the unexpected passes observed
afterwards.
Differential Revision: https://phabricator.services.mozilla.com/D113357
Fractional scaling currently comes at a high performance cost as we
only support integer scaling for rendering. The overdraw ratio is
something like (ceil(scale) / scale)^2, which for 125% scaling means
we're drawing 2.56 times as much as we should.
In theory we already support everything needed to have proper fractional
scaling: Webrender support appears to be in great shape and on the Wayland
side we can use the wp_viewporter protocol to have arbitrary
buffer size <-> surface size relationships. The main blocker remains the
lack of proper negotiation between client and compositor about the
optimal buffer size.
In order to speed up the upstream discussion, lets implement it via a
fixed value that can be set in `about:config` for testing purposes
(`widget.wayland.fractional_buffer_scale`).
It will, of course, require wp_viewporter support from the compositor.
Differential Revision: https://phabricator.services.mozilla.com/D113321