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

30908 Коммитов

Автор SHA1 Сообщение Дата
Nick Alexander b0e278d406 Bug 1790692 - Make image smaller for DOM notifications/non-system (chrome-privileged) alerts. r=nrishel
This is a partial reversion of Bug 1775135.

Differential Revision: https://phabricator.services.mozilla.com/D157362
2022-09-15 16:57:35 +00:00
Hiroyuki Ikezoe 81f8fd1503 Bug 1787079 - Implement nsIDOMWindowUtils.setHiDPiMode and restoreHiDPIMode on Windows. r=rkraesig
And make the APIs available on debug builds.

To implement the APIs we used undocumented APIs published in
https://github.com/lihas/windows-DPI-scaling-sample .

Differential Revision: https://phabricator.services.mozilla.com/D156265
2022-09-15 10:13:14 +00:00
Emilio Cobos Álvarez 99570efc5b Bug 1790670 - Fix color of high-contrast checkboxes. r=morgan
This restores behavior from before my patch, and makes it so that it's
easier to see which color pair ends up getting used.

Differential Revision: https://phabricator.services.mozilla.com/D157271
2022-09-14 23:14:30 +00:00
Nicholas Rishel 86976673e6 Bug 1786578 - Dismiss Windows native toast notifications when Firefox is closed in a private browsing session. r=nalexander.
Prior to this commit the `ToastNotification`'s observer registration doesn't work due to `ToastNotification` not implementing `nsIWeakReference` while attempting to register itself as an observer as a weak reference.

Differential Revision: https://phabricator.services.mozilla.com/D155764
2022-09-14 20:48:48 +00:00
Sandor Molnar cddb6cfdb3 Backed out 6 changesets (bug 1787079) for causing browser-chrome failures in layout/base/tests/browser_bug1787079.js CLOSED TREE
Backed out changeset b6075adb01a7 (bug 1787079)
Backed out changeset d5d0f8bb0be4 (bug 1787079)
Backed out changeset dce92508b5a3 (bug 1787079)
Backed out changeset 650f8d455e0e (bug 1787079)
Backed out changeset 1a9828bbf04b (bug 1787079)
Backed out changeset 3580b308ec59 (bug 1787079)
2022-09-14 06:13:39 +03:00
Hiroyuki Ikezoe 1e1595638c Bug 1787079 - Implement nsIDOMWindowUtils.setHiDPiMode and restoreHiDPIMode on Windows. r=rkraesig
And make the APIs available on debug builds.

To implement the APIs we used undocumented APIs published in
https://github.com/lihas/windows-DPI-scaling-sample .

Differential Revision: https://phabricator.services.mozilla.com/D156265
2022-09-14 01:15:54 +00:00
Nicholas Rishel 9454695dd9 Bug 1789390 - Remove scheduled and Action Center notifications during uninstall. r=nalexander
Non-MSIX notifications are not removed when Firefox is uninstalled. To handled this we've added a new `uninstall` background task and extended `nsIWindowsAlertService` to deregister notifications on uninstall.

Differential Revision: https://phabricator.services.mozilla.com/D156625
2022-09-14 00:42:43 +00:00
Iulian Moraru d07f446854 Backed out 2 changesets (bug 1789390) for causing bc failures regarding unreferenced file on BackgroundTask_uninstall.jsm. CLOSED TREE
Backed out changeset 4cec525d92f4 (bug 1789390)
Backed out changeset 6fcec3502cb2 (bug 1789390)
2022-09-13 13:20:20 +03:00
Nicholas Rishel f203d491e0 Bug 1789390 - Remove scheduled and Action Center notifications during uninstall. r=nalexander
Non-MSIX notifications are not removed when Firefox is uninstalled. To handled this we've added a new `uninstall` background task and extended `nsIWindowsAlertService` to deregister notifications on uninstall.

Differential Revision: https://phabricator.services.mozilla.com/D156625
2022-09-13 06:09:30 +00:00
Nick Alexander 7df6a78a6c Bug 1775135 - Make Windows native toasts use "ToastGeneric" template. r=nrishel
The immediate effect is to make any image larger and more prominent.
This might not be the right option for regular DOM notifications,
which support only `icon` (and not `image`) in Firefox at this time,
but we can adjust (perhaps limiting the generic template to privileged
alerts) as we need in the future.

Differential Revision: https://phabricator.services.mozilla.com/D156873
2022-09-13 02:43:17 +00:00
Nick Alexander ae5109c174 Bug 1788960 - Part 1: Round trip `name` for privileged alerts through Firefox restart. r=nrishel
On Windows, when an alert is privileged and `name` is non-empty, round
trip its `name` (as `privilegedName`) through the Windows notification
mechanism, and provide it to the "relaunch" callback.

Differential Revision: https://phabricator.services.mozilla.com/D156636
2022-09-13 02:43:17 +00:00
sotaro f0790c2c89 Bug 1790518 - Enable video overlay until early beta on non-Intel GPU on Windows r=jrmuizel,gfx-reviewers
With early beta, the video overlay could be tested more.

Differential Revision: https://phabricator.services.mozilla.com/D157176
2022-09-13 01:31:37 +00:00
Mike Kaply 0ce6d5df0f Bug 1297520 - For Snap, only install language for system locale. r=nalexander,OlivierTilloy
Differential Revision: https://phabricator.services.mozilla.com/D151052
2022-09-12 18:41:56 +00:00
Dão Gottwald f0e33014a0 Bug 1788822 - Simplify color-scheme content override pref to only be [dark, light, auto]. r=emilio,fluent-reviewers,extension-reviewers,robwu,flod
Differential Revision: https://phabricator.services.mozilla.com/D156710
2022-09-08 17:55:07 +00:00
Yannis Juglaret 2397ac1be1 Bug 1750103 - Clarify nsWindow::SubclassWindow function by splitting it in two. r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D156574
2022-09-08 15:34:47 +00:00
Yannis Juglaret 814637c4ee Bug 1750103 - Modernize nsWindow code by removing TriStateBool and using BOOL only when required. r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D156573
2022-09-08 15:34:47 +00:00
Yannis Juglaret 45f8785b00 Bug 1750103 - Reduce surface area of nsWindow by moving static members to their method of use when possible. r=cmartin
I moved the following variables to their method of use:

- sSwitchKeyboardLayout, sCanQuit to nsWindow::ProcessMessageInternal;
- sLastMousePoint, sLastMouseDownTime, sLastClickCount, sLastMouseButton to nsWindow::DispatchMouseEvent;
- sFirstTopLevelWindowCreated to nsWindow::Create;
- sHasBogusPopupsDropShadowOnMultiMonitor to nsWindow::HasBogusPopupsDropShadowOnMultiMonitor;
- gIsSleepMode (now sWasSleepMode) to nsWindow::PostSleepWakeNotification.

I also removed one dead variable called sNeedsToInitMouseWheelSettings, as well as sHaveInitializedPrefs which was not required anymore.

Two variables mentioned in the bug had already been moved out of the nsWindow namespace as part of other changesets:

- sDropShadowEnabled, now replaced by local variables shouldUseDropShadow and sShadowEnabled of nsWindow::Show in https://hg.mozilla.org/integration/autoland/rev/18a7f69d5ce4 ;
- sCustomHCursor, now replaced by local variables sCurrentHCursor and sCurrentHCursorIsCustom of nsWindow::SetCursor in https://hg.mozilla.org/integration/autoland/rev/dd95f1e386f1 .

Differential Revision: https://phabricator.services.mozilla.com/D156539
2022-09-08 15:34:46 +00:00
Ben Hearsum 83f4549190 Bug 1782295: Use Nimbus for Felt Privacy window separation r=dao
We'll be defaulting Felt Privacy features to enabled, and allowing them to be disabled by Nimbus (primarily for a holdback study).

Differential Revision: https://phabricator.services.mozilla.com/D153275
2022-09-08 13:09:10 +00:00
Kershaw Chang d164608d66 Bug 1760580 - P2: Provide a reason when request is cancelled with NS_BINDING_ABORTED, r=necko-reviewers,media-playback-reviewers,valentin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D156071
2022-09-08 09:11:19 +00:00
stransky feb00b8d6d Bug 1788910 [Wayland] Look for parents recursively at nsWindow::WaylandGetParentPosition() r=emilio
Right now we look for first parent only at nsWindow::WaylandGetParentPosition() and that's wrong.
WaylandGetParentPosition() is expected to return popup position in root coordinates regardless of popup parent nembers.

In this patch we calc popup position according to whole popup chain.

Differential Revision: https://phabricator.services.mozilla.com/D156673
2022-09-08 08:55:17 +00:00
stransky fcfb87fb3b Bug 1777269 [Wayland] Use fast popup movement for panels only r=emilio
Due to https://gitlab.gnome.org/GNOME/gtk/-/issues/5089 don't use wl_subsurface popup for menus/tooltips, just for panels which can be resized.

Differential Revision: https://phabricator.services.mozilla.com/D156540
2022-09-06 13:48:12 +00:00
stransky 21e14041bd Bug 1777269 [Wayland] Apply workaround for Mutter enter/leave bogus events r=emilio
When we open a popup window (tooltip for instance) on top of GDK_WINDOW_TYPE_HINT_UTILITY popup, Mutter compositor sends bogus
leave/enter events to the GDK_WINDOW_TYPE_HINT_UTILITY popup (https://gitlab.gnome.org/GNOME/gtk/-/issues/5089).

That leads to immediate tooltip close. As a workaround ignore these
bogus events.

We need to check two affected window types:

- toplevel window with at least two child popups where the first one is
  GDK_WINDOW_TYPE_HINT_UTILITY.
- popup GDK_WINDOW_TYPE_HINT_UTILITY with a child popup.

We ignore two bogus leave/enter sequences which are fired by mutter together:

 1. Leave (popup) -> Enter (toplevel)
 2. Leave (toplevel) -> Enter (popup)

Differential Revision: https://phabricator.services.mozilla.com/D156301
2022-09-06 13:48:12 +00:00
Frederic Wang 39dd537031 Bug 1588733 - Make maction/semantics elements behave as an mrow with the first child. r=emilio
See https://groups.google.com/forum/#!topic/mozilla.dev.platform/BWUvjERSXUM

Differential Revision: https://phabricator.services.mozilla.com/D49285
2022-09-06 04:32:15 +00:00
stransky e0deeeffa0 Bug 1788936 [Wayland] Don't hide GDK_WINDOW_TYPE_HINT_UTILITY popup when has a correct type r=emilio
We don't need to hide/show GDK_WINDOW_TYPE_HINT_UTILITY popup type to change it's position.
Hide it only if we need to set correct popup type as such change is done in map event.

Differential Revision: https://phabricator.services.mozilla.com/D156305
2022-09-05 10:38:45 +00:00
Nick Alexander f7cb13e745 Bug 1781929 - Part 4: Pass through or launch Firefox from notification server. r=nrishel
When the notification server callback is executed by the Windows
notification system, it invokes Firefox with additional command line
parameters, most importantly the Windows-specific notification
"Windows tag".

If no appropriate Firefox is running, the command line will be
processed, the provided Windows tag will be inspected (and seen to not
be registered with this running Firefox instance) and a "launch URL"
stored as part of the Windows notification itself opened (if one is
provided).

If an appropriate Firefox is running, the remoting protocol will
forward this command line to the running instance.  If the instance
recognizes the provided `--notification-windowsTag`, the command line
will be ignored.  When the notification server exits, Windows will
fallback to the Windows 8.1 style notification callbacks registered
for this Windows tag and the existing (non notification server)
behaviour will occur.

In fact, the server therefore waits for a Windows tag-specific system
event to be signalled by the invoked Firefox (or a sibling process).
If we were to return `S_OK` from the notification server immediately,
and a running Firefox process would handle the notification via
Windows 8.1-style notification callbacks, then Windows would fall back
to those callbacks.  The invoked callbacks unregister themselves upon
completion, often before the launched Firefox has an opportunity to
process the command line.  By waiting for this system event, we allow
the invoked Firefox to process the command line while its own
notification callbacks are registered and therefore recognize that its
callbacks will handle the notification.

Differential Revision: https://phabricator.services.mozilla.com/D154468
2022-09-03 22:49:02 +00:00
Nick Alexander b15fec0115 Bug 1781929 - Part 3: Include `launchUrl` in Windows toast notification. r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D155909
2022-09-03 22:49:01 +00:00
Nick Alexander c2e7a9b4e8 Bug 1781929 - Part 1: Handle toast notifications from background tasks specially. r=nrishel
In background task mode:

1. Re-launch Firefox into the default browsing profile, not the
   (possibly ephemeral) background task profile.
2. Don't show the in-product notification settings, which won't apply
   to the relevant Firefox profile.

Differential Revision: https://phabricator.services.mozilla.com/D155908
2022-09-03 22:49:00 +00:00
Nicholas Rishel b1c91cad45 Bug 1784367 - Prevent duplicate Windows notifications from occuring due to multiple tabs receiving same notification. r=nalexander
Use the existing mName field of alert which includes the host port and tag (or uuid) for Windows notification tag.

When a notification originates from the browser chrome, generate an identify on the fly as before.

The tag is hashed in order to fit the 16 character limit for tags. Note the limit was bumped to 64 in Windows 10 Creators Update.

Differential Revision: https://phabricator.services.mozilla.com/D155140
2022-09-03 22:49:00 +00:00
Marian-Vasile Laza 08d282ce78 Backed out 5 changesets (bug 1781929, bug 1784367) for causing bc test failures. CLOSED TREE
Backed out changeset 34003f6f7b27 (bug 1781929)
Backed out changeset 8e6fe1c18e8d (bug 1781929)
Backed out changeset e50432e37751 (bug 1781929)
Backed out changeset abf6eff708d8 (bug 1781929)
Backed out changeset 15fec49b7587 (bug 1784367)
2022-09-03 02:26:04 +03:00
Nick Alexander 7ad3c38071 Bug 1781929 - Part 4: Pass through or launch Firefox from notification server. r=nrishel
When the notification server callback is executed by the Windows
notification system, it invokes Firefox with additional command line
parameters, most importantly the Windows-specific notification
"Windows tag".

If no appropriate Firefox is running, the command line will be
processed, the provided Windows tag will be inspected (and seen to not
be registered with this running Firefox instance) and a "launch URL"
stored as part of the Windows notification itself opened (if one is
provided).

If an appropriate Firefox is running, the remoting protocol will
forward this command line to the running instance.  If the instance
recognizes the provided `--notification-windowsTag`, the command line
will be ignored.  When the notification server exits, Windows will
fallback to the Windows 8.1 style notification callbacks registered
for this Windows tag and the existing (non notification server)
behaviour will occur.

In fact, the server therefore waits for a Windows tag-specific system
event to be signalled by the invoked Firefox (or a sibling process).
If we were to return `S_OK` from the notification server immediately,
and a running Firefox process would handle the notification via
Windows 8.1-style notification callbacks, then Windows would fall back
to those callbacks.  The invoked callbacks unregister themselves upon
completion, often before the launched Firefox has an opportunity to
process the command line.  By waiting for this system event, we allow
the invoked Firefox to process the command line while its own
notification callbacks are registered and therefore recognize that its
callbacks will handle the notification.

Differential Revision: https://phabricator.services.mozilla.com/D154468
2022-09-02 20:22:51 +00:00
Nick Alexander 7dff57f69c Bug 1781929 - Part 3: Include `launchUrl` in Windows toast notification. r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D155909
2022-09-02 20:22:51 +00:00
Nick Alexander 24023c68c6 Bug 1781929 - Part 1: Handle toast notifications from background tasks specially. r=nrishel
In background task mode:

1. Re-launch Firefox into the default browsing profile, not the
   (possibly ephemeral) background task profile.
2. Don't show the in-product notification settings, which won't apply
   to the relevant Firefox profile.

Differential Revision: https://phabricator.services.mozilla.com/D155908
2022-09-02 20:22:50 +00:00
Nicholas Rishel d7f6839d2f Bug 1784367 - Prevent duplicate Windows notifications from occuring due to multiple tabs receiving same notification. r=nalexander
Use the existing mName field of alert which includes the host port and tag (or uuid) for Windows notification tag.

When a notification originates from the browser chrome, generate an identify on the fly as before.

The tag is hashed in order to fit the 16 character limit for tags. Note the limit was bumped to 64 in Windows 10 Creators Update.

Differential Revision: https://phabricator.services.mozilla.com/D155140
2022-09-02 20:22:49 +00:00
Calixte 2cc3e37989 Bug 1788668 - Add 'application/pdfjs' to the list of known formats r=NeilDeakin
This way we'll be able to know if the clipboard contains some pdfjs data.

Differential Revision: https://phabricator.services.mozilla.com/D156314
2022-09-02 19:04:09 +00:00
stransky c6fa781bc2 Bug 1788909 [Linux] Reference nsWindow in event handlers r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D156299
2022-09-02 13:26:21 +00:00
stransky 5c6538d73f Bug 1785185 [Wayland] Remove useRelativeCoordinates r=emilio
gtk_window_move() popup move method uses GDK_WINDOW_TYPE_HINT_UTILITY/GDK_WINDOW_TYPE_HINT_TOOLTIP popup types only.
They're placed by relative coordinates so useRelativeCoordinates is always true.

Depends on D156226

Differential Revision: https://phabricator.services.mozilla.com/D156227
2022-09-02 09:49:22 +00:00
stransky 92c7dee304 Bug 1785185 [Wayland] Set popup type according to moving method r=emilio
See https://bugzilla.mozilla.org/show_bug.cgi?id=1785185#c8

Different popup moving methods needs different popup types:
  - gtk_window_move() needs GDK_WINDOW_TYPE_HINT_UTILITY popup type.
  - move-to-rect requires GDK_WINDOW_TYPE_HINT_POPUP_MENU popups type.
  - GDK_WINDOW_TYPE_HINT_TOOLTIP works with both methods.

Differential Revision: https://phabricator.services.mozilla.com/D156226
2022-09-02 09:49:22 +00:00
Nick Alexander e08bbee6eb Bug 1787956 - Add `nsIAlertNotification.launchURL`. r=smaug
`launchURL` captures the URL that triggered the alert, if it comes
from a DOM notification.  If Firefox is launched when not already
running to handle an alert, it will navigate to this URL.

This URL can be set, and chrome privileged alerts can use this to
launch Firefox to a specific URL when it is launched.  Toast
notifications popped by background tasks will use this to re-engage
Firefox users to a campaign-specific URL.

This functionality will be tested in the Windows-specific tests
accompanying Bug 1781929.

Differential Revision: https://phabricator.services.mozilla.com/D155907
2022-09-01 22:48:21 +00:00
Nick Alexander 174303a612 Bug 1787573 - Allow privileged Windows native notification actions to have `activationType="system"`. r=nrishel,smaug
This allows Windows native notification action buttons to access the
built-in "dismiss" and "snooze" support without requiring a Firefox
invocation.

Differential Revision: https://phabricator.services.mozilla.com/D155906
2022-09-01 22:48:21 +00:00
Karl Tomlinson 97c8b3adce Bug 1777902 Test that system font sizing is independent from ui.textScaleFactor r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D156034
2022-09-01 02:27:38 +00:00
Brad Werth 0ad858a8b7 Bug 1788105: Make video-dynamic-range: high match for macOS 10.15+. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D156000
2022-08-30 19:56:16 +00:00
Emilio Cobos Álvarez fb6380190c Bug 1786525 - Don't update untransformed anchor rect when moved by move-to-rect. r=stransky
Otherwise, it changes the move-to-rect inputs, which can change the
output as well, making us move the anchor all the way to the right.

You could, I guess, consider this a mutter bug of sorts, because it
feels weird that you pass it an anchor that has been a `move-to-rect`
output and you get another rect as an output.

But also, it's kinda silly that we're doing that to begin with, so avoid
it by telling the popup frame whether it's been positioned / moved by
move-to-rect (and keeping the anchor in that case).

The reason this works on my setup without "Large text" is just dumb luck
(the front-end computes a max-height for the panel that is small enough
to fit on the screen).

Differential Revision: https://phabricator.services.mozilla.com/D155406
2022-08-30 09:30:27 +00:00
Hiroyuki Ikezoe 65e6de2b59 Bug 1704978 - Prevent opening context menu in the case the user did right click in the overscroll gutter on Windows. r=botond,handyman
Differential Revision: https://phabricator.services.mozilla.com/D155039
2022-08-30 06:49:59 +00:00
Hiroyuki Ikezoe 1222790a59 Bug 1704978 - Remove a comment about NS_IF_RELEASE() use in nsWindow::DispatchMouseEvent. r=botond
The comment about NS_IF_RELEASE() is now useless since there's no
NS_IF_RELEASE() call.

Differential Revision: https://phabricator.services.mozilla.com/D155038
2022-08-30 06:49:58 +00:00
sotaro b59649bf10 Bug 1727215 - Check if CompositorThreadHolder is active r=gfx-reviewers,lsalzman
There were cases that the function was called when CompositorThreadHolder was not active

Differential Revision: https://phabricator.services.mozilla.com/D155929
2022-08-30 04:36:37 +00:00
Sandor Molnar 9d7f9853a2 Backed out changeset bb1d2a4a5570 (bug 1786525) for causing build bustages in xpfe/appshell/AppWindow.cpp CLOSED TREE 2022-08-30 01:26:00 +03:00
Emilio Cobos Álvarez 163b9c7bda Bug 1786588 - Don't unnecessarily MoveResize windows if they haven't moved or resize. r=stransky
I was looking into bug 1786525 and this caused some useless
notifications which we can avoid.

Differential Revision: https://phabricator.services.mozilla.com/D155407
2022-08-29 21:55:47 +00:00
Emilio Cobos Álvarez cf74fba975 Bug 1786525 - Don't update untransformed anchor rect when moved by move-to-rect. r=stransky
Otherwise, it changes the move-to-rect inputs, which can change the
output as well, making us move the anchor all the way to the right.

You could, I guess, consider this a mutter bug of sorts, because it
feels weird that you pass it an anchor that has been a `move-to-rect`
output and you get another rect as an output.

But also, it's kinda silly that we're doing that to begin with, so avoid
it by telling the popup frame whether it's been positioned / moved by
move-to-rect (and keeping the anchor in that case).

The reason this works on my setup without "Large text" is just dumb luck
(the front-end computes a max-height for the panel that is small enough
to fit on the screen).

Differential Revision: https://phabricator.services.mozilla.com/D155406
2022-08-29 21:47:34 +00:00
sotaro c0fbba3837 Bug 1787293 - Revert Bug 1780138 r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D155833
2022-08-29 13:54:48 +00:00
Nika Layzell fc835b08d2 Bug 1781129 - Part 3: Remove Shmem overload of GetSurfaceData, r=edgar
After the previous changes there was only one consumer left of the Shmem
version of GetSurfaceData, which could easily be changed to use BigBuffer,
removing the need for that overload.

After that consumer is removed, the interface was also simplified as the
generic logic in the implementation was no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D151854
2022-08-26 16:08:06 +00:00
Nika Layzell ff386ec755 Bug 1781129 - Part 2: Use BigBuffer for ShmemImage, r=edgar
The ShmemImage type was previously implemented using a Shmem, however due to
the usage patterns, `BigBuffer` is probably a better fit, and allows unifying
more code in nsContentUtils.

Differential Revision: https://phabricator.services.mozilla.com/D151853
2022-08-26 16:08:05 +00:00
Nika Layzell 91a521bf3a Bug 1781129 - Part 1: Use BigBuffer for IPCDataTransfer, r=edgar
The IPCDataTransfer type is used to transfer Clipboard/Drag & Drop payloads
over IPC to allow them to be written to or read from the relevant system
interfaces. Previously, the system which was used was somewhat complex, and
tried to use Shmem in some cases to store buffers out of line. Now that
BigBuffer is available, it can be simplified substantially.

In addition, this change removed the memory buffer overload of GetSurfaceData,
as the only consumer was using it to immediately send the payload over IPC as a
nsCString. It was changed to instead use `BigBuffer` as that is more efficient
in a large buffer situation, and reduces the number of required copies.

Differential Revision: https://phabricator.services.mozilla.com/D151852
2022-08-26 16:08:05 +00:00
Cristian Tuns cabdc5ed0b Backed out 3 changesets (bug 1782295) for causing Assertion failures on nsDirectoryService.cpp CLOSED TREE
Backed out changeset b332385ffca4 (bug 1782295)
Backed out changeset 8c36812a12dc (bug 1782295)
Backed out changeset 8016b1f25509 (bug 1782295)
2022-08-26 11:50:40 -04:00
Ben Hearsum db7599985e Bug 1782295: Use Nimbus for Felt Privacy window separation r=dao
We'll be defaulting Felt Privacy features to enabled, and allowing them to be disabled by Nimbus (primarily for a holdback study).

Differential Revision: https://phabricator.services.mozilla.com/D153275
2022-08-26 14:50:13 +00:00
Mark Banner 3644b07dd2 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for a few test files. r=mossop
This also moves the layout disabling to the layout section - to be enabled later.

Differential Revision: https://phabricator.services.mozilla.com/D155177
2022-08-26 13:39:39 +00:00
Hiroyuki Ikezoe 4917d58c7b Bug 1786668 - Add a test case that MobileViewportManager is properly updated when browser window moves from a HiDPI monitor to normal one. r=tnikkel
Unfortunately this test doesn't run as expected on our CI since macs on our CI
are running normal DPI mode.

I tested this test works properly on my macbook, it fails without the fix in the
previous commit and it passes with the fix.

Differential Revision: https://phabricator.services.mozilla.com/D153688
2022-08-26 04:44:55 +00:00
Hiroyuki Ikezoe 0ca171b4b6 Bug 1786657 - Implement HeadlessWidget::SynthesizeNativeTouchpadPan. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D155437
2022-08-25 00:34:17 +00:00
Nicholas Rishel 37fd5be4b2 Bug 1787015 - Consolidate raw COM pointers into smart `ComPtr`. r=nalexander
Also moved from `typedef` to `using _ =` syntax to match new templated import of `ComPtr` in ToastNotificationHandler.h.

Depends on D155525

Differential Revision: https://phabricator.services.mozilla.com/D155526
2022-08-24 22:32:02 +00:00
Nicholas Rishel f965aff863 Bug 1787001 - Fix leaking COM object. r=nalexander
`ComPtr` constructor increments the refcount when initializing with a raw COM pointer.

Differential Revision: https://phabricator.services.mozilla.com/D155525
2022-08-24 22:32:02 +00:00
Sandor Molnar 23b2e332ed Backed out changeset b0af62dc599f (bug 1786657) for causing build bustage in widget/headless/HeadlessWidget.cpp CLOSED TREE 2022-08-25 00:46:51 +03:00
Hiroyuki Ikezoe 1185858506 Bug 1786657 - Implement HeadlessWidget::SynthesizeNativeTouchpadPan. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D155437
2022-08-24 21:09:10 +00:00
Csoregi Natalia f9b7f964c7 Backed out changeset 56c6e1791c69 (bug 1782295) for causing failures on browser_startup_mainthreadio.js. CLOSED TREE 2022-08-24 13:29:08 +03:00
Ben Hearsum f639b6db58 Bug 1782295: Use Nimbus for Felt Privacy window separation r=dao
We will be defaulting Felt Privacy features to enabled, and allowing them to be disabled by Nimbus (primarily for a holdback study).

Differential Revision: https://phabricator.services.mozilla.com/D153275
2022-08-23 15:30:42 +00:00
Edgar Chen cc7905e7ab Bug 1785913 - Update mIgnoreEmptyNotification in nsBaseClipboard; r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D148923
2022-08-23 11:05:45 +00:00
Botond Ballo 567be8f228 Bug 1784849 - Use defaulted copy constructor for MultiTouchInput. r=hiro
This ensures all fields are copied, including new ones that
may be added in the future.

Differential Revision: https://phabricator.services.mozilla.com/D155306
2022-08-23 02:30:45 +00:00
Marian-Vasile Laza 9274b092fe Backed out 4 changesets (bug 1781129) for causing mochitest failures on test_bug490879.html. CLOSED TREE
Backed out changeset 37da1d18cde9 (bug 1781129)
Backed out changeset 1ae213bfa43e (bug 1781129)
Backed out changeset dcebc98ea1f1 (bug 1781129)
Backed out changeset 0df2f2832755 (bug 1781129)
2022-08-22 23:07:56 +03:00
Ray Kraesig d37d1556d3 Bug 1786226 - Revert all patches for regressing bug 1776895 r=cmartin
This reverts the following commits:
- 21f1ada7ee6ad5839fc0d9bc98e1ff2d558ef6e7
- cde5393917c483a3516f4c883af02834ddbf11d8
- 3d2dc8de0e7147d0d991c16c29ad9a8678a25635
- 4b17fb88efc581522c0edf0740da4c54c539d39a
- 7b0893449764054af7795df66c0c2e83a370d620
- bcc0fa996f5fd7cc677ca2a5e97329dcd6b74a04
- 9547ab55535d9713c95bc3344d1cc1357520ba92

Differential Revision: https://phabricator.services.mozilla.com/D155237
2022-08-22 18:30:03 +00:00
Nika Layzell e1c2681a2f Bug 1781129 - Part 3: Remove Shmem overload of GetSurfaceData, r=edgar
After the previous changes there was only one consumer left of the Shmem
version of GetSurfaceData, which could easily be changed to use BigBuffer,
removing the need for that overload.

After that consumer is removed, the interface was also simplified as the
generic logic in the implementation was no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D151854
2022-08-22 15:38:15 +00:00
Nika Layzell f8a40edbb1 Bug 1781129 - Part 2: Use BigBuffer for ShmemImage, r=edgar
The ShmemImage type was previously implemented using a Shmem, however due to
the usage patterns, `BigBuffer` is probably a better fit, and allows unifying
more code in nsContentUtils.

Differential Revision: https://phabricator.services.mozilla.com/D151853
2022-08-22 15:38:15 +00:00
Nika Layzell 6c8af6eff5 Bug 1781129 - Part 1: Use BigBuffer for IPCDataTransfer, r=edgar
The IPCDataTransfer type is used to transfer Clipboard/Drag & Drop payloads
over IPC to allow them to be written to or read from the relevant system
interfaces. Previously, the system which was used was somewhat complex, and
tried to use Shmem in some cases to store buffers out of line. Now that
BigBuffer is available, it can be simplified substantially.

In addition, this change removed the memory buffer overload of GetSurfaceData,
as the only consumer was using it to immediately send the payload over IPC as a
nsCString. It was changed to instead use `BigBuffer` as that is more efficient
in a large buffer situation, and reduces the number of required copies.

Differential Revision: https://phabricator.services.mozilla.com/D151852
2022-08-22 15:38:14 +00:00
Andrew Osmond c3bb735dc6 Bug 1785947 - Fix Linux 32-bit WPT backdrop filter tests. r=gfx-reviewers,jrmuizel
In CI, we fail the glxtest which disables all gfx features, including
the backdrop filter feature. We can just enable it on Linux. A follow up
series of patches will reform the blocklist to prevent these footguns in
the future in the next nightly cycle.

Differential Revision: https://phabricator.services.mozilla.com/D155041
2022-08-19 02:13:29 +00:00
Emilio Cobos Álvarez 1ee4fdcb2a Bug 1782595 - Distinguish between "preferred" and "used" color-scheme. r=tnikkel
The "preferred" one is the behavior we have for chrome docs, where we
fall back always to the document's preferred color-scheme rather than
falling back to light.

We'll use this in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D154923
2022-08-18 15:49:52 +00:00
Jamie Nicol a6a26075dc Bug 1784588 - Fix SplitDriverVersion when the string has less than 4 numbers. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D154897
2022-08-18 12:57:47 +00:00
Andrew Osmond 5a36e3dd85 Bug 1785366 - Blocklist backdrop filter on some Ivy/Sandybridge Intel Windows drivers. r=jrmuizel,emilio
Backdrop filter crashes newer Intel drivers on Windows. This patch adds
support to the blocklist infrastructure for backdrop filter, and hooks
this up with the CSS property table.

Differential Revision: https://phabricator.services.mozilla.com/D154950
2022-08-18 12:29:20 +00:00
Jamie Nicol 3b0edb46fc Bug 1783542 - Use widget size from ResumeAndResize rather than querying native window. r=gfx-reviewers,aosmond
On Android we have until now determined the compositor widget's size
by querying the values from the ANativeWindow. However, since bug
1780093 landed we can now switch between which Surface we are
rendering in to, and as a result we appear to be using the wrong size
some of the time.

This patch is a speculative attempt to fix this, by using the size
passed to ResumeAndResize() (which itself comes from the Surface's
surfaceChanged() callback) rather than querying the window.

Differential Revision: https://phabricator.services.mozilla.com/D154909
2022-08-18 12:16:46 +00:00
stransky fd3ef30a3c Bug 1784873 [Wayland] Remove outdated check for move-to-rect r=emilio
Remove outdated check for move-to-rect. It's redundant and it's implemented in more complex way by nsWindow::WaylandPopupCheckAndGetAnchor() now.

Differential Revision: https://phabricator.services.mozilla.com/D154882
2022-08-18 09:33:24 +00:00
stransky 3062502a96 Bug 1784873 [Wayland] Allow to use fast popup placement (without move-to-rect) for first popup only due to mutter bug r=emilio
Due to https://gitlab.gnome.org/GNOME/gtk/-/issues/5089 we can't use fast popup placement for nested popups.
Only first popup can be placed by gtk_window_move().

Differential Revision: https://phabricator.services.mozilla.com/D154881
2022-08-18 09:33:24 +00:00
stransky cedb3acccd Bug 1784873 [Wayland] Implement nsWindow::WaylandPopupIsFirst() helper to check popup state in popup hierarchy r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154880
2022-08-18 09:33:23 +00:00
stransky db0b337000 Bug 1784873 [Wayland] Don't hide & position popups which are on correct position r=emilio
Extra hide/show needed for gtk_window_move() produces extra flickering so avoid it if possible.

Differential Revision: https://phabricator.services.mozilla.com/D154879
2022-08-18 09:33:23 +00:00
Marian-Vasile Laza d774d6ecb3 Backed out changeset 49c7536f01db (bug 1785366) for causing xpcshell failures on test_css-properties-db.js. CLOSED TREE 2022-08-18 07:41:44 +03:00
Andrew Osmond 96648c7055 Bug 1785366 - Blocklist backdrop filter on some Ivy/Sandybridge Intel Windows drivers. r=jrmuizel,emilio
Backdrop filter crashes newer Intel drivers on Windows. This patch adds
support to the blocklist infrastructure for backdrop filter, and hooks
this up with the CSS property table.

Differential Revision: https://phabricator.services.mozilla.com/D154950
2022-08-18 03:21:27 +00:00
Botond Ballo 65a722e6e1 Bug 1746336 - Treat nsEventStatus_eIgnore as INPUT_RESULT_UNHANDLED consistently. r=hiro,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D152351
2022-08-18 02:07:14 +00:00
Ray Kraesig 7179a513ca Bug 1754803 - expand size-field to 16 digits if 8 won't suffice r=handyman
... while retaining the existing 8-wide padding for backward
compatibility with existing consumers.

Differential Revision: https://phabricator.services.mozilla.com/D154705
2022-08-17 22:46:57 +00:00
Emilio Cobos Álvarez 534f39ed75 Bug 1785310 - Remove mozilla/StaticPrefs_layout.h includes from other headers. r=dholbert
Adding layout prefs cause massive rebuilds because of this.

Differential Revision: https://phabricator.services.mozilla.com/D154928
2022-08-17 21:26:36 +00:00
Nick Alexander ba86996b7a Bug 1783051 - Turn default browser agent's `EventLog` into a Windows-only header utility. r=rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D153658
2022-08-17 20:01:58 +00:00
Ryan VanderMeulen b16f6be00a Bug 1776895 - Fix file-whitespace linter error. r=bustage on a CLOSED TREE 2022-08-17 15:08:03 -04:00
Ray Kraesig d1411e990f Bug 1776895 - [6/6] Add logging for fullscreen entry/exit r=cmartin
Add logging for fullscreen position-state saving and restoration.

Differential Revision: https://phabricator.services.mozilla.com/D153411
2022-08-17 18:51:32 +00:00
Ray Kraesig c4d109da63 Bug 1776895 - [5/6] Save and restore original relative position r=cmartin
When entering fullscreen and saving the original position of a window,
also save the original position of its screen.

When leaving fullscreen, keep the window on the same screen. Restore its
_screen-relative_ position, rather than its absolute position.

Differential Revision: https://phabricator.services.mozilla.com/D153410
2022-08-17 18:51:32 +00:00
Ray Kraesig 6700c85a61 Bug 1776895 - [4/6] adjust callsite of HideWindowChrome r=handyman
`HideWindowChrome(false)` may change the reported window size on Mac:
the OS menu bar appears at the top of the screen, and this will cause the
window to shrink if it was fullscreen.

This isn't a problem yet, since we don't check the window dimensions
when exiting fullscreen... but the following commit will do exactly
that. Delay calling `HideWindowChrome` until the last possible minute --
but make sure that it _does_ get called.

Since HideWindowChrome(true) does not presently change the window size
(see bug 498835), no functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D154469
2022-08-17 18:51:31 +00:00
Ray Kraesig 3a0072feae Bug 1776895 - [3/6] Cleanup: specialize further to desktop pixels r=cmartin
Use desktop pixels everywhere:
 - Store the old window position as a `DesktopRect`.
 - Since `GetRectDisplayPix` is infallible, use the convenience getter
   that hands us a `DesktopIntRect`.
 - Add a helper function that wraps `Resize()` and takes any `Rect`
   which uses `DesktopPixel`s.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153409
2022-08-17 18:51:31 +00:00
Ray Kraesig de367482e0 Bug 1776895 - [2/6] Cleanup: remove BoundsUseDesktopPixels() condition r=cmartin
A window is fullscreenable iff it's a desktop window (that is, a
positional child of the desktop rather than of another window) -- and
desktop windows are the windows which use desktop-pixel units in
Resize().

Code coverage confirms that the branch when `BoundsUseDesktopPixels()`
returns `false` is never taken in tests.

Under the (hopefully justified) assumption that it's never taken at all,
no functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153408
2022-08-17 18:51:31 +00:00
Ray Kraesig 4592637ee3 Bug 1776895 - [1/6] Cleanup: use UniquePtr rather than manual allocation r=cmartin
No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153407
2022-08-17 18:51:30 +00:00
Greg Tatum 905a369a06 Bug 1782981 - Only show the macOS context menu if it is supported; r=nordzilla
This code path gets executed by existing tests, and I don't believe
there is a way to execute this behavior using our CI, since it's a macOS
version check.

Differential Revision: https://phabricator.services.mozilla.com/D154172
2022-08-17 15:41:12 +00:00
Razvan Cojocaru 88058d9bfe Bug 1781209 - Swipe navigation does not work when kinetic scroll is disabled. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D154239
2022-08-16 20:54:43 +00:00
stransky 8b6cd8361e Bug 1785072 [Wayland] Use relative position coordinates for GDK_WINDOW_TYPE_HINT_UTILITY/GDK_WINDOW_TYPE_HINT_TOOLTIP popups when moved by gtk_window_move() r=emilio
According to https://gitlab.gnome.org/GNOME/gtk/-/issues/4308 different popup types uses different coordinate systems so we need to cover that.
Use GTK_WINDOW_TYPE_HINT instead of internal Firefox popup type.

Differential Revision: https://phabricator.services.mozilla.com/D154796
2022-08-16 18:43:03 +00:00
stransky ed73cbe3bf Bug 1784336 [Linux] Don't resume compositor if mCompositorWidgetDelegate is missing r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154785
2022-08-16 11:30:13 +00:00
Emilio Cobos Álvarez a5c3cafe6f Bug 1784855 - Add basic support for drawing non-native appearance: menuitem items. r=stransky
This allows us to correctly draw items with mismatched color-scheme
on GTK.

This is a reasonably simple fix. A more elaborate fix could be not using
appearance to draw menuitems on Linux at all, just like we don't use it
to draw menupopups anymore. But in practice it's a bit harder because we
use it also to draw menubar items (which probably should be its own
appearance type instead). I can look into that, but this seems
reasonable for now.

Differential Revision: https://phabricator.services.mozilla.com/D154680
2022-08-16 09:48:07 +00:00
stransky 232c2c4865 Bug 1784067 [Linux] Fix build without Wayland r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154632
2022-08-16 09:27:42 +00:00
stransky b1c9edc1a9 Bug 1780389 [Wayland] Implement RAII class MozContainerSurfaceLock to get&lock wl_surface of moz_container r=rmader
With this patch moz_container_wayland_surface_lock() always locks MozContainer and needs to be paired with moz_container_wayland_surface_unlock() even if it fails and returns nullptr.
Split moz_container_wayland_add_initial_draw_callback() to two new functions:

- moz_container_wayland_add_initial_draw_callback_locked() is called on locked container and only adds draw callback. It asserts when MozContainer is already to draw as we don't expect it.

- moz_container_wayland_add_or_fire_initial_draw_callback() is called on unlocked container as it has it's own lock. It behaves as original moz_container_wayland_add_initial_draw_callback(), i.e. stores draw callback when MosContainer is not visible and fires draw callback when we're ready to draw.

- implement RAII class MozContainerSurfaceLock and use it to lock moz_contatier and get wl_surface of it.

Differential Revision: https://phabricator.services.mozilla.com/D152276
2022-08-16 08:46:33 +00:00
Andi-Bogdan Postelnicu eeac3728d2 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 14.0.5 (taskcluster-DydCt-ryTuKvBYw1HQOugw)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D154661
2022-08-16 07:08:27 +00:00
Edgar Chen 3e5030eb96 Bug 1755863 - Part 2: Add async API/IPC for getting matching data flavors from clipboard; r=nika,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152516
2022-08-15 20:27:26 +00:00
Edgar Chen f6014ee7c6 Bug 1755863 - Part 1: Add async API for getting data on nsIClipboard; r=geckoview-reviewers,NeilDeakin,m_kato,nika
Differential Revision: https://phabricator.services.mozilla.com/D145378
2022-08-15 20:27:24 +00:00
David Shin 05f999536d Bug 1681183: Ignore unwriteable margins user specifies `Margins: None` for printing. r=dholbert,mstriemer
This lets users e.g. print-to-scale where it matters.
Custom margins are still clamped to unwriteable margins, even when all zeroes,
to avoid impacting user-specified & persisted margins.

Differential Revision: https://phabricator.services.mozilla.com/D152900
2022-08-15 19:55:08 +00:00
Norisz Fay 295485c15a Backed out changeset e4b5b93592b0 (bug 1780389) for causing build bustages on MozContainerWayland.h CLOSED TREE 2022-08-15 22:48:52 +03:00
stransky 616c7c35ee Bug 1780389 [Wayland] Implement RAII class MozContainerSurfaceLock to get&lock wl_surface of moz_container r=rmader
With this patch moz_container_wayland_surface_lock() always locks MozContainer and needs to be paired with moz_container_wayland_surface_unlock() even if it fails and returns nullptr.
Split moz_container_wayland_add_initial_draw_callback() to two new functions:

- moz_container_wayland_add_initial_draw_callback_locked() is called on locked container and only adds draw callback. It asserts when MozContainer is already to draw as we don't expect it.

- moz_container_wayland_add_or_fire_initial_draw_callback() is called on unlocked container as it has it's own lock. It behaves as original moz_container_wayland_add_initial_draw_callback(), i.e. stores draw callback when MosContainer is not visible and fires draw callback when we're ready to draw.

- implement RAII class MozContainerSurfaceLock and use it to lock moz_contatier and get wl_surface of it.

Differential Revision: https://phabricator.services.mozilla.com/D152276
2022-08-15 19:35:40 +00:00
stransky c83ad87f6f Bug 1767460 [Linux] Implement RAII class for nsDragService::mEventLoopDepth r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154584
2022-08-15 19:30:03 +00:00
Martin Stransky a4ab3bbff8 Bug 1767460 [Wayland] Set D&D move as default action on Wayland r=emilio
Due to different D&D handling on X11 and Wayland we should pass only GDK_ACTION_MOVE to gdk_drag_status().
Different D&D operation passed to gdk_drag_status() is returned back by gdk_drag_context_get_selected_action() so
gdk_drag_context_get_selected_action returns value set by gdk_drag_status() and not D&D modifiers set by CTRL/SHIFT

Also pass correct time to gdk_drag_status().

Depends on D154417

Differential Revision: https://phabricator.services.mozilla.com/D154418
2022-08-15 19:30:03 +00:00
Martin Stransky cbebd2904e Bug 1767460 [Wayland] Don't enable drop by default on Wayland - remove Wayland specific D&D workaround r=emilio
As we handle D&D in time now we can remove the D&D workaround.
It was used to enable D&D until D&D move handler sends reply to system but also enables D&D where should be disabled (like History menu).

Depends on D154416

Differential Revision: https://phabricator.services.mozilla.com/D154417
2022-08-15 19:30:02 +00:00
Martin Stransky 7179bc70ae Bug 1767460 [Wayland] Send D&D status back to compositor in D&D move handler r=emilio
This is an update to Bug 1730203. We need to answer to D&D inside of D&D move handler due to specific Gtk architecture.
In fix for Bug 1730203 we send the reply but we failed to update D&D status so the reply may be outdated.
In this patch we:

- Set correct D&D state and send reply to D&D motion event
- Move above code to nsDragService (nsDragService::Schedule()) so UpdateDragAction()/ReplyToDragMotion() can be private again.
- Update UpdateDragAction()/ReplyToDragMotion() to use correct GdkDragContext.
- At UpdateDragAction() call gdk_drag_context_get_selected_action() for valid GdkDragContext only.

Depends on D154415

Differential Revision: https://phabricator.services.mozilla.com/D154416
2022-08-15 19:29:58 +00:00
Martin Stransky 6b622391b0 Bug 1767460 [Linux] Log nested loop depth in D&D logs r=emilio
Depends on D154414

Differential Revision: https://phabricator.services.mozilla.com/D154415
2022-08-15 19:29:58 +00:00
Martin Stransky f5b8a06238 Bug 1767460 [Linux] D&D: Count deep of nested event loops r=emilio
D&D uses nested evenet loops to get data from system. Let's track how deep are they nested for diagnostic purpose.

Depends on D154413

Differential Revision: https://phabricator.services.mozilla.com/D154414
2022-08-15 19:29:57 +00:00
Martin Stransky df81ad2761 Bug 1767460 [Linux] Modify D&D action by gdk_drag_context_get_selected_action() on Wayland r=emilio
- When gdk_drag_context_get_selected_action() returns valid D&D operation, use it instead of default one.
- Add more D&D logging.
- It's slightly modified version of https://phabricator.services.mozilla.com/D150551 by jhorak@redhat.com

Differential Revision: https://phabricator.services.mozilla.com/D154413
2022-08-15 19:29:57 +00:00
stransky 811d4d915a Bug 1784255 [Wayland] Hide a popup when it's positioned by gtk_window_move() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154645
2022-08-15 19:14:29 +00:00
stransky aa30cf1780 Bug 1784688 [Wayland] Don't destroy invisible popups on temporary hide r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154644
2022-08-15 19:13:08 +00:00
Makoto Kato a2a31e8702 Bug 1783804 - Use std::move for InputData since copy constructor of InputData doesn't copy all member variable. r=geckoview-reviewers,calu
When turning on fission, OOP child frame doesn't receive touch events such as
`touchstart`.

When dispatching touch event from GeckoView side, some informations such as
`mLayersId` are missing since copy constructor of `MultiTouchInput` doesn't
copy all information.

Since the structure of Input data has a lot of members, we should use
`std::move` instead of copy constructor of `InputData`. It can avoid
unnecessary copy.

Differential Revision: https://phabricator.services.mozilla.com/D154242
2022-08-15 08:47:35 +00:00
Emilio Cobos Álvarez a7401488af Bug 1784265 - Drop support for flex attribute values other than 0 and 1. r=dholbert,mconley,preferences-reviewers
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.

Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).

In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.

Add a debug-only assertion to ensure we preserve behavior for now.

Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.

Differential Revision: https://phabricator.services.mozilla.com/D154394
2022-08-12 23:13:41 +00:00
Andrew McCreight ce22b38b5f Bug 1784397 - Remove Core:: Plug-ins from BUG_COMPONENT. r=handyman DONTBUILD
dom/ and dom/webidl/ : Default these files back to DOM: Core & HTML
PluginChild.jsm: Apparently this is only still used for GMP things.
browser/base/content/ : The remaining tests are mostly EME related, so I switched it over to that.
widget/tests/ : No plugin files remain, so I removed the rule.

Differential Revision: https://phabricator.services.mozilla.com/D154537
2022-08-12 22:39:41 +00:00
Marian-Vasile Laza 7f5e2711c6 Backed out 3 changesets (bug 1784265) for causing reftest failures on flex-emulation-1.xhtml. CLOSED TREE
Backed out changeset 415da4b53bdd (bug 1784265)
Backed out changeset e27b21c54b1f (bug 1784265)
Backed out changeset fcb1a053fbe2 (bug 1784265)
2022-08-13 01:14:13 +03:00
Mike Hommey 5825112e31 Bug 1784172 - Define GDK_TOUCHPAD_GESTURE_MASK as a gint. r=stransky
clang trunk doesn't like it being defined as a enum GdkEventMask,
because it doesn't fit in the value, but OTOH, it's only used in
kEvents, which is a gint.

Differential Revision: https://phabricator.services.mozilla.com/D154357
2022-08-12 20:13:34 +00:00
Emilio Cobos Álvarez a2ec6564f3 Bug 1784265 - Drop support for flex attribute values other than 0 and 1. r=dholbert,mconley,preferences-reviewers
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.

Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).

In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.

Add a debug-only assertion to ensure we preserve behavior for now.

Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.

Differential Revision: https://phabricator.services.mozilla.com/D154394
2022-08-12 19:34:34 +00:00
Timothy Nikkel 335ed01ea3 Bug 1784251. Allow widget/tests/browser/browser_test_swipe_gesture.js to test swipe to nav on linux. r=hiro
We implement SendNativeTouchpadPan/SynthesizeNativeTouchpadPan (like Windows does for this test).

I tried to use the existing functions SendNativeMouseScrollEvent/SynthesizeNativeMouseScrollEvent which are implemented on Linux and which are what we use for mac on this test, but it's already used for other stuff and it would be very clunky to overload it to make it work for this too.

I didn't see any way to "tag" the gdk events with more info, so making the observer notifier work was clunky. Similarly for getting the phase start/update/end work.

Differential Revision: https://phabricator.services.mozilla.com/D154386
2022-08-12 05:14:22 +00:00
Emilio Cobos Álvarez ff538cab0e Bug 1784349 - Don't use -moz-bool-pref for flexbox -moz-box emulation. r=dholbert,perftest-reviewers,sparky
Use a bool pref media query which allows dynamic changes to get
reflected instantly.

Differential Revision: https://phabricator.services.mozilla.com/D154449
2022-08-11 23:22:52 +00:00
Emilio Cobos Álvarez ef562aae0a Bug 774398 - Hack to make print and viewport media query listeners fire when printing. r=geckoview-reviewers,owlish,dholbert
This still doesn't fire on print settings changes, so it uses the
default page size. Which is probably better than nothing, but...

To make viewport-size media-query listeners work more generally for
printed documents, we would need to re-clone the top document
unconditionally for all print settings changes, which needs front-end
work at least, and is dubious if the page changes dynamically.

Differential Revision: https://phabricator.services.mozilla.com/D150499
2022-08-11 23:11:37 +00:00
Timothy Nikkel 63000b6623 Bug 1784183. Initialize nsWindow::mPanInProgress. r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D154331
2022-08-11 02:09:17 +00:00
Neil Deakin 8c6f5c9fee Bug 1777149, ensure the dropEffect is being set correctly when a drop ends in a different process, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D153979
2022-08-10 23:55:08 +00:00
Greg Tatum 3c686461e9 Bug 1782579 - Pass languages to the text recognition api; r=nordzilla,emilio
Differential Revision: https://phabricator.services.mozilla.com/D153668
2022-08-10 19:38:46 +00:00
Norisz Fay 8bc30afa79 Backed out 6 changesets (bug 1782578, bug 1782579) for causing mochitest failures on browser_parsable_css.js CLOSED TREE
Backed out changeset bdb42cfe6213 (bug 1782579)
Backed out changeset 5f17ee4cc4df (bug 1782578)
Backed out changeset 4f969d46dd37 (bug 1782578)
Backed out changeset b4c51d1ffa99 (bug 1782578)
Backed out changeset 98d0d6bcd37b (bug 1782578)
Backed out changeset 8332d678079e (bug 1782578)
2022-08-10 20:19:31 +03:00
Greg Tatum 980c8191a3 Bug 1782579 - Pass languages to the text recognition api; r=nordzilla,emilio
Differential Revision: https://phabricator.services.mozilla.com/D153668
2022-08-10 16:08:46 +00:00
Robert Mader 6bf01f2c2f Bug 1783924 - Enable HW-WR on all Mesa drivers in release, r=gfx-reviewers,aosmond
We have allowed it in nightly for quite a while now and of all drivers
capable of GL(ES) >= 3.0 all either have already their own rules, have
recently be tested (freedreno >= 22.2/panfrost) or are are still
experimental/niche.

So lets finally draw a line from where on rendering regressions will
be driver issues and not our business.

The choosen Mesa version is the upcoming one, containing some fixes
for freedreno. As many distros for ARM devices update their drivers
rather conservatively, the effect of this will only slowly take
effect and even in case of major issues on some drivers (maybe v3d?)
likely allow us to add block rules before hitting many users.

Differential Revision: https://phabricator.services.mozilla.com/D154134
2022-08-10 14:36:10 +00:00
Christian Holler 146a80ecff Bug 1783844 - Remove IPC::Principal type remains from codebase. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D154091
2022-08-10 13:39:11 +00:00
stransky 17afbeca30 Bug 1777269 [Wayland] Always use GDK_WINDOW_TYPE_HINT_POPUP_MENU for popups r=emilio
A workaround for Mutter/Gtk issue https://gitlab.gnome.org/GNOME/gtk/-/issues/5089

Differential Revision: https://phabricator.services.mozilla.com/D154066
2022-08-10 08:47:06 +00:00
stransky b625405b8a Bug 1709254 [Wayland] Close popups without visible parent to avoid application crash due to broken popup hierarchy r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154061
2022-08-10 08:40:04 +00:00
stransky 284f00e9d4 Bug 1783437 [Wayland] Make sure we don't use rectangle anchor with zero width/height r=emilio
Depends on D154012

Differential Revision: https://phabricator.services.mozilla.com/D154013
2022-08-10 08:35:46 +00:00
stransky c78eb7d6c6 Bug 1783437 [Wayland] Move move-to-rect config to nsWindow::WaylandPopupCheckAndGetAnchor() r=emilio
Move popup window move-to-rect config (anchor canculation, check if we need it and can use it) to a new method WaylandPopupCheckAndGetAnchor().

Depends on D153860

Differential Revision: https://phabricator.services.mozilla.com/D154012
2022-08-10 08:35:46 +00:00
stransky 8edcf038f0 Bug 1783437 [Wayland] Don't use move-to-rect when popup and its parent are not adjacent r=emilio
Move-to-rect fails to position and show a popup when the popup anchor is outside of its parent window area.
For instance we can't use a rectangle of 10x10 pixels located at -20, -20 as an anchor as it leads to invisible popup window.
But that scenario can happen so we need to use plain move in such case which works and places the popup to -20, -20 coordinates.

Differential Revision: https://phabricator.services.mozilla.com/D153860
2022-08-10 08:35:46 +00:00
stransky bf46895b5b Bug 1783437 [Wayland] Use GtkWindow to check and place tooltips r=emilio
- In order to get tooltip position we need to use gtk_window_get_position() as it cover case when GdkWindow is not placed yet.
- Use both gdk_window_move()/gdk_window_move() to reset widget position as a workaround for https://gitlab.gnome.org/GNOME/gtk/-/issues/4071.
- Apply the workaround to tooltips only as it affects only temporary windows.

Differential Revision: https://phabricator.services.mozilla.com/D153859
2022-08-10 08:35:45 +00:00
stransky 1480b61928 Bug 1782948 [Wayland] Assert if MozContainer::waiting_to_show is accessed from different threads r=emilio
Depends on D154006

Differential Revision: https://phabricator.services.mozilla.com/D154007
2022-08-10 08:25:57 +00:00
stransky d11b50aa5e Bug 1782948 [Wayland] When we fail to show wayland popup, purge webrender queue and destroy compositor of the popup to make sure we're not blocking rendering of other windows r=emilio
As popups and Firefox main window can share refresh drivers we need to remove blocked compositing requests of hidden windows to make sure
we're not blocking other windows.

Implement moz_container_wayland_clear_waiting_to_show_flag() to clear MozContainer::waiting_to_show flag.

Depends on D154005

Differential Revision: https://phabricator.services.mozilla.com/D154006
2022-08-10 08:25:57 +00:00
stransky 3b71545650 Bug 1782948 [Linux] Make RevokeTransactionIdAllocator() call part of nsBaseWidget::DestroyCompositor() r=emilio
Make RevokeTransactionIdAllocator() call part of nsBaseWidget::DestroyCompositor() so we don't need to do extra call.

Depends on D154004

Differential Revision: https://phabricator.services.mozilla.com/D154005
2022-08-10 08:25:56 +00:00
stransky 9617e399f2 Bug 1782948 [Wayland] Implement waiting_to_show flag at mozcontainer to indicate that mozcontainer is supposed to be visible but it isn't (yet) r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154004
2022-08-10 08:25:56 +00:00
Sandor Molnar 11e0476cea Backed out 5 changesets (bug 1776895) for causing mochitest failures in widget/tests/test_bug522217.xhtml CLOSED TREE
Backed out changeset cda5c3ab282f (bug 1776895)
Backed out changeset 8a5b0ed7ccb6 (bug 1776895)
Backed out changeset 871f199ecca1 (bug 1776895)
Backed out changeset b0e8b9d7d2a4 (bug 1776895)
Backed out changeset 9a85cc74c6cc (bug 1776895)
2022-08-10 02:38:18 +03:00
Ray Kraesig a88e46a0d4 Bug 1776895 - [5/5] Add logging for fullscreen entry/exit r=cmartin
Add logging for fullscreen position-state saving and restoration.

Differential Revision: https://phabricator.services.mozilla.com/D153411
2022-08-09 20:18:40 +00:00
Ray Kraesig 6dd316e070 Bug 1776895 - [4/5] Save and restore original relative position r=cmartin
When entering fullscreen and saving the original position of a window,
also save the original position of its screen.

When leaving fullscreen, keep the window on the same screen. Restore its
_screen-relative_ position, rather than its absolute position.

Differential Revision: https://phabricator.services.mozilla.com/D153410
2022-08-09 20:18:40 +00:00
Ray Kraesig 8182e508f5 Bug 1776895 - [3/5] Cleanup: specialize further to desktop pixels r=cmartin
Use desktop pixels everywhere:
 - Store the old window position as a `DesktopRect`.
 - Since `GetRectDisplayPix` is infallible, use the convenience getter
   that hands us a `DesktopIntRect`.
 - Add a helper function that wraps `Resize()` and takes any `Rect`
   which uses `DesktopPixel`s.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153409
2022-08-09 20:18:40 +00:00
Ray Kraesig b100d33828 Bug 1776895 - [2/5] Cleanup: remove BoundsUseDesktopPixels() condition r=cmartin
A window is fullscreenable iff it's a desktop window (that is, a
positional child of the desktop rather than of another window) -- and
desktop windows are the windows which use desktop-pixel units in
Resize().

Code coverage confirms that the branch when `BoundsUseDesktopPixels()`
returns `false` is never taken in tests.

Under the (hopefully justified) assumption that it's never taken at all,
no functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153408
2022-08-09 20:18:39 +00:00
Ray Kraesig 7bb3ab29c0 Bug 1776895 - [1/5] Cleanup: use UniquePtr rather than manual allocation r=cmartin
No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153407
2022-08-09 20:18:39 +00:00
Kagami Sascha Rosylight 16ea24f6cc Bug 1769290 - Part 26: Emit errors from JSHandleRootedTypedefChecker r=andi,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D151842
2022-08-09 14:13:30 +00:00
Hiroyuki Ikezoe 6fb7d475d0 Bug 1781962 - A simple test case for swipe-to-navigation on RTL. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D153902
2022-08-09 02:01:37 +00:00
Emilio Cobos Álvarez b9dd468a31 Bug 1783566 - Restore dark highlight/selecteditem color behavior after bug 1782858. r=mstange
I accidentally changed it for the highlight / highlighttext colors.

Differential Revision: https://phabricator.services.mozilla.com/D153923
2022-08-08 19:58:15 +00:00
stransky 68712cf951 Bug 1783195 [Linux] Implement MozClearHandleID to clean glib handle r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D153753
2022-08-08 17:52:20 +00:00
Mathew Hodson 215af10b6a Bug 1783087 - Fix build with --disable-backgroundtasks. r=nalexander DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D153690
2022-08-08 10:40:29 +00:00
Masayuki Nakano bea9bf4233 Bug 1782852 - part 1: Get rid of unused editor commands in the wild r=smaug
`increaseFontSize`, `decreaseFontSize`, `gethtml`, `heading` and `readonly`
commands were disabled for a year in all channels, but no regression reports
have been filed.  Therefore, we can delete the commands and the telemetry
probes.

Note that `cmd_getContents` command which is the internal command of `gethtml`
is not used in comm-central too.  Therefore, this patch deletes the command
handler, `nsClipboardGetContentsCommand`, and `Command::GetHTML` too.

Differential Revision: https://phabricator.services.mozilla.com/D153720
2022-08-05 02:55:22 +00:00
Ben Hearsum d1f484c9c2 Bug 1779798: don't use private browsing taskbar icon when in permanent private browsing mode. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D153649
2022-08-04 14:23:12 +00:00
stransky 8dc829309f Bug 1782778 [Linux] Don't resume compositor in nsWindow::ConfigureCompositor() callback when it's paused by PauseCompositorFlickering() r=emilio
In this patch we:

- Implement ResumeCompositorImpl() to unify compositor resume by ResumeCompositorFlickering() and ConfigureCompositor() as the code is almost identical.
- Allow COMPOSITOR_PAUSED_FLICKERING state in ConfigureCompositor() callback - in such case postpone compositor resume to ResumeCompositorFlickering().

Depends on D153573

Differential Revision: https://phabricator.services.mozilla.com/D153574
2022-08-04 09:26:39 +00:00
stransky 799a600339 Bug 1782778 [Linux] Don't call ResumeCompositorFlickering() on destroyed windows r=emilio
Depends on D153572

Differential Revision: https://phabricator.services.mozilla.com/D153573
2022-08-04 09:26:39 +00:00
stransky 7d2327ced2 Bug 1782778 [Linux] Rename PauseCompositor/ResumeCompositor to PauseCompositorFlickering/ResumeCompositorFlickering r=emilio
Rename PauseCompositor/ResumeCompositor to make it clear that we use it to supress flickering only.

Differential Revision: https://phabricator.services.mozilla.com/D153572
2022-08-04 09:26:38 +00:00
Makoto Kato 4bd3fcb301 Bug 1778277 - Don't use native key bindings to dispatch process key. r=masayuki,geckoview-reviewers,owlish
GeckoView dispatch keyboard event to child process directly and it doesn't
support non-e10s mode. But since about:config will run on chrome process,
GeckoView will dispatch it to parent process.

By bug 1430241, we don't use native key binding when dispatching key event on
parent process. But we forget it for process key event. So even if process key,
we shouldn't use native key binding.

Differential Revision: https://phabricator.services.mozilla.com/D153416
2022-08-04 00:44:43 +00:00
Geoff Lankow 94a2f91823 Bug 1774083 follow-up - Fix test_windows_alert_service.js on Thunderbird. r=nrishel,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D153562
2022-08-03 22:43:05 +00:00
Leonard Lausen 7b68d8e49f Bug 1783053 - Disable DMABUF_SURFACE_EXPORT on Qualcomm. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D153660
2022-08-03 21:23:50 +00:00
Emilio Cobos Álvarez cf26510de6 Bug 1782858 - Make color-scheme affect Windows' non-native menus. r=desktop-theme-reviewers,dao
This matches what Linux and macOS do, and that allows the fix for bug 1782623
to work on Windows for unstyled selects.

This also simplifies the CSS (though it adds a new system color which is a bit
more annoying). I filed https://github.com/w3c/csswg-drafts/issues/7561 to
propose adding a more generic way to do this in the future (not just for
Firefox).

Differential Revision: https://phabricator.services.mozilla.com/D153549
2022-08-03 20:33:09 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
stransky 0165f1f5eb Bug 1777919 [Wayland] Don't crash on bogus move-to-rect callback r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D153580
2022-08-03 12:09:01 +00:00
Mark Banner 7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Timothy Nikkel 8d1c0ac936 Bug 1782631. Don't draw swipe to nav arrows at 100% of animation if navigation won't occur. r=hiro
We need to pass the event amount to StartAnimating otherwise we start animating from 100% as we fade the UI arrow away.

Differential Revision: https://phabricator.services.mozilla.com/D153455
2022-08-03 10:50:41 +00:00
Hiroyuki Ikezoe 74df765210 Bug 1776795 - Move the swipe-to-nav icon in response to the swipe gestures on Windows. r=tnikkel,desktop-theme-reviewers,sfoster
Both Chrome and Edge on Windows also move the swipe-to-nav arrow icon, the
distance of move seems to be a fixed value, it doesn't depend on the browser
window size. So we also use a fixed value, 100px here.

Chrome on Mac also moves the icon, but in a slightly different way. The icon is
a semicircle shape, it never leaves the edge of the browser window even if it's
moving during swipe gestures. So we introduce a new preference named
"browser.swipe.navigation-icon-move-distance" to implement platform dependent
swipe-to-nav icon behaviors. As of now the value on platforms other than Windows
is zero so that the icon never moves on the platforms.

Depends on D152951

Differential Revision: https://phabricator.services.mozilla.com/D150433
2022-08-02 23:08:46 +00:00
Jamie Nicol a17ddfc210 Bug 1780093 - Disable SurfaceControl compositing path when selection is active. r=geckoview-reviewers,calu
On Android we previously added a rendering path using the
SurfaceControl API, in order to work around an Android OS bug when
recovering from a GPU process crash. Unfortunately the Magnifier
widget (shown when moving a text selection caret) does not work when
rendering using SurfaceControl.

This patch makes it so that we temporarily disable the SurfaceControl
path when a text selection is active, allowing the Magnifier to work.
Unfortunately this means that if a GPU process crash occurs while
there is an active selection we will be unable to recover. Hopefully
this turns out to be a relatively rare occurence.

Differential Revision: https://phabricator.services.mozilla.com/D153454
2022-08-02 20:55:20 +00:00
Marian-Vasile Laza 0bebd4fea4 Backed out 4 changesets (bug 1781129) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 8557305bcd46 (bug 1781129)
Backed out changeset df6f98df9559 (bug 1781129)
Backed out changeset 905393f66985 (bug 1781129)
Backed out changeset 0d0f19a4db70 (bug 1781129)
2022-08-02 23:29:56 +03:00
Nicholas Rishel 42ed8c3177 Bug 1774083 - Part 4: Prepend Windows toast launch arguments to the toast action arguments. r=nalexander
Windows toast actions (buttons) override the launch argument. The launch arguments are necessary for the notification server to reconstruct the source of the toast, therefore we prepend it to the action argument.

Differential Revision: https://phabricator.services.mozilla.com/D152466
2022-08-02 19:40:40 +00:00
Nicholas Rishel 99ad2dba59 Bug 1774083 - Part 3: Allow Windows notifications to persist after dismissed by timeout. r=nalexander
Adds a GUID to the notification's launch attribute too verify a timeout dismissed event doesn't remain in the Action Center.

Remove event hiding to allow notifications to be acted upon after the page or browser is closed.

Differential Revision: https://phabricator.services.mozilla.com/D151741
2022-08-02 19:40:39 +00:00
Nicholas Rishel c295c9ccc4 Bug 1774083 - Part 2: Launch Firefox from notification COM server when activation event occurs. r=nalexander
Adds `program` and `profile` paths to Windows toast notifications so that the COM server can reconstruct the origin in order to relaunch the application.

Differential Revision: https://phabricator.services.mozilla.com/D151740
2022-08-02 19:40:39 +00:00
Nicholas Rishel 57d0e9d993 Bug 1774082 - Add AUMID handling for Windows toast notifications. r=nalexander
For MSIX packages, the package AUMID is used.

For NSIS/MSI installs, AUMID is retrieve from HKCR.

For portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been registered as will be implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Differential Revision: https://phabricator.services.mozilla.com/D151739
2022-08-02 19:40:38 +00:00
Nika Layzell d3ed0c8677 Bug 1781129 - Part 3: Remove Shmem overload of GetSurfaceData, r=edgar
After the previous changes there was only one consumer left of the Shmem
version of GetSurfaceData, which could easily be changed to use BigBuffer,
removing the need for that overload.

After that consumer is removed, the interface was also simplified as the
generic logic in the implementation was no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D151854
2022-08-02 18:09:41 +00:00
Nika Layzell 6375721ce8 Bug 1781129 - Part 2: Use BigBuffer for ShmemImage, r=edgar
The ShmemImage type was previously implemented using a Shmem, however due to
the usage patterns, `BigBuffer` is probably a better fit, and allows unifying
more code in nsContentUtils.

Differential Revision: https://phabricator.services.mozilla.com/D151853
2022-08-02 18:09:40 +00:00
Nika Layzell 5eebe3259a Bug 1781129 - Part 1: Use BigBuffer for IPCDataTransfer, r=edgar
The IPCDataTransfer type is used to transfer Clipboard/Drag & Drop payloads
over IPC to allow them to be written to or read from the relevant system
interfaces. Previously, the system which was used was somewhat complex, and
tried to use Shmem in some cases to store buffers out of line. Now that
BigBuffer is available, it can be simplified substantially.

In addition, this change removed the memory buffer overload of GetSurfaceData,
as the only consumer was using it to immediately send the payload over IPC as a
nsCString. It was changed to instead use `BigBuffer` as that is more efficient
in a large buffer situation, and reduces the number of required copies.

Differential Revision: https://phabricator.services.mozilla.com/D151852
2022-08-02 18:09:40 +00:00
Marian-Vasile Laza 00079e8784 Backed out 4 changesets (bug 1781129) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 4a92d58726aa (bug 1781129)
Backed out changeset bce3f99441c0 (bug 1781129)
Backed out changeset fc135243503e (bug 1781129)
Backed out changeset 726458f976ff (bug 1781129)
2022-08-02 20:32:01 +03:00
Nika Layzell 54f8850883 Bug 1781129 - Part 3: Remove Shmem overload of GetSurfaceData, r=edgar
After the previous changes there was only one consumer left of the Shmem
version of GetSurfaceData, which could easily be changed to use BigBuffer,
removing the need for that overload.

After that consumer is removed, the interface was also simplified as the
generic logic in the implementation was no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D151854
2022-08-02 17:15:42 +00:00
Nika Layzell 2507c37249 Bug 1781129 - Part 2: Use BigBuffer for ShmemImage, r=edgar
The ShmemImage type was previously implemented using a Shmem, however due to
the usage patterns, `BigBuffer` is probably a better fit, and allows unifying
more code in nsContentUtils.

Differential Revision: https://phabricator.services.mozilla.com/D151853
2022-08-02 17:15:41 +00:00
Nika Layzell 452233a5a1 Bug 1781129 - Part 1: Use BigBuffer for IPCDataTransfer, r=edgar
The IPCDataTransfer type is used to transfer Clipboard/Drag & Drop payloads
over IPC to allow them to be written to or read from the relevant system
interfaces. Previously, the system which was used was somewhat complex, and
tried to use Shmem in some cases to store buffers out of line. Now that
BigBuffer is available, it can be simplified substantially.

In addition, this change removed the memory buffer overload of GetSurfaceData,
as the only consumer was using it to immediately send the payload over IPC as a
nsCString. It was changed to instead use `BigBuffer` as that is more efficient
in a large buffer situation, and reduces the number of required copies.

Differential Revision: https://phabricator.services.mozilla.com/D151852
2022-08-02 17:15:41 +00:00
Emilio Cobos Álvarez 87ca092596 Bug 1782623 - Rename nsNativeTheme::IsDarkBackground to IsDarkBackgroundForScrollbar, and clean up a bit surrounding code. r=dholbert
This patch shouldn't change behavior. The Cocoa changes in particular
just save useless frame tree walks, since ThemeColors already computes
the color scheme in ColorSchemeForWidget.

Differential Revision: https://phabricator.services.mozilla.com/D153424
2022-08-02 13:20:40 +00:00
Norisz Fay 17e1015627 Backed out 2 changesets (bug 1776795) for causing bc failures on browser_test_swipe_gesture.js CLOSED TREE
Backed out changeset 7bed4509ae7c (bug 1776795)
Backed out changeset 344336b54939 (bug 1776795)
2022-08-02 10:48:53 +03:00
Hiroyuki Ikezoe 0cc2a4681a Bug 1776795 - Move the swipe-to-nav icon in response to the swipe gestures on Windows. r=tnikkel,desktop-theme-reviewers,sfoster
Both Chrome and Edge on Windows also move the swipe-to-nav arrow icon, the
distance of move seems to be a fixed value, it doesn't depend on the browser
window size. So we also use a fixed value, 100px here.

Chrome on Mac also moves the icon, but in a slightly different way. The icon is
a semicircle shape, it never leaves the edge of the browser window even if it's
moving during swipe gestures. So we introduce a new preference named
"browser.swipe.navigation-icon-move-distance" to implement platform dependent
swipe-to-nav icon behaviors. As of now the value on platforms other than Windows
is zero so that the icon never moves on the platforms.

Differential Revision: https://phabricator.services.mozilla.com/D150433
2022-08-02 06:49:55 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Iulian Moraru 5820ae4560 Backed out 6 changesets (bug 1774083, bug 1774082) for causing xpcshell failures. CLOSED TREE
Backed out changeset 4056bc743e25 (bug 1774083)
Backed out changeset ad20680728cc (bug 1774083)
Backed out changeset 173c4519227f (bug 1774083)
Backed out changeset 54beca69e971 (bug 1774083)
Backed out changeset 1d9d80c75d9d (bug 1774082)
Backed out changeset 7b03aa4c49d1 (bug 1774082)
2022-08-02 02:46:47 +03:00
Nicholas Rishel ffca182aaf Bug 1774083 - Part 4: Prepend Windows toast launch arguments to the toast action arguments. r=nalexander
Windows toast actions (buttons) override the launch argument. The launch arguments are necessary for the notification server to reconstruct the source of the toast, therefore we prepend it to the action argument.

Differential Revision: https://phabricator.services.mozilla.com/D152466
2022-08-01 21:38:07 +00:00
Nicholas Rishel 663de33324 Bug 1774083 - Part 3: Allow Windows notifications to persist after dismissed by timeout. r=nalexander
Adds a GUID to the notification's launch attribute too verify a timeout dismissed event doesn't remain in the Action Center.

Remove event hiding to allow notifications to be acted upon after the page or browser is closed.

Differential Revision: https://phabricator.services.mozilla.com/D151741
2022-08-01 21:38:07 +00:00
Nicholas Rishel cbd6d8d916 Bug 1774083 - Part 2: Launch Firefox from notification COM server when activation event occurs. r=nalexander
Adds `program` and `profile` paths to Windows toast notifications so that the COM server can reconstruct the origin in order to relaunch the application.

Differential Revision: https://phabricator.services.mozilla.com/D151740
2022-08-01 21:38:06 +00:00
Nicholas Rishel ea707f4a77 Bug 1774082 - Add AUMID handling for Windows toast notifications. r=nalexander
For MSIX packages, the package AUMID is used.

For NSIS/MSI installs, AUMID is retrieve from HKCR.

For portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been registered as will be implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Differential Revision: https://phabricator.services.mozilla.com/D151739
2022-08-01 21:38:05 +00:00
Butkovits Atila 2d3fe7f943 Backed out 2 changesets (bug 1774082) for causing failure at test_windows_alert_service.js. CLOSED TREE
Backed out changeset a9553786b2ee (bug 1774082)
Backed out changeset da2ad41a6d10 (bug 1774082)
2022-08-01 01:40:13 +03:00
Nicholas Rishel 4f7f512a84 Bug 1774082 - Add AUMID handling for Windows toast notifications. r=nalexander
For MSIX packages, the package AUMID is used.

For NSIS/MSI installs, AUMID is retrieve from HKCR.

For portable builds, the registry is updated at runtime to populate icons, display name, and the COM server.

The COM server has been registered as will be implemented using DllSurrogate; this allows us to offload managing the eventloop and lifetime of the COM server to dllhost.exe, and minimizes the added code complexity.

The COM server is loaded as a separate executable from the sending process to prevent issues that would occur when multiple instances of the sending process (e.g. profiles running in parallel) try to stand up parallel COM servers. The separated COM executable also allows for multiple applications to share a common COM server.

Bonus: fixes Bug 1500054, Bug 1766095, and Bug 1743424.

Differential Revision: https://phabricator.services.mozilla.com/D151739
2022-07-31 21:59:30 +00:00
Nika Layzell c15823d075 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
David Parks 666630a9f4 Bug 1755700: Serialize IAudioSessionControl destruction/re-creation r=cmartin
Destroying the IAudioSessionControl has concurrency issues with audio playback that require it to be done on the main thread.  We have been trying to create a new AudioSessionControl on a background thread while this happens but some AudioSessionControl internals/dependencies are not thread safe.  In order to avoid concurrency crashes, we destroy the old IAudioSessionControl on the main thread, then dispatch the restart to a background (MTA) thread asynchronously.

Differential Revision: https://phabricator.services.mozilla.com/D152302
2022-07-29 19:32:15 +00:00
David Parks 75d0f3b74f Bug 1755700: Use AgileReference for cross-apartment AudioSessionControl use r=Jamie
A deadlock issue with our main thread audio playback handling arises when we try to destroy the AudioSessionControl from the MTA, despite it being an MTA object.  We therefore dispatch its destruction to the main thread (STA) so the deadlock is impossible.  In order to use it from the STA, we should wrap it in an AgileReference.

Differential Revision: https://phabricator.services.mozilla.com/D152301
2022-07-29 19:32:14 +00:00
David Parks 38ae048304 Bug 1755700: Simplify ownership of AudioSession r=cmartin
Concurrent operations in the MTA make the required lifetime of the AudioSession complex.  In particular, it cannot be known when/if any methods are currently queued or being executed (in particular, Start).  In order to make this safe, we keep the AudioSession at least as long as XPCOM is running background threads.

This patch also removes a long-defunct state machine and does some basic code cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D152300
2022-07-29 19:32:14 +00:00
David Parks 6e2dd315e2 Bug 1755700: Use StartAudioSession and StopAudioSession symmetrically r=cmartin
Moves StopAudioSession earlier -- to nsAppShell::Run -- where we call StartAudioSession.

Differential Revision: https://phabricator.services.mozilla.com/D152299
2022-07-29 19:32:14 +00:00
stransky 43cd54a683 Bug 1782049 [Linux] Update nsWindow compositor configuration r=emilio
- Don't delete layer manager when nsWindow is unrealized but leave that to Destroy() when it's actually deleted.
  Only disable rendering in ReleaseGdkWindow().
- Create msWindow with enabled composition
- Use single nsWindow::ConfigureCompositor() routine to configure compositor and use it from
  ConfigureGdkWindow() and SetCompositorWidgetDelegate().

Depends on D153206

Differential Revision: https://phabricator.services.mozilla.com/D153207
2022-07-29 16:32:48 +00:00
stransky 1d37f8759d Bug 1782049 [Wayland] Print wayland mozcontainer logs as widget one r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D153206
2022-07-29 16:32:47 +00:00
stransky a1cb667044 Bug 1782006 [Wayland] Check if widget is live at WindowSurfaceProvider::EndRemoteDrawingInRegion() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D153209
2022-07-29 16:29:59 +00:00
Emilio Cobos Álvarez e847b456c5 Bug 1781747 - Don't use shadow class for non-menupopup popup windows. r=Jamie,handyman
These don't get styles early enough to make a shadow decision before Show().
This also matches the previous behavior (nothing would set
nsWidgetInitData::mDropShadow for these windows), so this is the less risky
fix.

It seems somewhat sketchy to use a popup window for these to begin with (Linux
for example maps them to a toplevel Window, at least on Wayland...), but let's
not change too much right now.

The hbrBackground change is a no-op because we can't have a brush before
Create() is called, we update it in SetBackgroundColor().

Differential Revision: https://phabricator.services.mozilla.com/D153095
2022-07-29 12:47:48 +00:00
Florian Queze 5ff0428973 Bug 1782096 - Add profiler markers for window messages sent to WindowProc, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D153101
2022-07-29 10:55:42 +00:00
Razvan Cojocaru e31680bb58 Bug 1751510 - Zoom gesture can not be performed at the same time as a pan gesture. r=botond
And add mochitest for pinching and panning in the same gesture.

Differential Revision: https://phabricator.services.mozilla.com/D151689
2022-07-27 19:05:53 +00:00
Nicholas Rishel afcea90d2f Bug 1780666 - Part 2: Condense litany of Windows toast notification error cases with NS_ENSURE_* macros. r=nalexander,mhowell.
Differential Revision: https://phabricator.services.mozilla.com/D151743
2022-07-26 20:29:43 +00:00
Nicholas Rishel e1973ec9bd Bug 1780666 - Part 1: Manage Windows toast notifcation HSTRING handles lifetime with HString and HStringReference wrappers. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D151742
2022-07-26 20:29:43 +00:00
Nicholas Rishel ce1de4107d Bug 1604883 - Use background thread pool for Windows toast notifications. r=nalexander,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D142357
2022-07-26 20:29:42 +00:00
stransky dc2ab68604 Bug 1777664 [Linux] Remove redundant logging from GtkCompositorWidget r=emilio
Depends on D152731

Differential Revision: https://phabricator.services.mozilla.com/D152732
2022-07-26 14:56:50 +00:00
stransky 1fb2b9ac47 Bug 1777664 [Wayland] Assert when ShowWaylandToplevelWindow() is called on popup r=emilio
Depends on D152730

Differential Revision: https://phabricator.services.mozilla.com/D152731
2022-07-26 14:56:50 +00:00
stransky 8e94daf065 Bug 1777664 [Wayland] Remove print of this from logging r=emilio
Depends on D152694

Differential Revision: https://phabricator.services.mozilla.com/D152730
2022-07-26 14:56:49 +00:00
stransky c3b309f091 Bug 1777664 [Linux] Destory layer manager at nsWindow::ReleaseGdkWindow() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152694
2022-07-26 14:56:49 +00:00
stransky 0b66ba74de Bug 1777664 [Wayland] Handle mCompositorWidgetDelegate changes in nsWindow r=emilio
When mCompositorWidgetDelegate is changed we need to recreate compositor and Wayland vsync. In this patch we do:

- Make mCompositorWidgetDelegate hard requirement for Wayland vsync source to avoid hidden failure.
- Stop Wayland vsync source at nsWindow::SetCompositorWidgetDelegate() when we're going to release or change mCompositorWidgetDelegate.
- Start Wayland vsync source at nsWindow::SetCompositorWidgetDelegate() when there's a new mCompositorWidgetDelegate to make sure vsync uses
  recent one.
- Set new window config (XWindow, shape, widget) and resume compositor at nsWindow::SetCompositorWidgetDelegate() when new mCompositorWidgetDelegate is assigned to widget.
- As it's possible that mCompositorWidgetDelegate is missing in nsWindow::ConfigureGdkWindow() use moz_container_wayland_add_initial_draw_callback() to call mCompositorWidgetDelegate->EnableRendering() & WaylandStartVsync(). That ensures we won't silently fail to set up nsWindow for rendering.

Differential Revision: https://phabricator.services.mozilla.com/D152693
2022-07-26 14:56:49 +00:00
stransky f2bb8e9336 Bug 1777664 [Wayland] Add more logging to EGL window management r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152692
2022-07-26 14:56:48 +00:00
stransky 809626ef79 Bug 1777664 [Wayland] Split ShowWaylandWindow() to ShowWaylandPopupWindow()/ShowWaylandToplevelWindow() and enable/disable VSync for visible/hidden toplevel windows r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152691
2022-07-26 14:56:48 +00:00
stransky b836ad16f3 Bug 1777664 [Wayland] Remove EnableRenderingToWindow()/DisableRenderingToWindow/()/ResumeCompositorHiddenWindow() r=emilio
Enable composition only once when nsWindow is created and don't stop compositon until a window is destroyed.
Remove COMPOSITOR_PAUSED_MISSING_WINDOW as we don't manage compositing for hidden windows any more.

Differential Revision: https://phabricator.services.mozilla.com/D152690
2022-07-26 14:56:48 +00:00
stransky 99644f391c Bug 1777664 [Wayland] Don't pause compositor when nsWindow is hidden r=emilio
We should not pause compositor as compositing is driven by refresh driver and compositor pause leads to browser freeze.

Differential Revision: https://phabricator.services.mozilla.com/D152689
2022-07-26 14:56:47 +00:00
stransky bba1a89638 Bug 1777664 [Linux] Create nsWindow with initially paused compositor as we don't have valid GdkWindow/XWindow yet r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152688
2022-07-26 14:56:47 +00:00
stransky 6164864dbc Bug 1777664 [Linux] Don't pause/resume compositor by nsWindow::SetCompositorWidgetDelegate() r=emilio
nsWindow::SetCompositorWidgetDelegate() should not control compositor state as nsWindow::SetCompositorWidgetDelegate() itself is called by nsBaseWidget::CreateCompositor()/nsBaseWidget::DestroyCompositor().

In this patch we remove compositor pause/resume from nsWindow::SetCompositorWidgetDelegate() and update only GdkWindow/XWindow stored in remote widget.

Differential Revision: https://phabricator.services.mozilla.com/D152687
2022-07-26 14:56:46 +00:00
stransky c2a7d21d6d Bug 1777664 [Linux] Replace CleanLayerManagerRecursive() with DestroyLayerManager() as they're the same r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152686
2022-07-26 14:56:46 +00:00
Christian Holler 555e8f7574 Bug 1781044 - Disable some diagnostic asserts in widget for IPC fuzzing. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D152639
2022-07-26 14:06:24 +00:00
James Teh 0333dc5fb2 Bug 1780318: Handle keyboard activation in Windows SystemStatusBar. r=mconley
When the user wishes to open the window with the mouse, the shell sends NIN_SELECT.
We could continue to use WM_LBUTTONUP there, but the semantic notification is probably better.
When the user presses the space/enter key to open the window, the shell sends NIN_KEYSELECT.
When the user activates the context menu either with the mouse or the keyboard (applications/shift+f10 key), the shell sends WM_CONTEXTMENU.

Differential Revision: https://phabricator.services.mozilla.com/D152234
2022-07-25 22:01:35 +00:00
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Haik Aftandilian f43f562153 Bug 1776210 - [macOS 13] Stack underflow crashes on Wifi Monitor thread on macOS 13 (Ventura) beta r=mac-reviewers,necko-reviewers,mstange,dragana
Use a larger stack size on macOS 13 for the Wifi monitor thread to accommodate Core WLAN code allocating 217K+ on the stack.

Differential Revision: https://phabricator.services.mozilla.com/D152555
2022-07-25 14:09:09 +00:00
Robert Mader 8a47e3fad8 Bug 1780889 - Add AMD Yellow Carp device ID, r=gfx-reviewers,jgilbert
We really should move to blocklisting...

Differential Revision: https://phabricator.services.mozilla.com/D152582
2022-07-22 23:08:36 +00:00
az 805f4822ab Bug 1766308 - Add gfxVars::CodecSupportInfo to store user-readable codec support string r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147386
2022-07-22 23:08:08 +00:00
Bogdan Szekely ae3891e91e Backed out changeset d2c2f810bf14 (bug 1780389) for causing Bug 1780679 a=backout 2022-07-22 11:30:25 +03:00
Emilio Cobos Álvarez 9e0cea5ac8 Bug 1780372 - Make test_sizemode_events pass on Linux. r=stransky
Only update mSizeMode when we get the window state event. Meanwhile,
keep reporting the old / real sizemode.

Differential Revision: https://phabricator.services.mozilla.com/D152260
2022-07-21 23:04:39 +00:00
Daniel Q 4b82c0121a Bug 1772087 - Removed obsolete "FILE_BUFFER_SIZE" from nsFilePicker.cpp r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D150922
2022-07-21 17:28:42 +00:00
sotaro 1192eae300 Bug 1780334 - Add EVENT_SYSTEM_CAPTUREEND event watching in WindowOcclusionCalculator r=jrmuizel,gfx-reviewers
From Bug 1774869, current events watching by WindowOcclusionCalculator is not enough. EVENT_SYSTEM_CAPTUREEND event is added like chromium.

Differential Revision: https://phabricator.services.mozilla.com/D152250
2022-07-21 15:09:06 +00:00
Marian-Vasile Laza 953585bc43 Backed out changeset 7962626205ce (bug 1780372) for causing bc failures on browser_ext_tabs_discarded.js. CLOSED TREE 2022-07-21 15:57:31 +03:00
Emilio Cobos Álvarez 3e93e9c521 Bug 1780372 - Make test_sizemode_events pass on Linux. r=stransky
Only update mSizeMode when we get the window state event. Meanwhile,
keep reporting the old / real sizemode.

Differential Revision: https://phabricator.services.mozilla.com/D152260
2022-07-21 09:30:55 +00:00
stransky 1ea3f7a202 Bug 1780389 [Wayland] Call moz_container_wayland_add_initial_draw_callback() on locked container, always lock MozContainer for access r=rmader
With this patch moz_container_wayland_surface_lock() always locks MozContainer and needs to be paired with moz_container_wayland_surface_unlock() even if it fails and returns nullptr.
Split moz_container_wayland_add_initial_draw_callback() to two new functions:

- moz_container_wayland_add_initial_draw_callback_locked() is called on locked container and only adds draw callback.
  It asserts when MozContainer is already to draw as we don't expect it.

- moz_container_wayland_add_or_fire_initial_draw_callback() is called on unlocked container as it has it's own lock.
  It behaves as original moz_container_wayland_add_initial_draw_callback(), i.e. stores draw callback when MosContainer is not visible
  and fires draw callback when we're ready to draw.

Differential Revision: https://phabricator.services.mozilla.com/D152276
2022-07-21 07:54:47 +00:00
Emilio Cobos Álvarez 92c9ff22dc Bug 1780385 - Remove canvas hit region api. r=jrmuizel
Add a pref for MouseEvent.region since that wasn't un-exposed. No other
browser supports it so we can probably safely remove it, but just in
case.

Differential Revision: https://phabricator.services.mozilla.com/D152274
2022-07-20 16:52:47 +00:00
Emilio Cobos Álvarez f2dbdbfde7 Bug 1776592 - Make auto outline draw two differently-colored strokes instead of one. r=mstange
Behind a pref, just in case.

Differential Revision: https://phabricator.services.mozilla.com/D150466
2022-07-20 11:43:35 +00:00
Emilio Cobos Álvarez 6716667434 Bug 1776498 - Use popup class with all popups. r=Jamie,handyman
Manage their shadow style per-window instead. It is a bit unfortunate, but
alas, seems to work, and we had existing code for various workarounds, so it's
not too gross.

The menulist special-case isn't needed anymore, menulists always have
eTransparencyTransparent nowadays on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D151994
2022-07-20 09:45:04 +00:00
sotaro 1af3966f37 Bug 1780138 - Let zero copy hardware decoded video to release on all GPUs on Windows r=jrmuizel,gfx-reviewers
A bug is not reported related to "zero copy hardware decoded video" on Windows. Zero video frame copy needs "reuse decoder device ". And it is already enabled on Nightly / Early Beta by Bug 1773714.

RadeonBlockNoVideoCopy is renamed to RadeonBlockZeroVideoCopy

Differential Revision: https://phabricator.services.mozilla.com/D152139
2022-07-20 03:53:30 +00:00
Cristian Tuns 296431b106 Backed out 8 changesets (bug 1754239, bug 1766307, bug 1766308, bug 1766310) for causing build bustages on Logging.h CLOSED TREE
Backed out changeset 50918938a839 (bug 1766307)
Backed out changeset 19800bb8974e (bug 1766307)
Backed out changeset 40ec82794497 (bug 1766310)
Backed out changeset 4f860e20098c (bug 1754239)
Backed out changeset f54eac410bfd (bug 1754239)
Backed out changeset c8cc5e0c89dd (bug 1766307)
Backed out changeset d7aab4098f12 (bug 1766308)
Backed out changeset a7ffa6f44fe8 (bug 1766307)
2022-07-19 21:20:07 -04:00
az 86d8351f49 Bug 1766308 - Add gfxVars::CodecSupportInfo to store user-readable codec support string r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147386
2022-07-19 23:27:39 +00:00
criss b51dc963d5 Backed out changeset 99d1caaa88e2 (bug 1776592) for causing reftest failures on outline-auto-002.html. CLOSED TREE 2022-07-20 02:08:55 +03:00
Emilio Cobos Álvarez 63f146831e Bug 1776592 - Make auto outline draw two differently-colored strokes instead of one. r=mstange
Behind a pref, just in case.

Differential Revision: https://phabricator.services.mozilla.com/D150466
2022-07-19 21:53:45 +00:00
Robert Mader 9583d02e45 Bug 1779425 - Check for GbmDevice before using it, r=stransky,jgilbert
In some non-standard configurations we unexpectedly end up in this paths
without a GBM device - one example being the GPU process. Fail cleanly
instead of crashing in those cases, triggering fallback paths.

Context: in the past DMABuf usage was tightly coupled to GBM. Since the
introduction of the surfaceless and device EGL platforms that is not
longer the case, thus we can't make checks like `IsDMABufWebGLEnabled()`
depend on the presence of a GBM device.

Optimally all affected cases get fixed eventually. Until then and also
for future cases it makes sense to fail softly.

Differential Revision: https://phabricator.services.mozilla.com/D152173
2022-07-19 21:52:04 +00:00
Emilio Cobos Álvarez 2fa382001b Bug 1780212 - Use gtk_window_present too, to deiconify windows. r=stransky
This does work on Mutter, while gtk_window_deiconify doesn't seem to,
see:

https://stackoverflow.com/questions/24061029/how-to-deiconify-a-window-after-the-click-of-minimize-button-in-gtk

for example.

Depends on D152177

Differential Revision: https://phabricator.services.mozilla.com/D152178
2022-07-19 21:31:57 +00:00
Emilio Cobos Álvarez cb92d1eb7a Bug 1780247 - Fix a typo in the windows non-native menu pref. r=mstange,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D152189
2022-07-19 20:36:46 +00:00
Hiroyuki Ikezoe 4907d4f03c Bug 1742797 - Add a new IPC call to clear animation resources on WebRender, r=sotaro.
Differential Revision: https://phabricator.services.mozilla.com/D151481
2022-07-19 19:56:21 +00:00
Emilio Cobos Álvarez 0170e759f8 Bug 1779559 - Do this in toolkit instead. r=Gijs
This simplifies a bit the tabbrowser/tab switcher code, and makes it
work in all windows.

The WPT failures are due to bug 1780212.

Differential Revision: https://phabricator.services.mozilla.com/D151822
2022-07-19 19:25:48 +00:00
Emilio Cobos Álvarez 1f6f403400 Bug 1779559 - Make tabbrowser manage chrome BC activeness. r=Gijs
Just like it manages content, so that we stop chrome animations and such
in hidden or fully-occluded windows too. This already happened on macOS
for minimized windows via PauseCompositor, but this should be better and
more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D151818
2022-07-19 19:25:47 +00:00
Markus Stange 959b804216 Bug 1772463 - Move mVsyncSkipCounter into mState. r=bas
VsyncDispatcher::NotifyVsync can be called from two different threads
at the same time, if it just swapped out its vsync source and the old
vsync source is still notifying it. So we need to protect mVsyncSkipCounter
behind a lock.

Differential Revision: https://phabricator.services.mozilla.com/D148958
2022-07-19 18:51:46 +00:00
Cristian Tuns 02571b9d37 Backed out 5 changesets (bug 1779559) for causing wpt failures on unload-bubbles.html CLOSED TREE
Backed out changeset fbb29df4aa9e (bug 1779559)
Backed out changeset eab896a61170 (bug 1779559)
Backed out changeset 645bdd59bb99 (bug 1779559)
Backed out changeset 23fe4f24d483 (bug 1779559)
Backed out changeset a68a015349ed (bug 1779559)
2022-07-19 13:27:32 -04:00
Emilio Cobos Álvarez e08e5475c4 Bug 1779559 - Do this in toolkit instead. r=Gijs
This simplifies a bit the tabbrowser/tab switcher code, and makes it
work in all windows.

Differential Revision: https://phabricator.services.mozilla.com/D151822
2022-07-19 09:43:06 +00:00
Emilio Cobos Álvarez 4779c3a96c Bug 1779559 - Make tabbrowser manage chrome BC activeness. r=Gijs
Just like it manages content, so that we stop chrome animations and such
in hidden or fully-occluded windows too. This already happened on macOS
for minimized windows via PauseCompositor, but this should be better and
more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D151818
2022-07-19 09:43:06 +00:00
Butkovits Atila 398eded3f1 Backed out 4 changesets (bug 1742797, bug 1748808) for causing crashes at mozilla::layers::APZCTreeManagerParent::RecvUpdateZoomConstraints.
Backed out changeset 23f2a369a5a7 (bug 1748808)
Backed out changeset 5b0edd03f698 (bug 1742797)
Backed out changeset 8ed69c2c1d49 (bug 1742797)
Backed out changeset 18e11e7ea9d0 (bug 1742797)
2022-07-19 08:12:04 +03:00