Commit Graph

1096 Commits

Author SHA1 Message Date
Jan Horak
6a3218bfc2 Bug 1418792 Start drag operation on touch event on draggable area; r=stransky
Add support for dragging window on touch event.

Differential Revision: https://phabricator.services.mozilla.com/D112370
2021-04-19 22:12:01 +00:00
Emilio Cobos Álvarez
a8aab8cf40 Bug 1706051 - Remove some IPC messages that are unused. r=smaug
Seems they were for plugins, but now they're just dead code.

Differential Revision: https://phabricator.services.mozilla.com/D112539
2021-04-19 13:02:33 +00:00
Botond Ballo
5bd66841c3 Bug 1704070 - Prevent contextmenu event dispatch in the overscroll gutter on Linux. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D111763
2021-04-14 05:07:57 +00:00
Botond Ballo
6da692254f Bug 1704070 - Expose the APZ event status in the return value of DispatchInputEvent(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D111762
2021-04-14 05:07:56 +00:00
stransky
e7310557f6 Bug 1703765 [Wayland] Use widget.wayland.test-workarounds.enabled pref to apply Wayland focus workaround, r=jhorak
Use widget.wayland.test-workarounds.enabled pref to apply Wayland focus workaround - hide/show nsWindow.
Delay nsWindow::Show() operation to avoid Gtk merge both operations to one which may result to no-op.

Depends on D111600

Differential Revision: https://phabricator.services.mozilla.com/D111601
2021-04-12 12:11:20 +00:00
stransky
ff91202c05 Bug 1703657 [Wayland] Use wayland focus workaround if widget.wayland.focus-workaround.enabled is set at nsWindow::SetFocus(), r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D111162
2021-04-08 07:43:19 +00:00
Botond Ballo
cb1b3be904 Bug 1702855 - Disable three-finger touchpad pinch gestures on Linux by default. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D111201
2021-04-08 01:15:42 +00:00
stransky
503e896ce7 Bug 1703490 [Wayland] Remove duplicate Drag&Drop handlers, r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D111072
2021-04-07 12:37:20 +00:00
tom
28adc84134 Bug 1695466 - Fix rounding in GdkEventCoordsToDevicePixels r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D110028
2021-03-30 06:44:56 +00:00
Botond Ballo
294183d485 Bug 1700819 - Avoid dispatching pinch gesture events with mLineOrPageDeltaY == 0. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D110009
2021-03-27 23:29:19 +00:00
Simon Giesecke
9e995a79e8 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
alaaemad
9f2320c761 Bug 1694311 - Populate PinchGestureInput::mLineOrPageDeltaY on Linux. r=tnikkel
This ensures that, in addition to wheel events, DOMMouseScroll events are
also dispatched to Gecko during pinches.

Differential Revision: https://phabricator.services.mozilla.com/D107390
2021-03-22 22:48:45 +00:00
Emilio Cobos Álvarez
a921b06796 Bug 1699930 - Don't let GTK text scale affect non-native scrollbar sizes. r=mstange
This matches the native theme. We plumb it via LookAndFeel to avoid
having to load GTK settings in child processes.

Differential Revision: https://phabricator.services.mozilla.com/D109275
2021-03-22 16:11:33 +00:00
stransky
3cf4af091d Bug 1684194 [Linux] Use RenderCompositorEGL on X11/EGL, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D108508
2021-03-18 13:46:03 +00:00
stransky
19bdd11ef8 Bug 1698019 [Linux] Set minimal mContainer widget size without CSD borders, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D108167
2021-03-15 11:20:52 +00:00
Jan Alexander Steffens (heftig)
9354866f9f Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-11 14:32:53 +00:00
Narcis Beleuzu
7cd3bb34b4 Backed out changeset a4f4f640eaa7 (bug 1696845) for bustages on pangofc-fontmap.h 2021-03-10 04:49:51 +02:00
Jan Alexander Steffens (heftig)
0b6c0281d2 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-09 22:55:47 +00:00
mazin
8ef74f700e Bug 1612738 - Set minimum widget size for mContainer. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D105514
2021-03-09 15:46:08 +00:00
alaaemad
da14e0492e Bug 1692023 - Add more tests for Linux touchpad zooming r=botond
Differential Revision: https://phabricator.services.mozilla.com/D106132
2021-03-07 18:57:40 +00:00
Cosmin Sabou
9f9c7b4e29 Backed out changeset 32e20e00382d (bug 1612738) for causing bc failures on browser_closePipPause.js. CLOSED TREE 2021-03-05 19:33:36 +02:00
mazin
d62c7fbbbd Bug 1612738 - Set minimum widget size for mContainer. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D105514
2021-03-05 16:08:34 +00:00
stransky
95ca1c15b8 Bug 1693460 [Linux] Always check GTK_CSD variable and use client decorations on Elementary OS, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D107253
2021-03-05 13:27:14 +00:00
stransky
440409cc01 Bug 1622107 [Wayland] Reset Drag and Drop operation when compositor fails to cancel it, r=jhorak
This is a workaround for https://gitlab.gnome.org/GNOME/mutter/-/issues/1658

Wayland compositor sometimes fails to send wl_data_source::cancelled() so we don't get info that the D&D is finished
and it's still marked as active internally which preverts Firefox to do any further D&D operation.

In the patch we detect such scenario and reset internal D&D state.

Differential Revision: https://phabricator.services.mozilla.com/D106266
2021-03-02 14:27:00 +00:00
Butkovits Atila
73efd7055e Backed out changeset 4eee84427d5f (bug 1622107) for causing build bustages on nsWindow.cpp. CLOSED TREE 2021-03-01 15:59:58 +02:00
stransky
002766bdb8 Bug 1622107 [Wayland] Reset Drag and Drop operation when compositor fails to cancel it, r=jhorak
This is a workaround for https://gitlab.gnome.org/GNOME/mutter/-/issues/1658

Wayland compositor sometimes fails to send wl_data_source::cancelled() so we don't get info that the D&D is finished
and it's still marked as active internally which preverts Firefox to do any further D&D operation.

In the patch we detect such scenario and reset internal D&D state.

Differential Revision: https://phabricator.services.mozilla.com/D106266
2021-03-01 13:34:12 +00:00
Simon Giesecke
95c38cc6b8 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Lee Salzman
09c77bf86b Bug 1690216 - Clarify that StartRemoteDrawingInRegion does not actually modify the region. r=mattwoodrow
It caused us substantial confusion investigating this bug under the belief that
StartRemoteDrawingInRegion may have been modifying the dirty region. None of our
existing widget code anymore uses the API in this way, so it makes sense to just
force this dirty region to be const so that we no longer support the assumption
and alleviate confusion in the future about how our widget code actually behaves.

Depends on D106246

Differential Revision: https://phabricator.services.mozilla.com/D106247
2021-02-24 18:34:52 +00:00
Masayuki Nakano
463075033a Bug 1691622 - part 9: Make nsIWidget::SynthesizeNativeMouseEvent take an XP button ID and abstract message value r=smaug,geckoview-reviewers,agi,m_kato
Currently, it takes a raw native message value, but it makes JS content too
complicated.  And on Linux, it cannot synthesize non-primary button events
because GDK has only button press and release messages which dont' include
mouse button information.

For solving these problems, this patch creates a new abstract native message
as `nsIWidget::NativeMouseMessage` and makes each widget converts it to
a platform native message.

Additionally, this patch adds an argument to make it possible its callers
to specify pressing or releasing mouse button with a DOM mouse button value.

Note that the following patch adds new argument to
`synthesizeNativeEventMouse*` for mochitests and which will be tested by
new tests.

Differential Revision: https://phabricator.services.mozilla.com/D105763
2021-02-24 01:27:10 +00:00
Masayuki Nakano
8e40d9a185 Bug 1691622 - part 4: Make synthesizeNativeMouseClick*() aware of modifiers r=smaug,geckoview-reviewers,m_kato
Surprisingly, they don't take modifiers, and
`nsIWidget::SynthesizeNativeMouseEvent()` which are implementations of
`nsIDOMWindowUtils::SendNativeMouseEvent()` treat given modifier flags
are native's ones, and handle modifiers only on macOS.  Therefore, this
patch makes them handle native modifiers of Gecko.

Unfortunately, I'm not so familiar with Android API, and in the short
term, I don't need the support on Android.  Therefore, this patch just
adds a TODO comment on Android widget.

Additionally, we don't have a simple way to set modifier only while
posting a mouse input on Windows too.  It requires complicated code.
Therefore, I don't add the support for it on Windows too.

Differential Revision: https://phabricator.services.mozilla.com/D105758
2021-02-24 01:27:07 +00:00
Eitan Isaacson
c1ef28b8c2 Bug 1693597 - P1: Rename Accessible to LocalAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105670
2021-02-19 23:14:32 +00:00
Jan Horak
5824900c78 Bug 1644018 Force to trigger popup crop to fit the screen when we have size change from Wayland;r=stransky
We need to trigger popupFrame->SetPopupPosition when we get size change from the Wayland popup
positioner - ie. window does not fit the screen. That will ensure that the
popup is cropped to fit the screen.

This patch also keeps the NativeMoveResizeWaylandPopupCallback connected to make sure
that the subsequent nsWindow::Show calls places the window correctly (when for
example the main window is moved to the screen edge - the menus can be flipped - and
we need to update the nsView for that to ensure the submenus are correctly placed.

We also use anchorRectAppUnits.ToNearestPixels to partially mirror behaviour of
nsView::CalcWidgetBounds.

Differential Revision: https://phabricator.services.mozilla.com/D105507
2021-02-19 16:09:47 +00:00
alaaemad
72b5c321c1 Bug 1640186 - Add machinery for sending native pinch gestures from a test, and a test which uses it r=botond
Currently implemented for Linux

Differential Revision: https://phabricator.services.mozilla.com/D103929
2021-02-19 05:35:40 +00:00
stransky
f2d763e097 Bug 1681356 [Linux] Rename CSDSupportLevel to GtkWindowDecoration, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D104403
2021-02-17 13:04:39 +00:00
stransky
b5793f4052 Bug 1681356 [Linux] Draw to MozContainer by default and enable CSD titlebar mode when XDG_CURRENT_DESKTOP is not set, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D104402
2021-02-17 13:04:39 +00:00
Robert Mader
0daec39f5d Bug 1668805: Enable opaque region if new GDK API is availabe, r=stransky
From GTK 3.24.25 on we have a new API that allows us to savely apply
opaque regions to our own surfaces without risking to freeze GDK.

Differential Revision: https://phabricator.services.mozilla.com/D102835
2021-02-16 09:04:47 +00:00
stransky
bc69cd0684 Bug 1635757 [Linux] Remove nsDragService logging module and log D&D with WidgetDrag log module, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D104802
2021-02-16 07:52:36 +00:00
Gerald Squelart
f25e1c0093 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Csoregi Natalia
513235e99f Backed out 2 changesets (bug 1681356) for failures on browser_UsageTelemetry_toolbars.js. CLOSED TREE
Backed out changeset 4e9bbfd484fb (bug 1681356)
Backed out changeset 4ccdf47da4fe (bug 1681356)
2021-02-12 12:40:00 +02:00
stransky
e398c95dac Bug 1681356 [Linux] Rename CSDSupportLevel to GtkWindowDecoration, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D104403
2021-02-12 08:45:10 +00:00
stransky
38245e5f7a Bug 1681356 [Linux] Draw to MozContainer by default and enable CSD titlebar mode when XDG_CURRENT_DESKTOP is not set, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D104402
2021-02-12 08:45:09 +00:00
stransky
d4725df982 Bug 1683578 [wayland] Use wl_surface ID instead of wl_surface address when check for stored frame callback, r=jhorak
Depends on D104711

Differential Revision: https://phabricator.services.mozilla.com/D104712
2021-02-11 15:30:17 +00:00
stransky
aee4df9582 Bug 1667851 [Wayland] Use map_event to create wl_subsurface of MozContainer when it's size is already allocated, r=jhorak
- Recently we use size allocation event to create wl_subsurface of MozContainer. Unfortunately size allocation event
  is not called when a window is opened second time, as its size is already set. Use map_event to create
  wl_subsurface in this case.

Differential Revision: https://phabricator.services.mozilla.com/D104551
2021-02-10 16:01:14 +00:00
stransky
4ab1f54d91 Bug 1667851 [Wayland] Guess subsurface offset from window decorations size, r=jhorak
- Try to set subsurface offset even if we mozcontainer size allocation is not finished. Use window decoration size for it.
- Add more logging to mozcontainer code.

Depends on D104549

Differential Revision: https://phabricator.services.mozilla.com/D104550
2021-02-10 16:01:13 +00:00
Csoregi Natalia
e8c98a50a9 Backed out 3 changesets (bug 1667851) for causing build bustage on WindowSurfaceWayland.cpp. CLOSED TREE
Backed out changeset 8446b26d9c1d (bug 1667851)
Backed out changeset 9aefa43b4688 (bug 1667851)
Backed out changeset 8a5f4c0386c2 (bug 1667851)
2021-02-09 22:16:17 +02:00
stransky
01a743d096 Bug 1667851 [Wayland] Use map_event to create wl_subsurface of MozContainer when it's size is already allocated, r=jhorak
- Recently we use size allocation event to create wl_subsurface of MozContainer. Unfortunately size allocation event
  is not called when a window is opened second time, as its size is already set. Use map_event to create
  wl_subsurface in this case.

Depends on D104550

Differential Revision: https://phabricator.services.mozilla.com/D104551
2021-02-09 19:41:10 +00:00
stransky
00be9a0257 Bug 1667851 [Wayland] Guess subsurface offset from window decorations size, r=jhorak
- Try to set subsurface offset even if we mozcontainer size allocation is not finished. Use window decoration size for it.
- Add more logging to mozcontainer code.

Depends on D104549

Differential Revision: https://phabricator.services.mozilla.com/D104550
2021-02-09 19:41:10 +00:00
stransky
721f22ad8a Bug 1683578 [Wayland] Provide better log for window types, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D104446
2021-02-09 09:17:53 +00:00
Masayuki Nakano
71edddfad2 Bug 1685491 - part 5: Move the code remapping arrow keys in vertical content to NativeKeyBindings r=smaug,jfkthame
Currently, this feature is implemented only on Linux and macOS (see also
bug 1077515 and bug 1301497), and the code is really similar each other.
Additionally, it always tries to query selection to check whether the caret is
in vertical content or not if arrow keys are pressed.  For avoiding a lot of
query, this patch makes `TextEventDispatcher` cache writing mode at every
selection change notification.  However, unfortunately, it's not available when
non-editable content has focus, but it should be out of scope of this bug since
it requires a lot of changes.

Anyway, with this patch, we can write a mochitest only on Linux and macOS.
The following patch adds a test for this as a fix of bug 1103374.

Differential Revision: https://phabricator.services.mozilla.com/D102881
2021-02-02 03:29:31 +00:00
stransky
c846c5e2dd Bug 1689319 [Linux] Rename CSD_SUPPORT_* to GTK_DECORATION_* r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D103299
2021-01-28 14:35:38 +00:00