Граф коммитов

31153 Коммитов

Автор SHA1 Сообщение Дата
David Shin de21b63d34 Bug 1785046 - Part 1: Change Windows print file output to write to a temp file first, then move it. r=emilio,nika
Compared to other platforms, on "printing" PDF files, Windows writes straight
to the destination path. This causes the mainthread to become less responsive
if the path is slow (e.g. Network drive over VPN).

This still causes a mainthread block at the time the file is moved, but:
- Brings Windows' behaviour in line with other platforms
- Avoids `PrintTargetPDF` becoming async, which is less meaningful on
  other platforms
- Reduces the async site to one (i.e. moving to destination path)

Differential Revision: https://phabricator.services.mozilla.com/D163506
2022-12-19 15:42:46 +00:00
Botond Ballo 7b3b788267 Bug 1785754 - Simplify Android widget code for handling the eIgnore status. r=dlrobertson,hiro,geckoview-reviewers,m_kato
APZ now ensures that GetHandledResult() is Unhandled when appropriate,
so the widget code doesn't need to special-case eIgnore any more.

Differential Revision: https://phabricator.services.mozilla.com/D164585
2022-12-19 05:16:54 +00:00
Botond Ballo 7b0f88ac4e Bug 1785754 - Report HANDLED_CONTENT on pages with a preventDefault()-ing event listener even if the page is not scrollable. r=geckoview-reviewers,hiro,dlrobertson,m_kato
This effectively backs out the fix for bug 1746336, while keeping the test
added in that bug (PanZoomControllerTest#touchActionWithWheelListener)
passing using a different fix approach (remembering the eager status
and using it in the computation of the delayed result).

Differential Revision: https://phabricator.services.mozilla.com/D164114
2022-12-19 05:16:52 +00:00
Brad Werth d74d4796ef Bug 1631735 Part 1: Improve macOS native fullscreen behavior. r=mstange
This is a modified version of Haik's patch D114133. It aims to fix the
issues that cause our macOS native fullscreen tests to fail. To accomplish
this, it does these things:

1) It clarifies that emulated fullscreen and native fullscreen are
distinct end states. You can transition to fullscreen using either
method, but from there you can only leave fullscreen. In other words you
can't go directly from emulated fullscreen to native fullscreen nor the
other way.

2) It captures the NSWindow delegate methods associated with a native
fullscreen transition, and uses these to trigger and update the
transition in and out of native fullscreen. It is still possible to
programmatically trigger a native fullscreen transition using
DoMakeFullscreen.

3) It correclty handles requests to change fullscreen while a fullscreen
transition is still in progress. If a contrary change is requested during
transition, then the transition is marked for reversion when it's
complete.

Notably, it does *not* attempt to send any kind of event when the native
fullscreen transition is complete. There is no event-based method for the
browser (or the test harness) to know when the transition is complete. The
test harness will typically check for the sizemode events, which are sent
when the fullscreen transition begins. If the test harness quickly toggles
fullscreen off again, then the transition will be marked for reversion,
and the test harness will detect the the end of fullscreen as soon as the
reverting transition begins.

Callers could get the nsCocoaWindow into the wrong state by requesting
native fullscreen, and then while the transition is happening, requesting
an exit of fullscreen and then requesting emulated fullscreen. This would
be really hard for a user to accomplish, and our test harness should be
waiting for sizemode events after each transition and so it won't request
fullscreen in rapid succession like that.

Differential Revision: https://phabricator.services.mozilla.com/D160097
2022-12-16 22:36:19 +00:00
Lee Salzman e599e9d352 Bug 1806058 - Add blocklist for Accelerated Canvas2D. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D164881
2022-12-16 20:15:49 +00:00
Matthias Camenzind 6ab2205073 Bug 1806115 - Add missing include in WidgetMessageUtils.h for --disable-accessibility. r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D164913
2022-12-16 19:04:12 +00:00
Nika Layzell 9e65358787 Bug 1799222 - Part 1: Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-16 17:09:16 +00:00
Tom Schuster a2b50eda96 Bug 1800425 - Support text/uri-list for file drag&drop. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D162009
2022-12-16 15:29:17 +00:00
sotaro 9df22d9664 Bug 1798245 - Enable video overlay without ZeroCopyNV12Texture with non-intel GPUs to release r=jrmuizel,gfx-reviewers
Bug 1798242 did not cause a regression. Then it seems OK to try to enable video overlay without ZeroCopyNV12Texture with non-intel GPUs to release.

Differential Revision: https://phabricator.services.mozilla.com/D164634
2022-12-16 00:54:14 +00:00
Matthias Camenzind c9300fab1e Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-15 23:13:00 +00:00
Matthias Camenzind 5d9dfb1656 Bug 1786048 - Part 1: AppWindow can't skip SetSize calls, HeadlessWidget has to notify when moved. r=emilio
Two minor changes that otherwise might go unnoticed in the following
parts:

- AppWindow can't skip SetSize calls that match the current size. On
  Linux a previous call might not have changed the size yet. If the
  current call is skipped, the previous call can ultimately dictate the
  resulting size.

- BrowserParent should not have to call UpdatePosition when receiving
  new dimensions from BrowserChild. But HeadlessWidget needs to call
  NotifyWindowMoved when moved.

Differential Revision: https://phabricator.services.mozilla.com/D160259
2022-12-15 23:12:59 +00:00
Cosmin Sabou 441a13eec1 Backed out changeset 337925bb04cf (bug 1801391) for causing fullscreen related wpt failures. CLOSED TREE 2022-12-15 14:31:57 +02:00
Edgar Chen 2e047ca037 Bug 1801391 - Avoid handling multiple widget fullscreen at the same time; r=smaug
We had some protection in https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/base/nsGlobalWindowOuter.cpp#4259-4265,
but it isn't enough, it is still possible that fullscreen state get confused if
there are multiple request happens at a short time.

This patch tries to improve how we handle multiple request, we don't need to
track each request, but need to ensure widget matches with the latest fullscreen
state specified.

Differential Revision: https://phabricator.services.mozilla.com/D163311
2022-12-15 10:19:24 +00:00
stransky c2672dc4b0 Bug 1804973 [Wayland] Check size for valid EGLWindows only r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164651
2022-12-15 08:09:22 +00:00
Jonathan Watt c89f281f5e Bug 1805716 - Stop overwriting the print settings passed to nsIPrintDialogService::showPrintDialog with saved prefs. r=dholbert
Nowadays, only the frontend code should pre-populate the nsIPrintSettings
objects with saved prefs (before passing them those objects to platform code).
We removed the InitPrintSettingsFromPrefs calls from the Windows and Linux
native dialog code, but apparently not the macOS code.

Differential Revision: https://phabricator.services.mozilla.com/D164709
2022-12-14 21:58:17 +00:00
Tom Schuster a93e3a2add Bug 960984 - Implement the list attribute for <input type=color>. r=emilio,geckoview-reviewers,m_kato
UI support on Windows and Linux. macOS and Android are not supported.

Differential Revision: https://phabricator.services.mozilla.com/D163796
2022-12-14 18:17:59 +00:00
Jonathan Watt 93e114e684 Bug 1805477 - Prevent pages-per-sheet on macOS being double applied by system print dialog. r=dholbert
Note: NSPagesAcross/NSPagesDown is internal API to Apple and is basically
unknown to the Internet. I discovered it by digging through printing structs in
a debugger while trying to find out how the pages-per-sheet information was
being communicated internally in Cocoa. However, after finding it, I see Google
knows about a grand total of 18 pages on the Internet that mention it, all as
part of debug info dumps. That's still helpful though, since it shows that
these two dictionary entries have been in use since at least 2008, giving some
confidence about backwards compatibility and that it will likely remain in use.

Related to these dictionary keys, Apple's official documentation claims that
there are similarly named keys called NSPrintPagesAcross/NSPrintPagesDown:

https://developer.apple.com/documentation/appkit/nsprintpagesacross
https://developer.apple.com/documentation/appkit/nsprintpagesdown

However, I couldn't get those to work, either to read values or to set values.
The references I could find to them on the Internet were in debug output and
people also stating they couldn't get them to work. I have to wonder if someone
at Apple changed the names at some point and forgot to update the
documentation?!

Finally, note that NSPrintPagesPerSheet is long deprecated and nowadays just
has a dummy value of "1" hardcoded.

https://developer.apple.com/documentation/appkit/nsprintpagespersheet

Differential Revision: https://phabricator.services.mozilla.com/D164317
2022-12-14 00:40:38 +00:00
Jonathan Watt 1d98de863a Bug 1755974 - Fix Linux system print dialog to take the pages-per-sheet from print preview. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D164621
2022-12-14 00:04:21 +00:00
Butkovits Atila 314ba119e0 Backed out changeset f42cde0309b3 (bug 1805477) for causing build bustages at nsPrintDialogX. CLOSED TREE 2022-12-14 01:18:58 +02:00
Jonathan Watt 388280189f Bug 1805477 - Prevent pages-per-sheet on macOS being double applied by system print dialog. r=dholbert
Note: NSPagesAcross/NSPagesDown is internal API to Apple and is basically
unknown to the Internet. I discovered it by digging through printing structs in
a debugger while trying to find out how the pages-per-sheet information was
being communicated internally in Cocoa. However, after finding it, I see Google
knows about a grand total of 18 pages on the Internet that mention it, all as
part of debug info dumps. That's still helpful though, since it shows that
these two dictionary entries have been in use since at least 2008, giving some
confidence about backwards compatibility and that it will likely remain in use.

Related to these dictionary keys, Apple's official documentation claims that
there are similarly named keys called NSPrintPagesAcross/NSPrintPagesDown:

https://developer.apple.com/documentation/appkit/nsprintpagesacross
https://developer.apple.com/documentation/appkit/nsprintpagesdown

However, I couldn't get those to work, either to read values or to set values.
The references I could find to them on the Internet were in debug output and
people also stating they couldn't get them to work. I have to wonder if someone
at Apple changed the names at some point and forgot to update the
documentation?!

Finally, note that NSPrintPagesPerSheet is long deprecated and nowadays just
has a dummy value of "1" hardcoded.

https://developer.apple.com/documentation/appkit/nsprintpagespersheet

Differential Revision: https://phabricator.services.mozilla.com/D164317
2022-12-13 22:40:34 +00:00
Makoto Kato a628865b23 Bug 1805127 - Don't use AndroidBridge to get release version. r=geckoview-reviewers,calu
Actually, we can get Android release version from JNI generator, so it is
unnecessary to use `AndroidBridge` to get it.

Also, this cleans up unused AndroidBridge functions.

Differential Revision: https://phabricator.services.mozilla.com/D164431
2022-12-13 11:57:06 +00:00
stransky 07fa4069a7 Bug 1772073 [Wayland] Call gtk_window_set_transient_for() only if widget parent is changed r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164194
2022-12-08 10:49:13 +00:00
Cosmin Sabou 7089ec234d Backed out changeset 3b9e2c9256f8 (bug 1803966) for causing regressions on bugs 1786514, 1792516 and 1789145. 2022-12-08 01:52:10 +02:00
Emilio Cobos Álvarez be6bc3a575 Bug 1802314 - Use non-native tooltips in the cocoa non-native theme too. r=spohl
We implemented a basic ThemeGeometry-based tooltip in
https://hg.mozilla.org/integration/autoland/rev/e8d65866112f, but now
that we have non-native theme support for these it seems ok to just use
it.

Differential Revision: https://phabricator.services.mozilla.com/D163023
2022-12-07 18:47:53 +00:00
Emilio Cobos Álvarez 799823f5d7 Bug 1802314 - Return a contrasting color for Infobackground in dark mode. r=spohl
Bug 1796849 implemented proper non-native tooltips so that we can draw
them in mismatched themes in GTK. That uses the InfoBackground /
InfoText color pair, which is the right color pair.

However on macOS InfoBackground didn't have dark-mode support (while
InfoText did), causing contrast issues.

Differential Revision: https://phabricator.services.mozilla.com/D163022
2022-12-07 18:47:53 +00:00
Emilio Cobos Álvarez 04b28aaead Bug 1755564 - Tweak spell checker underline color in dark mode. r=spohl
I think this is a slightly better color and saves me from actually
making a decision over the options in comment 9 and so on.

I'll ask Firefox UX to take a look at comment 9 so that they can
evaluate and make a decision (and maybe tweaking our link colors), if we
want to change it.

Depends on D163402

Differential Revision: https://phabricator.services.mozilla.com/D163403
2022-12-07 18:44:58 +00:00
Emilio Cobos Álvarez fb4758fe7f Bug 1755564 - Make SpellCheckerUnderline go through the stand-in color code-path. r=geckoview-reviewers,calu
This doesn't change behavior since it's red for all platforms including
the standins.

Depends on D157748

Differential Revision: https://phabricator.services.mozilla.com/D163402
2022-12-07 18:44:57 +00:00
Olli Pettay 02dc105128 Bug 1803966 - Consider to not trigger the paint of the initial about:blank so eagerly when doing a process switch, r=emilio
This is a micro-optimization to process switching.  Often the paint delayes child process to send back information that it is ready to receive data from the parent process.
There are be other tiny issues like this too.

Differential Revision: https://phabricator.services.mozilla.com/D163789
2022-12-07 00:34:34 +00:00
Daniel Baker 31973511fd Bug 1804287 - Added build version to cached features to refresh cache with new builds.;r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D163974
2022-12-06 23:04:33 +00:00
Emilio Cobos Álvarez 5b9f9d24c6 Bug 1798131 - Fix leave-notify handling on X11 (and stop doing pointer grabbing there). r=stransky
The main issue is the confusion between mGdkWindow and the toplevel when
we draw with client decorations. Though something else broke since we
enabled them and now even with MOZ_GTK_TITLEBAR_DECORATION=system the
bug reproduces.

The thing that's supposed to hide the tooltip on nsXULTooltipListener is
the mouseout event handler, but without this fix we would upgrade the
eMouseExitFromWidget to a synthesized mouse move here:

  https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/events/EventStateManager.cpp#721-732

Make leave-notify handling properly parallel to enter-notify in order to
properly notify gecko of the mouse leaving the window, thus fixing the
bug.

We also need to stop doing pointer grabs. Reasoning:

 * We already don't do it on Wayland (see bug 1377084).
 * The APIs we use are deprecated.
 * The pointer grabs send spurious top-level leave/enter-notify pairs
   which aren't detectable (the leave/enter event pair sent to the
   toplevel window doesn't have the GDK_POINTER_{GRAB,UNGRAB} reasons).
 * The code we had to avoid them (bug 369599) no longer works with CSD:
   * The window gets hit even though it's behind other windows.
   * The hit-test still returns true when hitting the window decorations.

So we're effectively eating virtually all useful leave-notify events,
which is obviously not great. Also gtk4 apps don't seem to have the same
pointer-grabbing on context menus etc.

Differential Revision: https://phabricator.services.mozilla.com/D163646
2022-12-06 22:54:49 +00:00
Cristian Tuns 77f27d96b0 Backed out changeset 42315c023471 (bug 1799222) for causing multiple failures CLOSED TREE 2022-12-06 16:35:58 -05:00
Nika Layzell 40a3a64aee Bug 1799222 - Prevent accidental dispatches to threadpool and timer threads, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,media-playback-reviewers,jesup,m_kato,padenot,kmag
Differential Revision: https://phabricator.services.mozilla.com/D161349
2022-12-06 20:44:15 +00:00
stransky f2dd95dadb Bug 1795851 [Wayland] Update EGL window size/scale in moz_container_wayland_get_egl_window() r=emilio
We need to return correct EGLWindow from moz_container_wayland_get_egl_window() with correct scale/size
and also keep the EGLWindow up to date. In this patch we do:

- Implement moz_container_wayland_egl_window_needs_size_update() and use it in nsWindow::SetEGLNativeWindowSize().
  Avoid redundant moz_container_wayland_egl_window_set_size()/moz_container_wayland_set_scale_factor() calls as it may lead to resize callback calls to MESA.
- If wl_container::eglwindow is present, check its size/scale in moz_container_wayland_get_egl_window() and update size/scale if needed.
- Use nsIntSize single param instead of width/height pairs in some moz_container_* functions.
- Assert when gtk_widget_get_window(container) returns null.

Differential Revision: https://phabricator.services.mozilla.com/D163698
2022-12-06 15:18:32 +00:00
stransky e886ea784f Bug 1795851 [Linux] Log screen scales for ScreenHelperGTK r=emilio
Depends on D163696

Differential Revision: https://phabricator.services.mozilla.com/D163697
2022-12-06 15:18:31 +00:00
stransky acd2aeb372 Bug 1795851 [Linux] Add more logging to GtkCompositorWidget r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163696
2022-12-06 15:18:31 +00:00
Emilio Cobos Álvarez 3f3f8f7152 Bug 1802734 - Use non-native menus in Win10+ HCM. r=Gijs,ayeddi
I thought of adding that border-y thing, but no other native menus have
them on Win11 at least (tried Explorer and Settings).

It should be doable tho, lmk if you insist.

Differential Revision: https://phabricator.services.mozilla.com/D163172
2022-12-05 19:30:35 +00:00
stransky 407b5e4367 Bug 1802114 [Linux] Implement AsyncHasDataMatchingFlavors() r=nika
Implement async clipboard handler for AsyncHasDataMatchingFlavors().

Differential Revision: https://phabricator.services.mozilla.com/D162835
2022-12-05 10:40:50 +00:00
az 5b339dcae4 Bug 1756459 - Record VA-API accelerated decode support in glxtest for display in about:support. r=stransky,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D156712
2022-12-05 09:52:59 +00:00
Hiroyuki Ikezoe c3b856bff3 Bug 1801782 - Drop a redundant pan update phase in panRightToLeft. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D163181
2022-12-04 23:41:42 +00:00
Hiroyuki Ikezoe 8dc3ae36b3 Bug 1801782 - Move utility functions for sending pan events into apz_test_native_event_utils.js. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D162950
2022-12-04 23:41:41 +00:00
Iulian Moraru 1e33a773fb Backed out changeset 0d486f4ff0c0 (bug 1802114) for causing mochitest failures on test_ext_async_clipboard.html. CLOSED TREE 2022-12-04 22:47:02 +02:00
stransky 6dea869893 Bug 1802114 [Linux] Implement AsyncHasDataMatchingFlavors() r=nika
Implement async clipboard handler for AsyncHasDataMatchingFlavors().

Differential Revision: https://phabricator.services.mozilla.com/D162835
2022-12-04 19:07:19 +00:00
Emilio Cobos Álvarez bf94680a56 Bug 1638052 - Implement Buttonborder/mark/marktext. r=geckoview-reviewers,calu,dholbert
Needs some extra test expectation updates.

Differential Revision: https://phabricator.services.mozilla.com/D157748
2022-12-03 11:19:56 +00:00
Cosmin Sabou 49a2e8b82c Backed out changeset 7c3b662ef3fc (bug 1798131) for turning bug 1775659 into permafail on linux. 2022-12-03 01:15:55 +02:00
Sandor Molnar 91267bb248 Backed out changeset 5f89b0e8bdb5 (bug 1638052) for causing wpt failures in css/css-color/deprecated-sameas-018.html 2022-12-03 00:51:39 +02:00
Emilio Cobos Álvarez d52a61dd38 Bug 1638052 - Implement Buttonborder/mark/marktext. r=geckoview-reviewers,calu,dholbert
Needs some extra test expectation updates.

Differential Revision: https://phabricator.services.mozilla.com/D157748
2022-12-02 19:12:22 +00:00
Sandor Molnar a1e9c1d43b Backed out 4 changesets (bug 1786048) for causing multiple failures. CLOSED TREE
Backed out changeset ae94135e68ef (bug 1786048)
Backed out changeset f505df8a481a (bug 1786048)
Backed out changeset 999a18d6f33e (bug 1786048)
Backed out changeset e71e8644b8a9 (bug 1786048)
2022-12-02 20:30:07 +02:00
Emilio Cobos Álvarez 68004d0eb9 Bug 1798131 - Fix leave-notify handling on X11. r=stransky
The main issue is the confusion between mGdkWindow and the toplevel when
we draw with client decorations. Though something else broke since we
enabled them and now even with MOZ_GTK_TITLEBAR_DECORATION=system the
bug reproduces.

The thing that's supposed to hide the tooltip on nsXULTooltipListener is
the mouseout event handler, but without this fix we would upgrade the
eMouseExitFromWidget to a synthesized mouse move here:

  https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/events/EventStateManager.cpp#721-732

Make leave-notify handling properly parallel to enter-notify in order to
properly notify gecko of the mouse leaving the window, thus fixing the
bug.

Differential Revision: https://phabricator.services.mozilla.com/D163646
2022-12-02 17:06:28 +00:00
Zach Hoffman 2079ccbe42 Bug 1803303 - Do not display input range tick marks that are step mismatches r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163521
2022-12-02 16:48:40 +00:00
Matthias Camenzind 562af0a9b4 Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-02 16:47:46 +00:00
Matthias Camenzind c772b6a141 Bug 1786048 - Part 1: AppWindow can't skip SetSize calls, HeadlessWidget has to notify when moved. r=emilio
Two minor changes that otherwise might go unnoticed in the following
parts:

- AppWindow can't skip SetSize calls that match the current size. On
  Linux a previous call might not have changed the size yet. If the
  current call is skipped, the previous call can ultimately dictate the
  resulting size.

- BrowserParent should not have to call UpdatePosition when receiving
  new dimensions from BrowserChild. But HeadlessWidget needs to call
  NotifyWindowMoved when moved. HeadlessWidget no longer stays in
  "maximized" size mode after being resized or moved.

Differential Revision: https://phabricator.services.mozilla.com/D160259
2022-12-02 16:47:45 +00:00
Ryan VanderMeulen 488282392e Bug 1803775 - Update macOS supported SDKs documentation. r=spohl DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D163712
2022-12-02 16:30:58 +00:00
Manuel Bucher 17df5816aa Bug 1771867 - Early Hints Phase 2 - Part 7: Pass early hint preload to image preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161177
2022-12-02 16:15:55 +00:00
Martin Robinson abb5044ca7 Bug 1803377 - Rename the values of the `IntrinsicDirty` enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
stransky 68483e140a Bug 1793119 [Linux] Inhibit screensaver during autoscroll r=botond,emilio
Depends on D162978

Differential Revision: https://phabricator.services.mozilla.com/D163224
2022-12-02 11:58:43 +00:00
stransky de299fcd96 Bug 1793119 [Linux] Add more logging to WakeLockListener r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162978
2022-12-02 11:58:43 +00:00
Csoregi Natalia 5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher e4a53f90d5 Bug 1771867 - Early Hints Phase 2 - Part 7: Pass early hint preload to image preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161177
2022-12-02 09:45:26 +00:00
Andreas Pehrson 2c2be109c5 Bug 1796069 - Record decoded video frames in android/RemoteDataDecoder. r=jolin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D160766
2022-12-01 09:52:49 +00:00
Emilio Cobos Álvarez 1572f5554c Bug 1802957 - Allow to specify system fonts via prefs. r=jfkthame
Much like we allow to do so with colors and ints/floats.

Read a string pref for the font name, and a few float/bools for
size/weight/italic, which is what our LookAndFeel back-end supports.

Depends on D163270

Differential Revision: https://phabricator.services.mozilla.com/D163271
2022-12-01 09:23:20 +00:00
Emilio Cobos Álvarez c9a0f65ceb Bug 1802957 - Remove non-standard and unused system font values. r=jfkthame
And hide internal but used values. System fonts are not exposed in the
computed style so this should be fine.

If we need the old values for some obscure reason, it's trivial to alias
them to e.g., menu or so.

Differential Revision: https://phabricator.services.mozilla.com/D163269
2022-12-01 09:23:19 +00:00
Marian-Vasile Laza cd7fc78979 Backed out 4 changesets (bug 1801782) for causing bc failures on browser_test_swipe_gesture.js. CLOSED TREE
Backed out changeset e653ba7dc749 (bug 1801782)
Backed out changeset e7e0e08c03f2 (bug 1801782)
Backed out changeset d5f972c202fa (bug 1801782)
Backed out changeset d76f0c0d4d94 (bug 1801782)
2022-12-01 06:11:07 +02:00
Hiroyuki Ikezoe 5032b4386b Bug 1801782 - Move utility functions for sending pan events into apz_test_native_event_utils.js. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D162950
2022-11-30 22:15:06 +00:00
Marian-Vasile Laza bec56391bf Backed out 4 changesets (bug 1786048) for causing bc failures on browser_modal_resize.js. CLOSED TREE
Backed out changeset 318a2d2e6e39 (bug 1786048)
Backed out changeset 17a9990d6d19 (bug 1786048)
Backed out changeset 205f129c648a (bug 1786048)
Backed out changeset 0750c885a688 (bug 1786048)
2022-12-01 05:00:38 +02:00
Matthias Camenzind 81ce314e5c Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-11-30 19:37:16 +00:00
Matthias Camenzind f3fd130da3 Bug 1786048 - Part 1: AppWindow can't skip SetSize calls, HeadlessWidget has to notify when moved. r=emilio
Two minor changes that otherwise might go unnoticed in the following
parts:

- AppWindow can't skip SetSize calls that match the current size. On
  Linux a previous call might not have changed the size yet. If the
  current call is skipped, the previous call can ultimately dictate the
  resulting size.

- BrowserParent should not have to call UpdatePosition when receiving
  new dimensions from BrowserChild. But HeadlessWidget needs to call
  NotifyWindowMoved when moved. HeadlessWidget no longer stays in
  "maximized" size mode after being resized or moved.

Differential Revision: https://phabricator.services.mozilla.com/D160259
2022-11-30 19:37:15 +00:00
Marian-Vasile Laza 76bef44509 Backed out 3 changesets (bug 1802957) for causing mochitest failures on test_unstyled_control_height.html. CLOSED TREE
Backed out changeset 649c190f6c29 (bug 1802957)
Backed out changeset 60822417a838 (bug 1802957)
Backed out changeset ffe8d999e454 (bug 1802957)
2022-12-01 01:23:08 +02:00
Emilio Cobos Álvarez 25708161b5 Bug 1802957 - Allow to specify system fonts via prefs. r=jfkthame
Much like we allow to do so with colors and ints/floats.

Read a string pref for the font name, and a few float/bools for
size/weight/italic, which is what our LookAndFeel back-end supports.

Depends on D163270

Differential Revision: https://phabricator.services.mozilla.com/D163271
2022-11-30 16:14:27 +00:00
Emilio Cobos Álvarez 77327233d7 Bug 1802957 - Remove non-standard and unused system font values. r=jfkthame
And hide internal but used values. System fonts are not exposed in the
computed style so this should be fine.

If we need the old values for some obscure reason, it's trivial to alias
them to e.g., menu or so.

Differential Revision: https://phabricator.services.mozilla.com/D163269
2022-11-30 16:14:26 +00:00
Daniel Holbert 2f40ae2051 Bug 1791754: Remove bogus assertion in gtk NativeKeyBindings.cpp. r=masayuki
As discussed in the bug, we're not justified in expecting this assertion's
condition to hold up; it can be made to fail in mundane/unconcerning ways.

DONTBUILD because this doesn't affect behavior at all in opt builds, and it
doesn't affect debug build behavior in treeherder-relevant ways either.

Differential Revision: https://phabricator.services.mozilla.com/D163416
2022-11-30 15:01:48 +00:00
stransky 2fc2ccf960 Bug 1802977 [Linux] Release nsWindow referenced by GtkCompositorWidget from main thread by NS_ReleaseOnMainThread() r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D163330
2022-11-30 10:26:00 +00:00
stransky f339bc9425 Bug 1802327 [Linux] Activate nsWindow by SetUserTimeAndStartupTokenForActivatedWindow() after gtk_widget_show() to make sure it's visible r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163310
2022-11-30 10:17:02 +00:00
David Shin 47e9cc4a83 Bug 1795244 - Save modified preferences whenever native print dialog is used. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D162892
2022-11-29 21:08:08 +00:00
Iulian Moraru 48ebdd5a42 Backed out changeset 4cff4386a8c3 (bug 1795244) for causing bc failures on browser_system_dialog_subdialog_hidden.js. CLOSED TREE 2022-11-29 21:48:24 +02:00
David Shin 004262dc1b Bug 1795244 - Save modified preferences whenever native print dialog is used. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D162892
2022-11-29 18:53:41 +00:00
Makoto Kato 13c8a3a563 Bug 1802892 - Set screen refresh rate to Screen. r=geckoview-reviewers,owlish
Move getting refresh rate from AndroidVsync to GeckoAppShell, then use it.

Differential Revision: https://phabricator.services.mozilla.com/D163215
2022-11-29 04:22:37 +00:00
Brad Werth e2e3323a40 Bug 1798067 Part 1: Add SupportsHDR to gfxPlatform, refactor macOS to use it. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D161364
2022-11-29 02:31:18 +00:00
Botond Ballo 68c71a503c Bug 1802225 - Remove Layers.{h,cpp}. r=tnikkel,geckoview-reviewers,jgilbert,media-playback-reviewers,padenot,m_kato
Where appropriate, `#include "Layers.h"` is replaced with
more specific inclusions.

Differential Revision: https://phabricator.services.mozilla.com/D162934
2022-11-29 01:52:03 +00:00
Zach Hoffman 6978315eec Bug 841942 - Display tick marks for <input type=range> when @list/<datalist> is used r=emilio,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D162882
2022-11-28 22:06:33 +00:00
Butkovits Atila 541201fe13 Backed out 3 changesets (bug 1798067) for causing bustages at gfxPlatformMac.cpp.
Backed out changeset dba34dc9a166 (bug 1798067)
Backed out changeset f87001406f29 (bug 1798067)
Backed out changeset 1b59437ed62b (bug 1798067)
2022-11-28 23:56:43 +02:00
Brad Werth bfde7b9df5 Bug 1798067 Part 1: Add SupportsHDR to gfxPlatform, refactor macOS to use it. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D161364
2022-11-28 20:51:17 +00:00
Chris Martin 21449f3d26 Bug 1798014 - Note mouse redirection bugs in user software in about:support r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D163144
2022-11-28 13:53:58 +00:00
Edgar Chen a3612c4de0 Bug 1802125 - Use nsIClipboard.AsyncGetData to handle GetClipboardAsync IPC; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D162874
2022-11-28 12:22:51 +00:00
stransky a784c60699 Bug 1802105 [Wayland] Disable processing native events in nsDragService::SourceDataGetUriLists() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162828
2022-11-28 11:30:31 +00:00
stransky 2c4aa1bf79 Bug 1801888 [Linux] Allow to call nsWindow destructor from other threads if nsWindow is already destroyed r=emilio
We can delete nsWindow but reference to it is kept by GtkCompositorWidget and nsWindow destructor may be called from Compositor thread where GtkCompositorWidget may be deleted.
Allow such scenario if nsWindow is already an empty shell and only nsWindow memory is released from Compositor thread.

Differential Revision: https://phabricator.services.mozilla.com/D163145
2022-11-28 11:10:38 +00:00
Cristian Tuns 3ab4040704 Backed out changeset 2be56c37e28d (bug 1801844) for causing a regression 2022-11-26 13:39:50 -05:00
Barret Rennie 514ca65bbf Bug 1541508 - Use Services.env in widget/ r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D160154
2022-11-25 19:09:12 +00:00
Stanca Serban 6e6332bbd3 Backed out changeset dab070a6ba77 (bug 1802125) for causing wpt failures on /clipboard-apis. CLOSED TREE 2022-11-25 18:35:18 +02:00
Makoto Kato 2e9e0c4641 Bug 1744687 - Part 3. Fix build error for newer Windows SDK. r=gsvelto
Now hal uses AR_STATE for screen orientation, so we should move it from
WinUtils.cpp to WinUtils.h for newer Windows 11 SDK.

Also, newer Windows SDK has to set WINVER to WIN8 to use auto rotation API.

Differential Revision: https://phabricator.services.mozilla.com/D163099
2022-11-25 15:13:43 +00:00
stransky c2c8c4709e Bug 1791779 [Wayland] Enable maximized window resize workaround for Wayland too r=emilio
https://gitlab.gnome.org/GNOME/gtk/-/issues/1044 is supposed fixed in gtk3-3.24 but it isn't so let's enable it again.

Differential Revision: https://phabricator.services.mozilla.com/D163079
2022-11-25 14:26:23 +00:00
Edgar Chen a1e10a5441 Bug 1802125 - Use nsIClipboard.AsyncGetData to handle GetClipboardAsync IPC; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D162874
2022-11-25 10:49:47 +00:00
Makoto Kato 3dbf8deeb8 Bug 1744687 - Part 1. Lock orientation backend for Windows Tablet. r=gsvelto
Since Windows tablet mode has a orientation lock API, this patch
implements orientation lock backend for Windows tablet mode.

`GetAutoRotationState` API recognizes whether orientation API is supported on
the device. So this fix uses this API to check orientation API capability.

Differential Revision: https://phabricator.services.mozilla.com/D162451
2022-11-24 15:10:15 +00:00
Emilio Cobos Álvarez 6c417c9069 Bug 1802169 - Remove unused -moz-window-frame appearance constants. r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D162864
2022-11-23 16:20:02 +00:00
Emilio Cobos Álvarez 098175cf10 Bug 1801956 - Move titlebar button handling out of nsBoxFrame. r=tnikkel
This fixes the snap layouts feature on Windows 11.

Instead of using a content attribute (which is somewhat expensive to
look up) use the default appearance and do this where we deal with other
appearance hacks (before building themed backgrounds).

Consolidate this inside a DealWithWindowsAppearanceHacks function along
with the glass stuff.

Differential Revision: https://phabricator.services.mozilla.com/D162757
2022-11-23 09:31:58 +00:00
Emilio Cobos Álvarez ed168ca161 Bug 1801844 - Remove some min-widget-size for various menuitem bits. r=cmartin
This fixes bug 1799460 for good. You can test this on Win10 with
browser.display.windows.non_native_menus=0 or HCM, but same applies to
Win7/8.

The front-end sets their own sizes anyways, and when the windows sizes
are less than the ones the front-end sets, we see that bug.

This is rather annoying because, even though it's fixable (we can fix
the intrinsic sizing code in the web to deal with this properly), it's
probably not worth fixing, as no web-exposed widget has a min-widget
size other than scrollbars and internal form control parts.

Removing this code altogether just works, since as I said before the
front-end sizes the menu parts anyways, so enforcing a given size in C++
is not necessary.

Differential Revision: https://phabricator.services.mozilla.com/D162709
2022-11-22 17:08:26 +00:00
Andrew Osmond d664f47e78 Bug 1801780 - Include more information about blocklist in about:support. r=jrmuizel
We used to provide links to the bug numbers but this was broken
somewhere along the way. Now it is provided the failure IDs from which
it can attempt to extract a bug number, as well as always display any
failure ID and message whenever possible.

Differential Revision: https://phabricator.services.mozilla.com/D162734
2022-11-22 16:00:15 +00:00
Emilio Cobos Álvarez 4c6d8f0273 Bug 1798396 - Remove appearance: -moz-win-glass, which is unused. r=tnikkel
This we don't need to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D162535
2022-11-22 10:56:38 +00:00
stransky 4a8df8f3c8 Bug 1800972 [Linux] Convert char* to GUniquePtr at nsDragService::SourceDataGetXDND() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162546
2022-11-22 08:14:28 +00:00
stransky d02fafe749 Bug 1800972 [Linux] Implement drag of multiple items r=emilio
- Remove nsDragService::CreateURIList() and replace it by nsDragService::SourceDataGetUriList().
  It reads all items from nsITransferable and put them to uri list.
  If data drop is performed to another application which doesn't have access to internal data storages (mailbox:// for instance),
  request download and save referenced items to /tmp directory.

- Implement SourceDataAppendURLItem() which read one item from nsITransferable and append it to uri list.
  Download and store internal files in /tmp directory.

- Make CreateTempFile() to block native events processing. nsIOutputStream/nsIInputStream read and write operations run
  event loop and can abort D&D operation before we write all data to /tmp. Use nsAppShell to block native event processing
  during read/write to prevent it.

Differential Revision: https://phabricator.services.mozilla.com/D162473
2022-11-22 08:14:27 +00:00
stransky ecd42fb817 Bug 1800972 [Linux] Don't query fallback mime type for image/XDND mime types r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162469
2022-11-22 08:14:27 +00:00
stransky fd206af3cd Bug 1800972 [Linux] Factor out text mime types to extra function r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162468
2022-11-22 08:14:27 +00:00
stransky de4c14cf3f Bug 1800972 [Linux] Factor out image drop r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162467
2022-11-22 08:14:26 +00:00
stransky 5b605e4811 Bug 1800972 [Linux] Factor out XDND to extra function r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162466
2022-11-22 08:14:26 +00:00
stransky 6bcfbacc6d Bug 1800972 [Linux] Use XdndDirectSave on X.org only as it's no supported on XWayland r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162465
2022-11-22 08:14:25 +00:00
stransky bebf9e9a8f Bug 1800972 [Linux] Update logging and clean up of nsDragService r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162463
2022-11-22 08:14:25 +00:00
Hiroyuki Ikezoe 3a5650ace5 Bug 1794070 - Make a pan start event wait for the browser gesture code response. r=botond,dlrobertson
So that APZ can wait to handle the event to do overscrolling until the browser
responds that the event wasn't used for gestures.

Differential Revision: https://phabricator.services.mozilla.com/D160438
2022-11-22 06:52:53 +00:00
Hiroyuki Ikezoe d33990bcde Bug 1794070 - Ignore overscrollable check in CanScrollTargetHorizontally. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D162362
2022-11-22 06:52:52 +00:00
Hiroyuki Ikezoe d32e0125e8 Bug 1794070 - Introduce PanGestureInput::AllowsSwipe(). r=botond
Differential Revision: https://phabricator.services.mozilla.com/D160437
2022-11-22 06:52:52 +00:00
Hiroyuki Ikezoe f7ce055162 Bug 1794070 - Refer mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection flag instead of calling SwipeTrackker::CanTriggerSwipe(). r=botond
And rename mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection to
mMayTriggerSwipe.

So basically once after the flag is set, we should use it.

Differential Revision: https://phabricator.services.mozilla.com/D160436
2022-11-22 06:52:52 +00:00
Hiroyuki Ikezoe ebfe7e293e Bug 1794070 - Make mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection private. r=botond
And initialized it only in ctors so that in the next change we can use it to
tell whether this pan event may trigger swipe or not without calling
SwipeTracker::CanTriggerSwipe every time.

There's an unintuitive change in a GTest sending a horizontal pan-start event.
With this changeset, all incomming pan-start events on desktop platforms
basically set mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection
to true even if the event is generated in GTests. So the pan start event runs
into the short circuit path for swipe-to-navigation. This is a good thing because
it means the GTest replicates what our browser does properly.

Differential Revision: https://phabricator.services.mozilla.com/D160435
2022-11-22 06:52:51 +00:00
Hiroyuki Ikezoe 4c8d1c6a7f Bug 1794070 - Check mOverscrollBehaviorAllowsSwipe whether we do the short circuit for swipe. r=botond
Though this isn't a real bug at all since later we check the flag in
nsBaseWidget::MayStartSwipeForAPZ [1], this change includes a browser
mochitest to make sure `overscroll-behavior: contain` prevents swipe
navigations.


[1] https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/widget/nsBaseWidget.cpp#2294

Differential Revision: https://phabricator.services.mozilla.com/D160434
2022-11-22 06:52:51 +00:00
Hiroyuki Ikezoe 9f0a9b18a2 Bug 1794070 - Run the test case listening "wheel" event at the last in browser_test_swipe_gesture.js. r=botond
There's a bug (bug 1800022) that wheel event listeners in the browser process
badly interact with overscroll even so we'd avoid the bug here.

Differential Revision: https://phabricator.services.mozilla.com/D161752
2022-11-22 06:52:50 +00:00
Hiroyuki Ikezoe e6a13e599b Bug 1794070 - Use `await SpecialPowers.popPrefEnv()` explicitly at the end of each test. r=tnikkel
Otherwise prefs set in the previous test case will persist. In fact
some of test cases were lacking "browser.swipe.navigation-icon-move-distance".

Differential Revision: https://phabricator.services.mozilla.com/D161751
2022-11-22 06:52:50 +00:00
Hiroyuki Ikezoe 62bd053169 Bug 1794070 - Fix preference name typos in browser_test_swipe_gesture.js. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D161750
2022-11-22 06:52:50 +00:00
Hiroyuki Ikezoe 9a4979471f Bug 1794070 - Drop "OS X" or macOS in comments about swipe-to-navigation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D160430
2022-11-22 06:52:48 +00:00
Greg Stoll 26b89142d8 Bug 1793834 - part 8: add preference for number of messages to keep r=handyman
One thing to note is that if the user shrinks this number we won't reclaim any memory - this is because I wanted to avoid doing any more work than necessary when we're logging messages. Let me know if you think this is a problem!

Differential Revision: https://phabricator.services.mozilla.com/D161156
2022-11-22 03:44:54 +00:00
Greg Stoll 454d73d35f Bug 1793834 - part 7: delete entries when a window closes r=handyman
At :handyman's suggestion, just removing the messages when we get a WM_DESTROY message works great and is way less complicated than the previous version of this :-)

Differential Revision: https://phabricator.services.mozilla.com/D161155
2022-11-22 03:44:54 +00:00
Greg Stoll c0063c0b1a Bug 1793834 - part 4/12: log window messages and expose entry point for retrieving them r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D161151
2022-11-22 03:44:52 +00:00
Greg Stoll 0455759851 Bug 1793834 - part 3/12: always record a few special messages for about page r=handyman
This is the list of messages that handyman and rkraesig suggested.

Since we're recording WM_GETMINMAXINFO, we now have better logging for that message.

Differential Revision: https://phabricator.services.mozilla.com/D161150
2022-11-22 03:44:52 +00:00
Greg Stoll 9aa69a4b5c Bug 1793834 - part 2/12: also log HWND in message logs r=handyman
This is helpful for the normal event log, and also necessary since we want to group the messages up by window in the about page.

Differential Revision: https://phabricator.services.mozilla.com/D161149
2022-11-22 03:44:51 +00:00
sotaro 3af7ab7dad Bug 1798242 - Check if video overlay works without ZeroCopyNV12Texture with non-intel GPUs r=gfx-reviewers,jrmuizel
The change disables ZeroCopyNV12Texture for checking if the video overlay works without ZeroCopyNV12Texture with non-intel GPU.

For now, on release, ZeroCopyNV12Texture is not enabled with non-intel GPUs. It blocks to enable video overlay with non-intel GPUs. Then it seems better to enable video overlay with non-intel GPUs on release without ZeroCopyNV12Texture if possible.

Differential Revision: https://phabricator.services.mozilla.com/D160744
2022-11-22 00:45:33 +00:00
Cristian Tuns fc0780ef1b Backed out 10 changesets (bug 1793834, bug 1801724) for causing mochitest failures in browser_preferences_usage.js CLOSED TREE
Backed out changeset 89c9e4e1c3ad (bug 1801724)
Backed out changeset 9130ed00888e (bug 1793834)
Backed out changeset 34f582bdc341 (bug 1793834)
Backed out changeset c34df1dc8ff8 (bug 1793834)
Backed out changeset 2ae1429c886a (bug 1793834)
Backed out changeset a49eff0693ce (bug 1793834)
Backed out changeset 034466342a3b (bug 1793834)
Backed out changeset 2d19fa85af4e (bug 1793834)
Backed out changeset d16ff7dbd155 (bug 1793834)
Backed out changeset a39300a8ddff (bug 1793834)
2022-11-21 17:30:12 -05:00
Greg Stoll 81ffafa5b6 Bug 1801724 - unbreak build by fixing casing in include r=haik
Differential Revision: https://phabricator.services.mozilla.com/D162618
2022-11-21 21:57:56 +00:00
Greg Stoll 9fb7e92244 Bug 1793834 - part 8: add preference for number of messages to keep r=handyman
One thing to note is that if the user shrinks this number we won't reclaim any memory - this is because I wanted to avoid doing any more work than necessary when we're logging messages. Let me know if you think this is a problem!

Differential Revision: https://phabricator.services.mozilla.com/D161156
2022-11-21 19:15:56 +00:00
Greg Stoll 14270825ef Bug 1793834 - part 7: delete entries when a window closes r=handyman
At :handyman's suggestion, just removing the messages when we get a WM_DESTROY message works great and is way less complicated than the previous version of this :-)

Differential Revision: https://phabricator.services.mozilla.com/D161155
2022-11-21 19:15:55 +00:00
Greg Stoll 501216140c Bug 1793834 - part 4/12: log window messages and expose entry point for retrieving them r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D161151
2022-11-21 19:15:54 +00:00
Greg Stoll e45c6ff428 Bug 1793834 - part 3/12: always record a few special messages for about page r=handyman
This is the list of messages that handyman and rkraesig suggested.

Since we're recording WM_GETMINMAXINFO, we now have better logging for that message.

Differential Revision: https://phabricator.services.mozilla.com/D161150
2022-11-21 19:15:54 +00:00
Greg Stoll 9f26e06933 Bug 1793834 - part 2/12: also log HWND in message logs r=handyman
This is helpful for the normal event log, and also necessary since we want to group the messages up by window in the about page.

Differential Revision: https://phabricator.services.mozilla.com/D161149
2022-11-21 19:15:53 +00:00
stransky 8535cd7ed3 Bug 1801488 [Linux] Allow avif preview in GtkFileDialog r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162549
2022-11-21 18:50:02 +00:00
Butkovits Atila 887a77ba5f Backed out 13 changesets (bug 1794070) for causing failures at browser_test_swipe_gesture.js. CLOSED TREE
Backed out changeset afe487b23e1c (bug 1794070)
Backed out changeset b119052f690d (bug 1794070)
Backed out changeset 733188f6b7ca (bug 1794070)
Backed out changeset 53273c86140a (bug 1794070)
Backed out changeset e2e39e61efbe (bug 1794070)
Backed out changeset 93b240feb781 (bug 1794070)
Backed out changeset 78aea5c32e14 (bug 1794070)
Backed out changeset 158008a6363b (bug 1794070)
Backed out changeset 3c3e76c8bf49 (bug 1794070)
Backed out changeset 39beb7abc321 (bug 1794070)
Backed out changeset 0ded01fbbd9e (bug 1794070)
Backed out changeset cf4552e5e11b (bug 1794070)
Backed out changeset 317ee240609d (bug 1794070)
2022-11-21 13:41:34 +02:00
Tom Schuster c1cdfabc87 Bug 1799156 - Filter unknown DataTransferItem flavors. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D161487
2022-11-21 10:18:38 +00:00
Hiroyuki Ikezoe 024f31065c Bug 1794070 - Make a pan start event wait for the browser gesture code response. r=botond
So that APZ can wait to handle the event to do overscrolling until the browser
responds that the event wasn't used for gestures.

Differential Revision: https://phabricator.services.mozilla.com/D160438
2022-11-21 03:10:08 +00:00
Hiroyuki Ikezoe ff188b2a0c Bug 1794070 - Ignore overscrollable check in CanScrollTargetHorizontally. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D162362
2022-11-21 03:10:08 +00:00
Hiroyuki Ikezoe 5a42df888d Bug 1794070 - Introduce PanGestureInput::AllowsSwipe(). r=botond
Differential Revision: https://phabricator.services.mozilla.com/D160437
2022-11-21 03:10:08 +00:00
Hiroyuki Ikezoe 5b39846aeb Bug 1794070 - Refer mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection flag instead of calling SwipeTrackker::CanTriggerSwipe(). r=botond
And rename mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection to
mMayTriggerSwipe.

So basically once after the flag is set, we should use it.

Differential Revision: https://phabricator.services.mozilla.com/D160436
2022-11-21 03:10:07 +00:00
Hiroyuki Ikezoe ae5bdfff82 Bug 1794070 - Make mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection private. r=botond
And initialized it only in ctors so that in the next change we can use it to
tell whether this pan event may trigger swipe or not without calling
SwipeTracker::CanTriggerSwipe every time.

There's an unintuitive change in a GTest sending a horizontal pan-start event.
With this changeset, all incomming pan-start events on desktop platforms
basically set mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection
to true even if the event is generated in GTests. So the pan start event runs
into the short circuit path for swipe-to-navigation. This is a good thing because
it means the GTest replicates what our browser does properly.

Differential Revision: https://phabricator.services.mozilla.com/D160435
2022-11-21 03:10:07 +00:00
Hiroyuki Ikezoe 3fb8018d34 Bug 1794070 - Check mOverscrollBehaviorAllowsSwipe whether we do the short circuit for swipe. r=botond
Though this isn't a real bug at all since later we check the flag in
nsBaseWidget::MayStartSwipeForAPZ [1], this change includes a browser
mochitest to make sure `overscroll-behavior: contain` prevents swipe
navigations.


[1] https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/widget/nsBaseWidget.cpp#2294

Differential Revision: https://phabricator.services.mozilla.com/D160434
2022-11-21 03:10:06 +00:00
Hiroyuki Ikezoe df505b470b Bug 1794070 - Run the test case listening "wheel" event at the last in browser_test_swipe_gesture.js. r=botond
There's a bug (bug 1800022) that wheel event listeners in the browser process
badly interact with overscroll even so we'd avoid the bug here.

Differential Revision: https://phabricator.services.mozilla.com/D161752
2022-11-21 03:10:06 +00:00
Hiroyuki Ikezoe 23934b8a4d Bug 1794070 - Use `await SpecialPowers.popPrefEnv()` explicitly at the end of each test. r=tnikkel
Otherwise prefs set in the previous test case will persist. In fact
some of test cases were lacking "browser.swipe.navigation-icon-move-distance".

Differential Revision: https://phabricator.services.mozilla.com/D161751
2022-11-21 03:10:06 +00:00
Hiroyuki Ikezoe b317e88da3 Bug 1794070 - Fix preference name typos in browser_test_swipe_gesture.js. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D161750
2022-11-21 03:10:05 +00:00
Hiroyuki Ikezoe 7b3134f7c1 Bug 1794070 - Drop "OS X" or macOS in comments about swipe-to-navigation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D160430
2022-11-21 03:10:04 +00:00
stransky 7c817ca2a7 Bug 1800966 [Linux] Allow webp in GTK file chooser dialog r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162372
2022-11-18 09:56:02 +00:00
Emilio Cobos Álvarez 3c1ba0605d Bug 1800368 - Disable panel animations on Wayland for regressions. r=stransky
I don't have time to dig into them right now so disable there for now.

I could repro the flickering on Arch Linux, but I couldn't repro the
incorrectly-transparent popup or the incorrectly-open extension popup...

Differential Revision: https://phabricator.services.mozilla.com/D162240
2022-11-17 15:26:46 +00:00
Mark Banner ec76a72706 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (miscellaneous). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D161917
2022-11-17 12:00:32 +00:00
Emilio Cobos Álvarez a8a5c8fe6a Bug 1798213 - For widget-less pages keep defaulting to primary screen scale factor. r=tnikkel,layout-reviewers,extension-reviewers,robwu
This restores the previous behavior in a somewhat more principled way.

The extensions code is still broken in multi-monitor cases, but that's a
more complicated fix.

Differential Revision: https://phabricator.services.mozilla.com/D161997
2022-11-16 15:52:07 +00:00
Emilio Cobos Álvarez 368171d435 Bug 1800684 - Remove print_via_parent. r=dshin
For a while it was true everywhere but android, but it's been true
unconditionally since forever.

Differential Revision: https://phabricator.services.mozilla.com/D162116
2022-11-15 16:19:30 +00:00
stransky 88a8b923bd Bug 1800211 [XWayland] Keep open drag source popups on XWayland too r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162029
2022-11-15 08:14:45 +00:00
Emilio Cobos Álvarez 85c373ad11 Bug 1800416 - Ensure setting fullscreen actually ends up with a fullscreen sizemode. r=mhowell
When minimizing a fullscreen window, frame state is kept with
mFullscreenMode = true but mSizeMode = nsSizeMode_Minimized.

Calling EnsureSizeMode(nsSizeMode_Fullscreen) in this state would call
EnsureFullscreenMode(true), but that'd bail out without actually
setting the fullscreen sizemode, causing confusion.

Before the regressing patch that was papered over because
nsSizeMode_Fullscreen was passed explicitly to OnSizeModeChange(), but
the underlying state was already wrong before my patch.

Add some comments and documentation to the fullscreen-relevant members,
since initially I was rather confused about this code.

Differential Revision: https://phabricator.services.mozilla.com/D161982
2022-11-14 17:21:48 +00:00
Florian Queze ea6e6f4fa1 Bug 1671490 - Mark the GPU process as being in the foreground whenever the parent process is in the foreground to make their priorities (and priority boosts) match, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D161065
2022-11-14 16:05:34 +00:00
Masayuki Nakano f7d66877b9 Bug 1726297 - part 4: Make `ContentEventHandler::OnQueryTextRectArray` fills invisible character rects with caret rect before next visible character r=smaug
This patch does **not** make `ContentEventHandler` return consistent rect
for invisible text node, however, it should be okay for now because users
cannot put caret into invisible text node and cannot type text into it.

For avoiding the warning spam of `ContentCacheInChild` in automated tests,
`ContentEventHandler::OnQueryTextRectArray` shouldn't give it up correcting
character rects in invisible text nodes.  And as mentioned above, using
similar rects to visible character around there is okay.  Therefore, this
patch makes `OnQueryTextRectArray` fills invisible text rects with caret
rect before following visible character if they are followed by visible
characters.  Otherwise, i.e., if invisible text rects are the last things
in the range, make it use caret rect after the last visible character.

Note that if the range is completely in invisible nodes, the value will be
computed in the fallback part of the method.  It still has issues, but it
does not happen so many times in the automated tests.  Therefore, this patch
does not treat the case.

Differential Revision: https://phabricator.services.mozilla.com/D160593
2022-11-11 13:43:24 +00:00