`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
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
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
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
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
-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
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
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
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
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
`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
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
- 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
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
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
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