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

3148 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Robert Mader 6b78a5acb6 Bug 1739598 - Use accelerated deltas for Wayland pointer lock, r=stransky
Patch suggested by Jan Alexander Steffens <jan.steffens@gmail.com>

From the spec (https://w3c.github.io/pointerlock/):
> this specification defines the movement deltas to be taken from how
> the system mouse cursor moves, which incorporates operating system
> filtering and acceleration of the mouse movement data

Also directly convert to `int` to avoid `narrowing conversion from 'double' to 'int'`
warnings.

Differential Revision: https://phabricator.services.mozilla.com/D132475
2021-11-30 20:28:39 +00:00
Robert Mader bc63ca7d8c Bug 1618914 - Fall back to ftruncate if posix_fallocate isn't supported by filesystem, r=stransky
Rebase of a patch by Jan Beich <jbeich@FreeBSD.org>

Differential Revision: https://phabricator.services.mozilla.com/D132482
2021-11-30 18:51:05 +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
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
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
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
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
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
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
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
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
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
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
Andi-Bogdan Postelnicu 1faa3d40cf Bug 1519636 - Reformat recent changes to the Google coding style. r=firefox-build-system-reviewers,mhentges,sylvestre
Reformat with clang-format version 12.0.1 (taskcluster-FYV2l5wGTseBAhiqf8cxfQ)

Differential Revision: https://phabricator.services.mozilla.com/D131114
2021-11-16 08:07:29 +00:00
sotaro 096f8e103f Bug 1741121 - LayersBackend::LAYERS_CLIENT r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D131106
2021-11-15 22:39:40 +00:00
stransky d9a9cfc939 Bug 377621 [Linux] Support application/x-moz-file-promise mime type by text/uri-list, r=karlt
When application/x-moz-file-promise MIME content is adverised, save the file to /tmp/dnd_file-*/ directory and
offer it as text/uri-list MIME type.

Based on patch by Tobias Koenig.

Differential Revision: https://phabricator.services.mozilla.com/D130767
2021-11-15 15:25:36 +00:00
stransky 0de6c9cb94 Bug 1710344 [Wayland] Make D&D work with popups, r=emilio
Right now D&D on popups are not possible due to https://gitlab.gnome.org/GNOME/gtk/-/issues/4437 and wrong event handling.
To fix that we do in this patch:

- Listen for D&D events on mShell instead of on mContainer as we're getting D&D events there.
- Compensate https://gitlab.gnome.org/GNOME/gtk/-/issues/4437 and add window position to D&D coordinates reported by D&D handlers.

Differential Revision: https://phabricator.services.mozilla.com/D131052
2021-11-15 14:36:44 +00:00
Stephen A Pohl b739277c24 Bug 1719427: Refactor scrollbar drawing code across platforms. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129265
2021-11-15 12:39:38 +00:00
criss 8ace361058 Backed out 4 changesets (bug 1719427) for causing build bustages. CLOSED TREE
Backed out changeset d6948ef7f495 (bug 1719427)
Backed out changeset 4df7017f6bc9 (bug 1719427)
Backed out changeset 8c5bb08f80e9 (bug 1719427)
Backed out changeset e32004dd2014 (bug 1719427)
2021-11-15 13:46:20 +02:00
Stephen A Pohl 0468798e53 Bug 1719427: Refactor scrollbar drawing code across platforms. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129265
2021-11-15 11:15:54 +00:00
stransky 8b68ee613b Bug 1740544 [Linux] Simplify nsWindow::Create() r=emilio
Depends on D130885

Differential Revision: https://phabricator.services.mozilla.com/D130886
2021-11-10 20:01:32 +00:00
stransky 013286f33d Bug 1740544 [Linux] Remove redundant mShell/mContainer checks, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130885
2021-11-10 20:01:31 +00:00
Emilio Cobos Álvarez 40a8686713 Bug 1736384 - Don't create IMContextWrapper GTK style provider unnecessarily. r=stransky
I don't know whether all this style provider business is still
necessary looking at bug 1461307, but this should help by avoiding
initializing LookAndFeel too early in any case.

Differential Revision: https://phabricator.services.mozilla.com/D130633
2021-11-10 07:32:17 +00:00
stransky b2a0b7db52 Bug 1740305 [Wayland] Don't offer XdndDirectSave on Wayland r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130771
2021-11-10 07:31:43 +00:00
Emilio Cobos Álvarez e7d56f56b7 Bug 1713920 - Fall back to non-native colors if thumb and track are the same opaque color. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D130345
2021-11-08 14:04:24 +00:00
Emilio Cobos Álvarez 1a1f96076e Bug 1739383 - [wayland] Fix interaction of margins on anchored popups that GTK decides to flip. r=stransky
With some care, applying the margin to the anchor rather than as a fixed
margin to the popup makes it work correctly when flipping.

Differential Revision: https://phabricator.services.mozilla.com/D130384
2021-11-08 14:03:56 +00:00
Henry Heino 848bc7c638 Bug 1722899 - Send TouchCancel event just before dragging window r=stransky
`gdk` takes `touch-move` and `touch-end` events when dragging the window.
As a result, the touch-start event was propagated, but not touch-end. As a result, all additional touches were considered part of the same gesture as the touch that started moving the window! This affected some Linux distros with the environment variable MOZ_USE_XINPUT2 set to 1.
This patch fixes that by sending a TouchCancel event just before we transfer the touch gesture to GDK.

Differential Revision: https://phabricator.services.mozilla.com/D129349
2021-11-08 13:27:31 +00:00
ssummar 0992acc367 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-08 08:14:00 +00:00
Cristian Tuns 71486b8924 Backed out changeset 7e8e3747c3f8 (bug 1603127) for causing toolchains build bustages (Bug 1739589). CLOSED TREE 2021-11-05 07:23:45 -04:00
ssummar 508562cc85 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-05 05:33:58 +00:00
Emilio Cobos Álvarez c308704902 Bug 1738614 - Remove other Widget* colors. r=mstange
These are only used for frameset painting and the non-e10s <select>
dropdown focus codepath. We have other more appropriate standard
colors for this.

Differential Revision: https://phabricator.services.mozilla.com/D129992
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez 923cf5df84 Bug 1738614 - Remove TextForeground/Background system colors. r=mstange
Same thing, there's nor reason these should be different from other
CSS-exposed colors.

Differential Revision: https://phabricator.services.mozilla.com/D129991
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez ac14d7e42d Bug 1738614 - Remove WindowBackground/Foreground system colors. r=mstange
There's no reason for these to be different to the CSS-exposed
Window/WindowText.

Differential Revision: https://phabricator.services.mozilla.com/D129990
2021-11-02 18:08:07 +00:00
Robert Mader e8ada91b1c Bug 1736761 - Do not try to initialize GBM on Nvidia < 495, r=gfx-reviewers,jgilbert
It causes unnecessary error messages - and we do have the blocklist
already, so make use of it.

Differential Revision: https://phabricator.services.mozilla.com/D130133
2021-11-02 15:05:59 +00:00
Emilio Cobos Álvarez f9f04528a1 Bug 1738613 - Implement MozNativevisitedhyperlinktext on GTK. r=stransky
This is just drive-by, I noticed we implement one color but not the
other which is unfortunate.

Depends on D129993

Differential Revision: https://phabricator.services.mozilla.com/D129994
2021-11-02 10:45:05 +00:00