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

29481 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 8ce726b6d4 Bug 1743600 - Clean up some cocoa system color code. r=mac-reviewers,harry
No behavior change, but it's a bit less code this way.

Differential Revision: https://phabricator.services.mozilla.com/D132477
2021-11-30 15:08:37 +00:00
Emilio Cobos Álvarez c9d4405306 Bug 1743310 - Remove paint flashing. r=gfx-reviewers,lsalzman
It's only meaningfully read in two places:

 * WebRender fallback code.
 * Some widget DEBUG-only code, which on Linux is ifdef'd and on Windows does
   some rather sketchy things like sleeping for 30ms

So I think it should be ok to remove, since WR fallback has its own flashing
pref as well, IIUC.

Differential Revision: https://phabricator.services.mozilla.com/D132313
2021-11-30 11:46:08 +00:00
stransky cd753d23dc Bug 1726186 [Linux] Don't advertise full range color for DMABufSurfaceYUV, r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D132463
2021-11-30 10:12:46 +00:00
stransky 4839650179 Bug 1743392 [Linux] Use MakeScopeExit to release clipboard targets, r=emilio"
Differential Revision: https://phabricator.services.mozilla.com/D132364
2021-11-30 07:52:59 +00:00
stransky cbc27848e4 Bug 1740159 [Linux/X11] Don't do strict clipboard content checking on X11, r=emilio
Allow to paste clipboard data even when Gtk does not advertise them as it was before Bug 1611407 (Firefox 93).

Differential Revision: https://phabricator.services.mozilla.com/D132339
2021-11-30 07:29:05 +00:00
Emilio Cobos Álvarez f869c28593 Bug 1740518 - Remove allow-gtk-dark-theme special-case in color-scheme computation. r=mstange
See the comments as for why. If as a user you want to get this behavior
you could put something like:

  :root { color-scheme: light dark }

in a user stylesheet, but that could cause the same contrast issues the
allow-gtk-dark-theme pref has now.

Differential Revision: https://phabricator.services.mozilla.com/D132361
2021-11-29 21:49:42 +00:00
Jamie Nicol 0155e30e96 Bug 1741156 - Reinitialize compositor and request repaint after GPU process restart. r=aosmond,geckoview-reviewers,agi
This patch ensures that, following a GPU process crash, we
re-initialize the compositor and resume painting on Android.

nsWindow::GetWindowRenderer() is made to always reinitialize the
window renderer if there is none, like on other platforms. We
therefore no longer need to track whether webrender is being disabled,
as this is no longer a special case.

Previously we started the compositor as initially paused in
nsBaseWidget::CreateCompositorSession only if the widget did not yet
have a surface. Now we must unconditionally (re)start it as initially
paused, as even though the widget in the parent process may have a
surface, we will not have been able to send it to the GPU process
yet. We will send the surface to the compositor once control flow
returns to nsWindow::CreateLayerManager, where we will also now resume
the compositor if required.

Finally, we must ensure that we manually trigger a paint, both in the
parent and content processes. On other platforms this occurs
automatically following a GPU process loss through various refresh
driver events. On Android, however, nothing causes the refresh driver
to paint by itself, and we cannot receive input without first
initializing our APZ controllers, which does not happen until the
compositor receives a display list. We therefore must manually
schedule a paint. We do so from nsWindow::NotifyCompositorSessionLost
for the parent process, and BrowserChild::ReinitRendering for content
processes.

Differential Revision: https://phabricator.services.mozilla.com/D131232
2021-11-29 20:52:31 +00:00
Jamie Nicol a9dd0d2943 Bug 1741156 - Initial GPU process implementation on Android. r=aosmond,agi
Declare a GPU process and corresponding Service in the
AndroidManifest. This is of a new class GeckoServiceGpuProcess which
inherits from GeckoServiceChildProcess, and provides a binder
interface ICompositorSurfaceManager which allows the parent process to
set the compositor Surface for a given widget ID, and the compositor
in the GPU process to look up the Surface for a widget ID. The
ICompositorSurfaceManager interface is exposed to the parent process
through a new method getCompositorSurfaceManager() in the
IChildProcess interface.

Add a new connection type for GPU processes to GeckoProcessManager,
along with a function to look up the GPU process connection and fetch
the ICompositorSurfaceManager binder. When the GPU process is launched
we store the returned binder in the GPUProcessHost, and when each
widget's compositor is created we store a reference to the binder in
the UiCompositorControllerChild.

Each nsWindow is given a unique ID, and whenever the Surface changes
due to an Android resume event, it sends the new surface for that ID
to the GPU process (if enabled) by calling
ICompositorSurfaceManager.onSurfaceChanged().

Stop inheriting AndroidCompositorWidget from InProcessCompositorWidget
and instead inherit from CompositorWidget directly. This class holds a
reference to the Surface that will be rendered in to. The
CompositorBridgeParent notifies the CompositorWidget whenever it has
been resumed, allowing it to fetch the new Surface. For the
cross-process CompositorWidgetParent implementation it fetches that
Surface from the CompositorSurfaceManagerService, whereas the
InProcessAndroidCompositorWidget can read it directly from the real
widget.

AndroidCompositorWidget::GetClientSize() can now calculate its size
from the Surface, rather than racily reading the value from the
nsWindow. This means RenderCompositorEGL and RenderCompositorOGLSWGL
can now use GetClientSize() again rather than querying their own size
from the Surface.

With this patch, setting layers.gpu-process.enabled to true will cause
us to launch a GPU process and render from it. We do not yet
gracefully recover from a GPU process crash, nor can we render
anything using SurfaceTextures (eg video or webgl). Those will come in
future patches.

Differential Revision: https://phabricator.services.mozilla.com/D131231
2021-11-29 20:52:31 +00:00
Lee Salzman af93a607a6 Bug 1741956 - Avoid OP_OVER on Cairo Xlib window surface. r=jrmuizel
When we use OP_OVER for the final blit in WindowSurfaceX11Image::Commit,
this causes Cairo to hit a compositing fallback that uses XGetImage on
the window to get the pixel data, blends to it, then XPutImage's the
result back. We want to avoid this both because XGetImage may cause
errors and it is slow to read back from the window server.

If we use CopySurface/OP_SOURCE instead we avoid the readback via
XGetImage and so bypass both problems.

Differential Revision: https://phabricator.services.mozilla.com/D132319
2021-11-29 16:34:23 +00:00
Jonathan Watt 9cb86cebb7 Bug 1740421. Fix print-to-PDF on Mac OS X 10.12 (e.g. printing with no printers installed). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D132372
2021-11-29 14:19:19 +00:00
sotaro 2d813f179a Bug 1743075 - Update log of ProcessEventHookCallback() r=gfx-reviewers,aosmond
Add aEvent value to log.

Differential Revision: https://phabricator.services.mozilla.com/D132214
2021-11-29 00:12:20 +00:00
sotaro 46903a643e Bug 1743057 - Notify windows visibility change to WindowOcclusionTracker when window is activated r=gfx-reviewers,jrmuizel
When Firefox was activated by Alt+Tabbing, there was a case that event hook of WindowOcclusionCalculator could not detect an event of window activated. Then it is necessary to trigger window occlusion calculation from nsWindows.

Differential Revision: https://phabricator.services.mozilla.com/D132206
2021-11-27 02:24:22 +00:00
stransky 878384d406 Bug 1728952 [Wayland] Reconfigure popup window when popup type is changed, r=emilio
Popup permanent state can be changed during popup lifetime and we need to reconfigure it in such case.

Differential Revision: https://phabricator.services.mozilla.com/D132026
2021-11-26 12:43:07 +00:00
Emilio Cobos Álvarez 4354146592 Bug 1432090 - Honor GTK button layout. r=stransky,desktop-theme-reviewers,dao
This is based off work by smurfd. But this patch doesn't support buttons
both at the left and right, which simplifies a lot the implementation.

Also, clean-up the existing env variables while at it.

Co-authored-by: Nicklas Boman <smurfd@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D132073
2021-11-26 11:37:52 +00:00
stransky fe7fb168be Bug 1743095 [Linux] Check mGdkWindow state at is_mouse_in_window() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132237
2021-11-26 11:34:39 +00:00
Jamie Nicol effdec8549 Bug 1742987 - Block webrender on Android on PowerVR Rogue G6110 GPUs. r=gfx-reviewers,aosmond
Due to bug 1742986 and bug 1717863 we are blocking webrender on
Android devices PowerVR Rogue G6110 GPUs. These devices will use
software webrender instead.

Differential Revision: https://phabricator.services.mozilla.com/D132170
2021-11-25 20:47:17 +00:00
Emilio Cobos Álvarez 2dca36cb25 Bug 502258 - Add a Show Password button to <input type=password> controls. r=Gijs
It's controlled by the pref:
layout.forms.input-type-show-password-button.enabled

Differential Revision: https://phabricator.services.mozilla.com/D130407
2021-11-25 20:12:05 +00:00
Emilio Cobos Alvarez 8416a9e79d Bug 1742796 - Use a more transparent color for dark mode / Android selection. r=geckoview-reviewers,owlish
This prevents contrast issues with colors that are very similar to the
selection background.

See before / after screenshots. Selection on higher-contrasting
foregrounds still looks good.

This is the alpha channel that e.g., Bugzilla uses on dark mode
(so I didn't just mint it).

Differential Revision: https://phabricator.services.mozilla.com/D132022
2021-11-25 20:09:25 +00:00
Robert Mader 999eacba80 Bug 1742862 - Bump required nvidia driver version for EGL to 470.82, r=gfx-reviewers,nical
`470.82` is the first version that supports `EGL_NV_robustness_video_memory_purge`
which is required so we don't run into bug 1731172. The first stable release of
the `495` series also supports that extension, previous beta versions don't need
to be considered.

Differential Revision: https://phabricator.services.mozilla.com/D132101
2021-11-25 12:25:11 +00:00
sotaro 5477d7dc1d Bug 1742440 - Add debug capability to check window visibility state by overlay r=gfx-reviewers,nical
It is helpful if window visibility state could be checked by debug overlay.
For now, it works only on Windows with compositor.

Differential Revision: https://phabricator.services.mozilla.com/D131807
2021-11-25 11:33:46 +00:00
Nick Alexander 44d7d86ca5 Bug 1740513 - Don't attempt macOS Handoff in headless mode. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D132090
2021-11-24 23:10:35 +00:00
Emilio Cobos Álvarez 8c9d1b38e8 Bug 1741900 - Ensure color-scheme is initialized in a couple callers which might not have initialized LookAndFeel yet. r=mhowell
The previous patch would be a better fix, but it causes some xpcshell
crashes on Linux which I haven't figured out yet (because initializing
LookAndFeel initializes gfxPlatform).

This should be less risky and still fix the bug.

Differential Revision: https://phabricator.services.mozilla.com/D132011
2021-11-24 16:50:38 +00:00
stransky 4689f22c21 Bug 1742789 [Linux] Remove redundant print of 'this' r=emilio
Depends on D132013

Differential Revision: https://phabricator.services.mozilla.com/D132014
2021-11-24 11:49:35 +00:00
stransky 8ce7d2a855 Bug 1742789 [Linux] Replace LOG_POPUP with LOG, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132013
2021-11-24 11:49:34 +00:00
ssummar b9d6fce436 Bug 1530209 - Removed context argument from various methods. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D129797
2021-11-24 11:25:41 +00:00
Ben Hearsum c178143375 Bug 1721488: Windows taskbar jumplists are not created when running as an app package r=mhowell
This patch simply avoids calling SetAppID and SetCurrentProcessExplicitAppUserModelID when we're running from a packaged app. For `SetCurrentProcessExplicitAppUserModelID`, I ended up skipping the calls to the functions that call it because I thought it was less surprising behaviour given the names (eg: I might be surprised if `SetTaskbarGroupId` silently didn't set the taskbar group id). It's easy enough to switch up if skipping the calls at a lower level makes more sense.

I couldn't find any automated tests around the Jump List functionality (and we don't have any tests running within MSIX packages yet anyways...), but it worked just fine in my manual test. I also tested the scenario where the AppxManifest.xml ID changes during an upgrade (which will probably happen when https://bugzilla.mozilla.org/show_bug.cgi?id=1736113 gets done). This causes Jump Lists to stop working at first restart, but they appear to rebuilt after the usual few minute wait.

Differential Revision: https://phabricator.services.mozilla.com/D131693
2021-11-23 16:21:01 +00:00
elfarto ff07766ece Bug 1742229 - Firefox doesn't use modifiers for YUV surfaces r=stransky
Firefox is not setting the modifiers for YUV surfaces causing the import of surfaces that require them to fail.

Differential Revision: https://phabricator.services.mozilla.com/D131772
2021-11-23 08:27:48 +00:00
Jed Davis 3ef6a5c028 Bug 1698778 - Allow using VA-API in the RDD process. r=alwu,stransky
The previous patches mean that VA-API shouldn't cause sandbox violations
in the RDD process, so there's no need to lock it out.

This patch does **not** change the prefs to enable it
(`media.rdd-ffmpeg.enabled` and `media.ffmpeg.vaapi.enabled`), but now
those prefs will be honored if they are flipped, to allow testing.

Differential Revision: https://phabricator.services.mozilla.com/D131681
2021-11-23 01:14:41 +00:00
lamoure6 3478e8ae47 Bug 1719938 - Removed remaining (non-negated) -moz-proton media queries. r=mhowell,mtigley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D125328
2021-11-22 22:10:33 +00:00
stransky f4b6c6413c Bug 1742376 [Linux] Provide better logging to D&D code r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131778
2021-11-22 12:07:31 +00:00
stransky ac364565b9 Bug 1727225 [Linux] Make mCompositorState atomic, r=emilio
- Make mCompositorState atomic to avoid thread race conditions.

- Remove !mIsDestroyed check from IsWaitingForCompositorResume() and keep only mCompositorState == COMPOSITOR_PAUSED_FLICKERING there.
  We already set mCompositorState = COMPOSITOR_PAUSED_MISSING_WINDOW on Destroy().

Differential Revision: https://phabricator.services.mozilla.com/D131593
2021-11-22 10:12:31 +00:00
sotaro 01cd151a04 Bug 1741775 - Remove LayersBackend::LAYERS_OPENGL r=gfx-reviewers,nical
LayersBackend::LAYERS_OPENGL is not used any more.

Code under widget/uikit is dead code.

Differential Revision: https://phabricator.services.mozilla.com/D131461
2021-11-20 22:52:14 +00:00
Jamie Nicol 8c1de22fbf Bug 1340301 - Ensure APZ functions are called from correct threads on Android with GPU process. r=botond
On Android the APZ controller thread is the android UI thread, rather
than the Gecko main thread as on other platforms. There some places
where the main thread requires to call IAPZCTreeManager functions that
must run on the controller thread. Currently we use the function
DispatchToControllerThread() prior to calling various IAPZCTreeManager
APIs to achieve this.

This works just fine for now, as there is no GPU process on
Android. However, once we do add a GPU process we will encounter
issues:

Firstly, there will now be a cross-process APZInputBridge rather than
using an in-process APZCTreeManager. The PAPZInputBridge protocol is
managed by PGPU, and therefore must run on the main thread in the
parent process. The input we require to send over the bridge, however,
originates from the UI thread.

To solve this we can convert PAPZInputBridge to a top-level protocol,
and bind it to the UI thread on Android. We can then send input
directly from the UI thread without issues.

Secondly, the PAPZCTreeManager protocol must also run from the main
thread in the parent process, as it is managed by
PCompositorBridge. Unlike PAPZInputBridge we cannot convert
PAPZCTreeManager in to a top level protocol, as it relies on the
ordering guarantees with PCompositorBridge.

We must therefore ensure that we only dispatch IAPZCTreeManager calls
to the controller thread when using an in-process
APZCTreeManager. Out-of-process calls, on the other hand, must be
dispatched to the main thread where we can send IPDL commands from. To
do this, we move the dispatch logic away from the callsites of
IAPZCTreeManager APIs, and in to the APZCTreeManager and
APZCTreeManagerChild implementations themselves.

Differential Revision: https://phabricator.services.mozilla.com/D131120
2021-11-20 09:49:14 +00:00
Andrew Osmond c7802543b2 Bug 1741997 - DMABufSurface::FenceDelete should not require GL context to close mSyncFd handle. r=stransky
We can create DMABufSurface objects via deserialization without ever
setting a GL context. We must ensure we close the file handle even if we
don't have one.

Differential Revision: https://phabricator.services.mozilla.com/D131561
2021-11-18 23:29:10 +00:00
stransky 32e12fd52f Bug 1741835 [Wayland] Add parent position shift to D&D target for popups only, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131502
2021-11-18 20:26:56 +00:00
Andrew Osmond 4dee1ea831 Bug 1741965 - Ensure we close fds during error paths in DMABufSurfaceRGBA::CreateTexture/CreateWlBuffer. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D131527
2021-11-18 20:17:45 +00:00
Nick Alexander bf47ece634 Bug 1733284: Part 1: Expose Windows packaged app utilities to code outside of XUL. r=mhowell
This re-arranges some deckchairs, allowing to have the launcher
process query the Windows packaged app environment.

Depends on D129882

Differential Revision: https://phabricator.services.mozilla.com/D130187
2021-11-18 14:37:36 +00:00
sotaro 79ce913ffa Bug 1741799 - Remove SupportsThreadSafeWeakPtr from WinWindowOcclusionTracker r=nical,gfx-reviewers
SupportsThreadSafeWeakPtr is not necessary for current WinWindowOcclusionTracker.

Differential Revision: https://phabricator.services.mozilla.com/D131469
2021-11-18 14:19:59 +00:00
sotaro f0775d8818 Bug 1741783 - Rename PuppetWidget::HasLayerManager() to HasWindowRenderer() r=gfx-reviewers,nical
PuppetWidget already renamed GetLayerManager() to GetWindowRenderer().

Differential Revision: https://phabricator.services.mozilla.com/D131465
2021-11-18 14:16:00 +00:00
stransky d1cc9bb7d1 Bug 1741837 [Linux] Check mShell instead of mContainer for cross application D&D, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131486
2021-11-18 13:42:10 +00:00
stransky 664251da5a Bug 1740897 [X11] Make parent container of D&D popup transparent to avoid flickering, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131252
2021-11-18 09:44:10 +00:00
sotaro 4f3833aa2f Bug 1741111 - Remove LayersBackend::LAYERS_BASIC r=gfx-reviewers,bradwerth
LayersBackend::LAYERS_BASIC is not used any more.

Differential Revision: https://phabricator.services.mozilla.com/D131104
2021-11-17 22:05:47 +00:00
Harry Twyford b8ff587b0d Bug 1741503 - Remove special handoff ID in MacUserActivityUpdater. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D131415
2021-11-17 20:49:10 +00:00
Makoto Kato 7f3e52cd43 Bug 1741312 - Set reversed selection from selection cache. r=geckoview-reviewers,agi
This is a regression of bug 1724811.

I should consider that selection order is reversed when fixing bug 1724811.

Differential Revision: https://phabricator.services.mozilla.com/D131196
2021-11-17 02:32:45 +00:00
Emilio Cobos Álvarez 6d41085b0e Bug 1741499 - Cleanup a bit HeadlessLookAndFeelGTK too. r=spohl
The colors that I didn't move to nsXPLookAndFeel are always set via
prefs.

Differential Revision: https://phabricator.services.mozilla.com/D131286
2021-11-17 01:24:20 +00:00
Emilio Cobos Álvarez 83d1e0047a Bug 1741499 - Remove HeadlessThemeGTK. r=spohl
We can just use the non-native theme, which is much more complete than
this.

Differential Revision: https://phabricator.services.mozilla.com/D131276
2021-11-17 01:24:02 +00:00
Emilio Cobos Álvarez d026785d01 Bug 1741495 - Follow-up: clang-format fixes.
MANUAL PUSH: trivial whitespace-only patch DONTBUILD
2021-11-17 02:18:50 +01:00
sotaro 103781c95e Bug 1741349 - Add logs to WindowOcclusionCalculator r=gfx-reviewers,jrmuizel
Logs for debugging help.

Differential Revision: https://phabricator.services.mozilla.com/D131209
2021-11-17 00:59:38 +00:00
Emilio Cobos Álvarez 446bae08de Bug 1741495 - Make ThemeDrawsFocusForWidget return the right thing when drawing non-native widgets on Linux and Windows. r=spohl
Noticed this while digging into bug 1741359.

Differential Revision: https://phabricator.services.mozilla.com/D131277
2021-11-17 00:55:26 +00:00
Stephen A Pohl 4fa5bfa1c3 Bug 1741367: Fix build issues on Solaris due to scrollbar refactor. r=emilio
Depends on D131265

Differential Revision: https://phabricator.services.mozilla.com/D131266
2021-11-16 23:06:17 +00:00