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

3158 Коммитов

Автор SHA1 Сообщение Дата
stransky 567b1c6bbf Bug 1744503 [Linux] Use last input time for gtk_window_present_with_time() if we don't have last focus time, r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D132929
2021-12-06 11:29:09 +00:00
stransky 25b3da7b12 Bug 1744002 [Wayland] Use xdg_activation_v1 to set window focus r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132679
2021-12-04 16:03:05 +00:00
Butkovits Atila 348d216e58 Backed out changeset 743f82451af4 (bug 1743365) for breaking certain combinations of tests. CLOSED TREE 2021-12-03 21:25:30 +02:00
Masayuki Nakano e70edff6bc Bug 1743339 - Make `NativeKeyBindings` for single line editor try the one for multiline editor too r=stransky
`GtkEntry` is used to check what editing or natvigation command is
mapped to every key combination when `<input>` has focus.  However,
it does not support `select-all` signal, thus, Gecko does not respect
native shortcut key for "Select All".

This patch makes it try to check whether the given key combination is
mapped to "Select All" or not in `GtkTextView` widget which supports
`select-all` signal.  Thus, we'll get consistent behavior between
`<input>` and `<textarea>` about "Select All".

Differential Revision: https://phabricator.services.mozilla.com/D132450
2021-12-03 11:57:29 +00:00
stransky 265855ff8a Bug 1743769 [Wayland] Get xdg_activation_v1 interface from Wayland registry r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D132553
2021-12-02 10:48:02 +00:00
stransky 9d21872699 Bug 1743577 [Linux] Support color ranges by VA-API, r=sotaro,jgilbert
Get frame color range from ffmpeg by av_frame_get_color_range() (we do the same for non VA-API path),
store to DMABufSurface and propagate to rendering thread.

Differential Revision: https://phabricator.services.mozilla.com/D132469
2021-12-02 09:32:45 +00:00
stransky 87b2d4dc03 Bug 1743365 [Linux] Cache clipboard targets r=emilio
nsClipboard::HasDataMatchingFlavors() calls nsRetrievalContext::GetTargets() which obtains clipboard targets. We need to call Gtk code for that and spin evetn loop to get the targets.
In this patch we store clipboard tragets internally to speed up nsClipboard::HasDataMatchingFlavors() calls. We also listen at owner-change signal to clear target cache when clipboard content changes.

Differential Revision: https://phabricator.services.mozilla.com/D132365
2021-12-02 09:21:31 +00:00
Masayuki Nakano a309200865 Bug 1742039 - Make `IMContextWrapper::OnSelectionChange()` not call `ResetIME()` if selection range is expected one r=m_kato
Some IME of fcitx and fcitx5 have a mode to disable preedit.  This works
similar to dead key typing on Windows.  I.e., there is an "invisible"
composing text, and only commit string is inserted directly.

After bug 1712269, we don't use a set of composition events for direct
commit from IME because of web-compat.  Therefore, `IMEContentObserver`
cannot know whether the insert is caused by composition or not in this
case.

Additionally, the commit of the IME may be triggered by a key press
for next word.  Therefore, we shouldn't call `ResetIME()` from
`OnSelectionChange()` in this case.

Fortunately, we've already have selection cache which is expected by
IME after dispatching a commit event, and if the actual selection is
same as expected one, IME shouldn't require explicit reset.  Therefore,
this patch makes `OnSelectionChange()` check whether selection is
actually changed, and stop calling `ResetIME()` if selection is not
changed.

Differential Revision: https://phabricator.services.mozilla.com/D132540
2021-12-01 21:27:28 +00:00
Emilio Cobos Álvarez 2abc89c41e Bug 1509931 - Use titlebar radius on Linux and make titlebar set-up work for lightweight themes. r=stransky,dao
To do this, we always draw the native titlebar behind the toolbox, and
then make the toolbox adapt to it by using the titlebar radius. This
makes us preserve the shadow properly.

On Wayland we'd double-draw the shadow (see bug 1509931 comment 4) so
this fixes it by trimming it as well using border-radius.

Differential Revision: https://phabricator.services.mozilla.com/D128681
2021-12-01 18:15:12 +00:00
Emilio Cobos Álvarez a9b6db8e3f Bug 1743803 - Remove unnecessary button-focus appearance value on Linux. r=dao
This always draws transparent. Only real thing it does is forcing 0px
padding.

Differential Revision: https://phabricator.services.mozilla.com/D132563
2021-12-01 13:33:02 +00:00
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