When GtkWidget is hidden, underlying wl_surface is deleted. We need to also update EGLSurface of GtkWidget (GtkCompositorWidget)
as EGLSurface is directly linked to wl_surface:
- When GtkWidget is hidden, call GtkCompositorWidget::DisableRendering(). That releases GtkCompositorWidget resources
related to GtkWidget (XWindow/XVisual etc.) and marks the widget as hidden.
- If GtkWidget is backed by EGL call compositor resume which forces compositor to create new EGLSurface.
- Make sure GLContextEGL can create EGLSurface even when GtkWidget is hidden and wl_surface is missing.
It prevents fallback to SW rendering or pause RenderCompositorEGL which leads to Bug 1777664 (whole browser UI freeze).
- Return early from RenderCompositorEGL::BeginFrame()/RenderCompositorEGL::EndFrame() when GtkCompositorWidget is hidden.
Depends on D157357
Differential Revision: https://phabricator.services.mozilla.com/D157358
Map/Unmap signals creates and deletes mContainer wayland surface and EGL window.
As we need to call the handlers in correct order (mContainer::map -> nsWindow::map and nsWindow::unmap -> mContainer::unmap)
connect the signals to mContainer widget and call mContainer::unmap from nsWindow::unmap.
Then nsWindow::unmap can update compositor before wl_surface/EGL window is released by mContainer.
Differential Revision: https://phabricator.services.mozilla.com/D157357
This is a regression from:
Bug 1494364 - don't prune proxy if all non-direct proxies are disabled
This pref preserves existing behaviour (and regression) but allows users to opt out of this behaviour which might cause slow browsing when the proxies are not responsive.
We might implement a proper fix for this problem in Bug 1791655.
Differential Revision: https://phabricator.services.mozilla.com/D157825
According to the issue which added the test, the test intended that web driver
collapsing selection to end of the last editable text node at sending the text
do an editable element. However, it seems that GeckoDriver does not do it but
the test accidentally passed since `HTMLEditor` has collapsed selection to end
of last leaf node even if the node is not editable. Therefore, the test does
not check what the author expected enough (e.g., when there is another node
at end of the `<body>`, when there is a collapsed selection range outside
editor, when another editable element has focus).
Therefore, we can just mark the tests as known failures since we've not
explicitly support the behavior yet.
Differential Revision: https://phabricator.services.mozilla.com/D157777
It may be called even when there is no selection range and focused element.
However, it assumes that there is a selection range, and an editable element
has focus. Therefore, now, if there is an editing host and user tries to
do "Select All" without clicking somewhere before doing it, "Select All" does
nothing.
Differential Revision: https://phabricator.services.mozilla.com/D157409
They and their callees work with the result of `GetRoot()` which is the document
element or the body element. If the body is not editable, `Selection` should
not be updated in non-editable region nor `<br>` elements should not be
inserted in both non-focused editable elements and non-editable elements.
Therefore, they should run only when the document element or the `<body>`
element is editable.
To keep testing crashtests as reported, this patch makes tests which have
`contenteditable` except `<html>` and `<body>` initialize `Selection` as
what we've done. And clean up the tests for helping to port them to WPT
in the future (bug 1725850).
Differential Revision: https://phabricator.services.mozilla.com/D157408
It does different thing for `TextEditor` and `HTMLEditor`, and used almost
internally. Therefore, it should be implemented in the sub classes and
we should name them better.
Differential Revision: https://phabricator.services.mozilla.com/D157407
The method is enough simple, and uses bad cast from point of view of OOP.
Therefore, this patch make the sub classes implement the method only for each.
Differential Revision: https://phabricator.services.mozilla.com/D157406
nsTransferable was modified to prevent disk leakings when copying data
in private browsing mode with Bug 1123480.
However, the context is nullptr when it is initialized, so it still
leaks if PBM is enabled by default.
Our solution is to check the browser.privatebrowsing.autostart in this
condition.
Differential Revision: https://phabricator.services.mozilla.com/D157800
Basically, we need to detect a case if there is only scroll animations
which are not sampled because it goes back to before phase. If this
happens, we set ScrollToDelay to |mReason| in the returned value.
Without this patch, the visual result is intermittent because it
is possible that there are new animations arrived at the moment when
scrolling from active phase to before phase.
We don't have a test for after phase because we don't support end delay
for scroll animations now. However, although we set the adjusted fill, we may
still need this in the future so let's keep the check of after phase for now.
Differential Revision: https://phabricator.services.mozilla.com/D155108
Apply the usual HCM hover style to buttons in Firefox View, but also
override some of the custom properties for HCM so that Emily's patch for
bug 1790396 can use the same custom properties for feature callout hover
styles that we use in system content generally.
Differential Revision: https://phabricator.services.mozilla.com/D157364
Basically, we have to inavliadate the layout if AspectRatio gets changed.
In the test case, it's possible to retrieve the aspect-ratio from the
mapped attribute at the beginning. After the image gets loaded, we retrieve
the aspect-ratio from the image itself (i.e. natural aspect-ratio). Both
AspectRatio objects use different |mUseBoxSizing|s which have impact on
the calculation of the ratio-dependent size, so we have to trigger the
invalidation if the flag is changed, even if |mRatio| is the same.
It's a race condition, so the test case fails intermittently without this patch.
After applying this patch, we should always pass this reftest.
Differential Revision: https://phabricator.services.mozilla.com/D157763