Commit Graph

29913 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
d825fb6d4c Bug 1757647 - Implement Windows 11 overlay scrollbars. r=cmartin
Put it behind a pref for nightly and early beta for now.

Differential Revision: https://phabricator.services.mozilla.com/D139987
2022-03-02 12:02:00 +00:00
Emilio Cobos Álvarez
4f96521a7c Bug 1757647 - Simplify WindowsUIUtils tablet mode stuff. r=saschanaz
No need for it to use so much XPCOM.

Differential Revision: https://phabricator.services.mozilla.com/D139986
2022-03-02 12:02:00 +00:00
sotaro
70446fbf18 Bug 1757282 - Fix already_AddRefed handling in SerializedTaskDispatcher r=gfx-reviewers,lsalzman
When already_AddRefed is destroyed, mRawPtr of already_AddRefed needs to be cleared. But when SerializedTaskDispatcher was already destroyed, mRawPtr of already_AddRefed<nsIRunnable> was not cleared.

Differential Revision: https://phabricator.services.mozilla.com/D140012
2022-03-02 11:20:38 +00:00
Makoto Kato
3493d2727e Bug 1753574 - hal::LockOrientation can return error status. r=smaug,geckoview-reviewers,agi,calu
From https://w3c.github.io/screen-orientation/#apply-an-orientation-lock

> 7.2. Apply an orientation lock
>
> The steps to apply an orientation lock to a Document using orientation are as
> follows:
>
>  1. If the user agent does not support locking the screen orientation, return
>     a promise rejected with a "NotSupportedError" DOMException and abort
>     these steps.

So if orientation controller delegate isn't set, we should throw
`NotSupportedError`.  But, actually, we throws `AbortError`, so this isn't
correct.

To return any DOM error from platform implementation of
`screen.orientation.lock`, I would like to change return value to
`GenericPromise`'s.

Differential Revision: https://phabricator.services.mozilla.com/D137970
2022-03-02 03:48:14 +00:00
Florian Quèze
9b6453183c Bug 1756642 - Avoid marking the main thread as awake whenever the Linux event loop wakes up due to the profiler capturing a sample, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D139401
2022-03-01 23:07:47 +00:00
Markus Stange
3ce08a4e07 Bug 1676760 - Rename Add/RemoveChildRefreshTimer. r=smaug
It is used by far more than just content process refresh driver timers.

Differential Revision: https://phabricator.services.mozilla.com/D139769
2022-03-01 22:48:19 +00:00
Markus Stange
d85ed119fd Bug 1676760 - Remove unused RefreshTimerVsyncDispatcher::SetParentRefreshTimer. r=smaug
Even in the parent process, VsyncRefreshDriverTimer uses AddChildRefreshTimer.

Differential Revision: https://phabricator.services.mozilla.com/D139768
2022-03-01 22:48:19 +00:00
Cristian Tuns
956c714ac3 Backed out changeset 0946d4ce352f (bug 1756700) for causing geckoview crashes. CLOSED TREE 2022-03-01 18:11:55 -05:00
Jamie Nicol
b3781363fb Bug 1756700 - Delay compositor creation on Android to allow time for GPU process to launch. r=gfx-reviewers,geckoview-reviewers,aosmond,calu
We noticed a cold_view_nav_start regression on Fenix from enabling the
GPU process, and profiles showed time spent synchronously waiting for
the GPU process to launch. This occured because the compositor was
being created in nsWindow::Create, and as it requires the GPU process
to be running it had to block until launch completed. The process is
launched when the gfxPlatform is first initialized, but that was only
occuring immediately prior to creating the compositor, which did not
give it enough time to complete asynchronously.

This patch makes it so that we initialize the gfxPlatform slightly
earlier, and importantly delay creating the compositor until it is
actually required. This gives the process enough time to launch
asynchronously meaning we do not have to block.

We started deliberately creating the compositor early on Android
because of bug 1453501, to avoid a race condition where the compositor
didn't exist when RemoteLayerTreeOwner::Initialize was called, causing
us to use a basic layer manager. However, since bug 1741156 landed we
now create the compositor on-demand, meaning this is no longer a
possibility.

Delaying compositor creation can, however, uncover another race
condition. If the UICompositorControllerChild is opened on the UI
thread before the main thread is able to set its pointer to the
widget, then the java GeckoSession will never be notified that the
compositor has been opened, and composition will never be
resumed. This patch fixes this issue by setting the
UiCompositorControllerChild's widget pointer in its constructor rather
than immediately afterwards.

Differential Revision: https://phabricator.services.mozilla.com/D139842
2022-03-01 22:09:44 +00:00
Ben Hearsum
f46bdbcad0 Bug 1751010: Update JumpListBuilder tests for interface changes. r=mhowell
I couldn't see any value in running these for private and non-private mode, since all of those differences are up in Javascript land.

Differential Revision: https://phabricator.services.mozilla.com/D139608
2022-03-01 14:16:49 +00:00
Ben Hearsum
1372e7f612 Bug 1751010: Use a unique icon for the Private Browsing taskbar pin r=mhowell
This is subject to the same issue as an earlier patch in this series -- the icon will be wrong briefly at first launch, before the code in `BrowserContentHandler.jsm` replaces the default icon with the correct one.

Differential Revision: https://phabricator.services.mozilla.com/D138601
2022-03-01 14:16:48 +00:00
Ben Hearsum
98c5bfc44e Bug 1751010: Create a separate jumplist for the Private Browsing taskbar icon. r=mhowell
Because the Private Browsing Jump List only contains Tasks it is static we can get away with only building it once.

Differential Revision: https://phabricator.services.mozilla.com/D138600
2022-03-01 14:16:48 +00:00
Ben Hearsum
814c293c0a Bug 1751010: Set AUMID correctly for private browsing windows r=mossop,mhowell
This is done differently depending on whether the Private Browsing window is the initial one, or if it's a new window from a running application. In the former case, we're still not setting it up early enough -- the window will initially show up in one icon, and then switch to the other one after we've adjusted the AUMID.

Regardless, the fact that we're doing it for every new window appears to mean that other places that require it (such as GeckoChildProcessHost.cpp) will Do The Right Thing (because they'll pull the cached version that `GetAppUserModelID` finds).

This behind a pref for now both because of the issue noted above, as well as the fact that we're waiting on finalized branding for this.

Differential Revision: https://phabricator.services.mozilla.com/D138194
2022-03-01 14:16:47 +00:00
Ben Hearsum
241d5ff6e8 Bug 1751010: Make it possible to generate an AUMID without setting it, or retrieving the current one. r=mhowell
The overarching change here is that it's now possible to get an AUMID without first trying to fetch the current one that's set -- this allows us to obtain the Private Browsing one from a non-Private window, which we will need in a later patch to supporting adding a Private Browsing taskbar pin during onboarding.

Differential Revision: https://phabricator.services.mozilla.com/D138193
2022-03-01 14:16:47 +00:00
Emilio Cobos Álvarez
f500adb911 Bug 1757106 - Don't update popup hierarchy if position and size didn't change in nsWindow::NativeMoveResizeWaylandPopup. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D139624
2022-03-01 01:11:20 +00:00
Emilio Cobos Álvarez
2a2ea4541b Bug 1757106 - Cleanup size/pos handling in NativeMoveResize. r=stransky
DevicePixelsToGdkRectRoundOut should have the same behavior here and is
simpler / less weird than having a positionless rect variable to
represent a size.

Depends on D139623

Differential Revision: https://phabricator.services.mozilla.com/D139672
2022-03-01 01:06:37 +00:00
Emilio Cobos Álvarez
4b49d8b1fa Bug 1757106 - Clean up menu popup rect handling. r=stransky
Store preferred rect in dev pixels, which simplifies a bit other calculations,
and ensures that the nsMenuPopupFrame code accounts for zoom etc.

Use existing conversion methods for GDK <-> Device <-> CSS conversions.

Differential Revision: https://phabricator.services.mozilla.com/D139623
2022-03-01 01:06:37 +00:00
Stephen A Pohl
39915ac8d3 Bug 1688998: Replace empty BeginPaint/EndPaint calls with GetUpdateRect/ValidateRect. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D139776
2022-02-28 21:39:09 +00:00
Nika Layzell
9e65eb911e Bug 1751948 - Part 1: Fix IPDL unified build issues, r=ipc-reviewers,mccr8
The changes in this patch stack will change how IPDL generated files are built,
such that these issues are now surfaced, especially during non-unified builds.

Differential Revision: https://phabricator.services.mozilla.com/D137165
2022-02-28 21:01:47 +00:00
Jonathan Watt
4984654fe7 Bug 1657854. Only allow nsPrinterList objects to be created in the main process on all platforms. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D139846
2022-02-28 15:09:35 +00:00
Chris Martin
63ca6a38f3 Bug 1756621 - Remove nsWindowBase r=handyman
It looks like it was added to abstract commonalities between Win32 and
WinRT. But we dropped support for WinRT a long time ago, and there hasn't been
any work on this area of code in 8 years. In the meantime, it just adds an
extra layer of indirection that doesn't need to exist.

Differential Revision: https://phabricator.services.mozilla.com/D139771
2022-02-28 15:08:03 +00:00
Emilio Cobos Álvarez
74c4e590a6 Bug 1757209 - Don't hardcode snap instance name. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D139761
2022-02-28 15:07:16 +00:00
Emilio Cobos Álvarez
8724285359 Bug 1757402 - Add basic native context menu support on GTK. r=stransky
I had this written somewhere in a branch, but given bug 1419151, I
cleaned it up a bit and turned it into an actual patch that works.

Behind a pref for now, because at the very least it needs:

 * Support for some testing-only functions.
 * Support for custom icons (for web extensions and so on).

The key point is that this adds the relevant code to map a XUL menu to a
GMenuModel, which we could then export via
`g_dbus_connection_export_menu_model()`, which seems like a much simpler
approach to support stuff like bug 1419151.

See the MenuModel class in NativeMenuGtk as for how is this done.

Differential Revision: https://phabricator.services.mozilla.com/D139845
2022-02-28 14:53:24 +00:00
Jan Horak
c1822b61d2 Bug 1712555 Remove obsolete print portal; r=emilio
We no longer need to use the print portal, the gtk is doing that for us
for the system print dialog and the native print dialog uses GtkPrintJob
which sends jobs to the cups print backend.

Differential Revision: https://phabricator.services.mozilla.com/D139594
2022-02-28 10:47:50 +00:00
criss
482513fd24 Backed out 5 changesets (bug 1749352) for causing GTest failures. CLOSED TREE
Backed out changeset 977e030270db (bug 1749352)
Backed out changeset 8f8afd043413 (bug 1749352)
Backed out changeset 550c693e5dea (bug 1749352)
Backed out changeset c50f4c8331d3 (bug 1749352)
Backed out changeset ba1013d34a9e (bug 1749352)
2022-02-28 08:47:39 +02:00
Jonathan Watt
300fb860be Bug 1756447 - Remove the code supporting saving print setting from the content process. r=bobowen,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D139292
2022-02-27 23:45:56 +00:00
Markus Stange
a5b1d43de7 Bug 1749352 - Remove unused mFollowedByMomentum. r=botond
Depends on D135922

Differential Revision: https://phabricator.services.mozilla.com/D135923
2022-02-27 23:19:49 +00:00
Butkovits Atila
107318ad27 Backed out 5 changesets (bug 1751010) for causing failures at browser_startup_mainthreadio.js. CLOSED TREE
Backed out changeset af347bb985d4 (bug 1751010)
Backed out changeset 9944e42017ff (bug 1751010)
Backed out changeset 282a5cd52cd0 (bug 1751010)
Backed out changeset 2f54afb16002 (bug 1751010)
Backed out changeset 6ad85a8edf15 (bug 1751010)
2022-02-27 03:40:08 +02:00
Olli Pettay
1edf4c885e Bug 1754562, make parent process' idle detection be aware of active RefreshDrivers in the other processes, r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138504
2022-02-26 22:37:03 +00:00
Chris Martin
7e87f3a1d2 Bug 1756621 - Allow nsBaseWidget::mBorderStyle to be set via constructor r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D139741
2022-02-25 20:08:29 +00:00
Ben Hearsum
22a33af4db Bug 1751010: Update JumpListBuilder tests for interface changes. r=mhowell
I couldn't see any value in running these for private and non-private mode, since all of those differences are up in Javascript land.

Differential Revision: https://phabricator.services.mozilla.com/D139608
2022-02-25 18:33:46 +00:00
Ben Hearsum
fec02f30c7 Bug 1751010: Use a unique icon for the Private Browsing taskbar pin r=mhowell
This is subject to the same issue as an earlier patch in this series -- the icon will be wrong briefly at first launch, before the code in `BrowserContentHandler.jsm` replaces the default icon with the correct one.

Differential Revision: https://phabricator.services.mozilla.com/D138601
2022-02-25 18:33:46 +00:00
Ben Hearsum
6649a573aa Bug 1751010: Create a separate jumplist for the Private Browsing taskbar icon. r=mhowell
Because the Private Browsing Jump List only contains Tasks it is static we can get away with only building it once.

Differential Revision: https://phabricator.services.mozilla.com/D138600
2022-02-25 18:33:45 +00:00
Ben Hearsum
119452bd08 Bug 1751010: Set AUMID correctly for private browsing windows r=mossop,mhowell
This is done differently depending on whether the Private Browsing window is the initial one, or if it's a new window from a running application. In the former case, we're still not setting it up early enough -- the window will initially show up in one icon, and then switch to the other one after we've adjusted the AUMID.

Regardless, the fact that we're doing it for every new window appears to mean that other places that require it (such as GeckoChildProcessHost.cpp) will Do The Right Thing (because they'll pull the cached version that `GetAppUserModelID` finds).

This behind a pref for now both because of the issue noted above, as well as the fact that we're waiting on finalized branding for this.

Differential Revision: https://phabricator.services.mozilla.com/D138194
2022-02-25 18:33:45 +00:00
Ben Hearsum
811e939bfa Bug 1751010: Make it possible to generate an AUMID without setting it, or retrieving the current one. r=mhowell
The overarching change here is that it's now possible to get an AUMID without first trying to fetch the current one that's set -- this allows us to obtain the Private Browsing one from a non-Private window, which we will need in a later patch to supporting adding a Private Browsing taskbar pin during onboarding.

Differential Revision: https://phabricator.services.mozilla.com/D138193
2022-02-25 18:33:45 +00:00
Chris Martin
e292d5fbcc Bug 1756621 - Cleanup Win32 nsWindow.h
Differential Revision: https://phabricator.services.mozilla.com/D139729
2022-02-25 17:03:38 +00:00
criss
d17f55ed9f Backed out changeset 39bd7bdd12be (bug 1754562) for causing multiple failures. CLOSED TREE 2022-02-25 13:40:50 +02:00
Olli Pettay
89b093258f Bug 1754562, make parent process' idle detection be aware of active RefreshDrivers in the other processes, r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138504
2022-02-25 10:13:16 +00:00
Chris Martin
f3740292a3 Bug 1750106 - Use default and list initialization for Win32 nsWindow r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D139509
2022-02-24 22:24:24 +00:00
Cristian Tuns
28d211eed0 Backed out changeset 0a3a3747998b (bug 1750106) for causing multiple failures nsWindow.cpp CLOSED TREE 2022-02-24 16:12:58 -05:00
Chris Martin
747bd9c203 Bug 1750106 - Use default and list initialization for Win32 nsWindow r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D139509
2022-02-24 20:34:36 +00:00
stransky
c063686937 Bug 1756789 Add proof of lock to MozContainerWayland internals r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D139578
2022-02-24 12:15:08 +00:00
stransky
6a6c9668da Bug 1756789 Protect MozContainerWayland internals by container_lock r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D139488
2022-02-24 12:15:08 +00:00
criss
c5f170979a Backed out changeset 3babaf36e54a (bug 1756789) for causing build bustages on MozContainerWayland.cpp. CLOSED TREE 2022-02-24 12:25:56 +02:00
stransky
c971f32895 Bug 1756789 Protect MozContainerWayland internals by container_lock r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D139488
2022-02-24 10:08:28 +00:00
Marian-Vasile Laza
acfb3e797d Merge autoland to mozilla-central. a=merge 2022-02-23 19:49:43 -08:00
Marian-Vasile Laza
48b724c70a Backed out 4 changesets (bug 1751010) for causing xpcshell failures on test_taskbar_jumplistitems.js. CLOSED TREE
Backed out changeset 1ff3b5528d53 (bug 1751010)
Backed out changeset a21f1d8b6d8b (bug 1751010)
Backed out changeset 11df8f060a35 (bug 1751010)
Backed out changeset b94765877d57 (bug 1751010)
2022-02-23 14:56:22 -08:00
Emilio Cobos Álvarez
640cf9c94f Bug 1648358 - Implement nsIAlertDoNotDisturb for windows native alerts. r=saschanaz
This happens to be D76407, but I missed it before writing this.

Differential Revision: https://phabricator.services.mozilla.com/D139361
2022-02-23 20:07:39 +00:00
Emilio Cobos Álvarez
65d5efb8e8 Bug 1648358 - Modernize a bit ToastNotification. r=saschanaz
Nobody is using the weak reference stuff so remove it.

Differential Revision: https://phabricator.services.mozilla.com/D139360
2022-02-23 20:07:38 +00:00
Narcis Beleuzu
79e1db1339 Backed out 5 changesets (bug 1745492) for reftest failures on image-10bits-rendering-720-video.html CLOSED TREE
Backed out changeset 4cbbe77eaede (bug 1745492)
Backed out changeset 8eead27d1cc7 (bug 1745492)
Backed out changeset 6fc6bbab5b53 (bug 1745492)
Backed out changeset 823e45ca5fd3 (bug 1745492)
Backed out changeset f378944b0366 (bug 1745492)
2022-02-23 21:15:58 +02:00