Commit Graph

1875 Commits

Author SHA1 Message Date
Martin Stransky
93728f0682 Bug 1592933 - [Wayland] Get scale factor from nsWindow::GdkScaleFactor() and set it when wl_surface/egl_window is used for rendering, r=jhorak
Remove moz_container_get_scale() and use only nsWindow::GdkScaleFactor() to get scale factor for wl_surface and wl_egl_window.
Always set the scale factor when wl_surface / wl_egl_window is queued for rendering.

Differential Revision: https://phabricator.services.mozilla.com/D51252

--HG--
extra : moz-landing-system : lando
2019-11-06 13:18:43 +00:00
Brindusan Cristian
817b88aae9 Backed out 4 changesets (bug 1590965) as requested by karlt on irc. CLOSED TREE
Backed out changeset f68c212c8b2a (bug 1590965)
Backed out changeset 1ced33f66353 (bug 1590965)
Backed out changeset 22f28d146e38 (bug 1590965)
Backed out changeset 70331e97107e (bug 1590965)
2019-11-06 02:32:29 +02:00
Sam Mauldin
16993481ab Bug 1592389 - Rename Mozfield / Mozfieldtext to Field and Fieldtext r=emilio
Split off of Bug 1590894
Rename these to support unprefixed version
Also add alias to keep compatibility

Differential Revision: https://phabricator.services.mozilla.com/D50989

--HG--
extra : moz-landing-system : lando
2019-11-02 21:28:49 +00:00
Martin Stransky
724a9d7e4f Bug 1583732 [Wayland] Use DMABUF for fullscreen updates only, r=jhorak
Add IsDMABufBuffer identification to WindowBackBuffer

Use two sets of wayland buffers (shm and dmabuf) and use dmabuf for fullscreen updates only
when dmabuf is enabled.

Split GetWaylandBufferToDraw() to GetWaylandBufferRecent() and GetWaylandBufferWithSwitch()
to better reflect actual function.

Add CreateWaylandBuffer() to create and store Wayland buffer and use it at SetNewWaylandBuffer()
to change an active wayland buffer or create a new one.

When CACHE_MISSING image cache is selected we draw directly to wayland buffer if it's available
and cache drawing when wayland buffer is missing only. That produces flickering when small buffer parts are
sent to compositor early and the buffer is blocked for further rendering.

This patch enables direct rendering of bigger screen parts only (like page scrolling) to eliminate small
buffer updates.

Differential Revision: https://phabricator.services.mozilla.com/D50055

--HG--
extra : moz-landing-system : lando
2019-11-01 21:11:06 +00:00
Martin Stransky
04afc29457 Bug 1592350 [Wayland] Call wl_surface_commit() on parent surface when subsurface position is updated, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D51133

--HG--
extra : moz-landing-system : lando
2019-10-31 19:00:30 +00:00
Karl Tomlinson
28ea5a2234 Bug 1590965 store clipboard only once on shutdown r=stransky
Depends on D50538

Differential Revision: https://phabricator.services.mozilla.com/D50766

--HG--
extra : moz-landing-system : lando
2019-10-29 21:47:35 +00:00
Karl Tomlinson
8a2f160728 bug 1590965 call gtk_clipboard_store() from an event r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D50538

--HG--
extra : moz-landing-system : lando
2019-10-29 21:47:25 +00:00
Karl Tomlinson
303818c484 Bug 1590965 call gtk_clipboard_store() regardless of whether Gecko is providing the clipboard r=stransky
This stores the clipboard even if it was set in a GTK dialog.

Depends on D50764

Differential Revision: https://phabricator.services.mozilla.com/D50765

--HG--
extra : moz-landing-system : lando
2019-10-29 21:47:27 +00:00
Karl Tomlinson
3e16a1c556 Bug 1590965 clear GtkClipboard on nsIClipboard::EmptyClipboard r=stransky
This notifies GTK that the data is no longer available for clipboard_get_cb(),
so that GTK will no longer advertise nor attempt to store the data.

Differential Revision: https://phabricator.services.mozilla.com/D50764

--HG--
extra : moz-landing-system : lando
2019-10-30 08:59:36 +00:00
Karl Tomlinson
b733e3b3ac Bug 1592502 initialize all fields of GdkEvents r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D51051

--HG--
extra : moz-landing-system : lando
2019-10-30 07:36:23 +00:00
Daniel Varga
b747b90cd8 Backed out changeset ec25a8482342 (bug 1592389) for mochitest failure at layout/style/test/test_value_computation.html. On a CLOSED TREE 2019-10-30 10:17:29 +02:00
Sam Mauldin
09a1cf803b Bug 1592389 - Rename Mozfield / Mozfieldtext to Field and Fieldtext r=emilio
Split off of Bug 1590894
Rename these to support unprefixed version
Also add alias to keep compatibility

Differential Revision: https://phabricator.services.mozilla.com/D50989

--HG--
extra : moz-landing-system : lando
2019-10-30 05:51:38 +00:00
Jan Alexander Steffens (heftig)
5d3dcb3132 Bug 1591488 - [Wayland] Only offset the opaque region for normal windows; r=stransky
Maximized and fullscreened windows do not have a CSD decoration border.

Differential Revision: https://phabricator.services.mozilla.com/D50628

--HG--
extra : moz-landing-system : lando
2019-10-29 14:48:54 +00:00
Alex Henrie
74cc0f4dce Bug 1591490 - Use the NS_IS_SURROGATE_PAIR macro everywhere. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D50697

--HG--
extra : moz-landing-system : lando
2019-10-27 05:05:51 +00:00
Ting-Yu Lin
03c5d676c0 Bug 1587645 Part 2 - Add WritingMode::IsPhysicalLTR(). r=jfkthame
I discovered this while improving `ScrollFrameHelper::IsPhysicalLTR()`
in Part 1. Our code base needs a notion of physical direction. Let's add
it to WritingMode.

Differential Revision: https://phabricator.services.mozilla.com/D49818

--HG--
extra : moz-landing-system : lando
2019-10-25 20:01:46 +00:00
sotaro
e2fc848fee Bug 1584511 - Backout r=stransky
Backout because of regression  Bug 1590498 .

Differential Revision: https://phabricator.services.mozilla.com/D49380

--HG--
extra : moz-landing-system : lando
2019-10-23 01:41:27 +00:00
sotaro
26e474c3f9 Bug 1584511 - Handle Compositor session recreation when egl_window is re-created r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D49380

--HG--
extra : moz-landing-system : lando
2019-10-18 08:20:30 +00:00
Martin Stransky
5f9cda5fb5 Bug 1583731 - [Wayland] Assert when EGLImage is already created at WaylandDMABufSurface::CreateEGLImage, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D49263

--HG--
extra : moz-landing-system : lando
2019-10-15 10:46:08 +00:00
Jan Horak
4d0cec02a5 Bug 1565401 - return valid screen size on multimonitor setup under Wayland; r=stransky,NeilDeakin
By getting the right screen size we can shrink the popup menus which overflows
the screen size under Wayland. The ScreenManager does not help us, because we
can't get absolute window position, but we can use gdk_display_get_monitor_at_window
and gdk_monitor_get_workarea to get the correct screen rectangle.

Differential Revision: https://phabricator.services.mozilla.com/D49289

--HG--
extra : moz-landing-system : lando
2019-10-17 11:27:08 +00:00
Martin Stransky
6cbbed9b4e Bug 1588907 [Wayland] Remove misleading comment about DMA_BUF_IOCTL_SYNC, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D49390

--HG--
extra : moz-landing-system : lando
2019-10-17 10:38:12 +00:00
Cosmin Sabou
e1278bb139 Backed out changeset 23e9fe8a919b (bug 1565401) for causing build bustages on nsWindow.h. CLOSED TREE 2019-10-16 18:45:09 +03:00
Jan Horak
e2b9bdb35e Bug 1565401 - return valid screen size on multimonitor setup under Wayland; r=stransky,NeilDeakin
By getting the right screen size we can shrink the popup menus which overflows
the screen size under Wayland. The ScreenManager does not help us, because we
can't get absolute window position, but we can use gdk_display_get_monitor_at_window
and gdk_monitor_get_workarea to get the correct screen rectangle.

Differential Revision: https://phabricator.services.mozilla.com/D49289

--HG--
extra : moz-landing-system : lando
2019-10-16 13:03:43 +00:00
Martin Stransky
0595546bfc Bug 1587008 - [Wayland] Get wl_egl_window size from compositor by nsWindow::SetEGLNativeWindowSize, r=jhorak
We can't set wl_egl_window from widget code as it must match GL rendering pipeline,
so let compositor to set the egl window size.

Depends on D49136

Differential Revision: https://phabricator.services.mozilla.com/D49137

--HG--
extra : moz-landing-system : lando
2019-10-15 19:25:47 +00:00
Martin Stransky
5a403b0cdd Bug 1587008 - [Wayland] Set EGL window size at CompositorOGL::BeginFrame, r=sotaro
wl_egl_window size must exactly march GL rendering pipeline setting.

Compositor and widget can have different window sizes during window resize when widget
is resized faster than layout can render. Firefox window is rendered misplaced then
and it's "jumping" as layout size is behind toolkit size.

Differential Revision: https://phabricator.services.mozilla.com/D49136

--HG--
extra : moz-landing-system : lando
2019-10-15 19:25:28 +00:00
Dorel Luca
518c1a81eb Backed out 2 changesets (bug 1587008) for build bustage on src/widget/gtk/GtkCompositorWidget.cpp. CLOSED TREE
Backed out changeset 9e610c4628e1 (bug 1587008)
Backed out changeset afc6499c8f1f (bug 1587008)

--HG--
extra : rebase_source : 3c3cc17ada4079f279809cae1ece2e226fde5acf
extra : histedit_source : c7f61dbede0eda8ea3b0a1dfa5c67f8650f4ca81
2019-10-15 19:10:32 +03:00
Martin Stransky
11e2fafd1f Bug 1587008 - [Wayland] Get wl_egl_window size from compositor by nsWindow::SetEGLNativeWindowSize, r=jhorak
We can't set wl_egl_window from widget code as it must match GL rendering pipeline,
so let compositor to set the egl window size.

Depends on D49136

Differential Revision: https://phabricator.services.mozilla.com/D49137

--HG--
extra : moz-landing-system : lando
2019-10-15 13:12:25 +00:00
Martin Stransky
bfddf50156 Bug 1587008 - [Wayland] Set EGL window size at CompositorOGL::BeginFrame, r=sotaro
wl_egl_window size must exactly march GL rendering pipeline setting.

Compositor and widget can have different window sizes during window resize when widget
is resized faster than layout can render. Firefox window is rendered misplaced then
and it's "jumping" as layout size is behind toolkit size.

Differential Revision: https://phabricator.services.mozilla.com/D49136

--HG--
extra : moz-landing-system : lando
2019-10-15 13:12:13 +00:00
Martin Stransky
d45caa1d42 Bug 1588579 [Wayland] Use explicit names for surface release methods, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D49192

--HG--
extra : moz-landing-system : lando
2019-10-15 08:24:17 +00:00
Martin Stransky
6cbfee645f Bug 1588448 - [Wayland] Check mozcontainer wl_surface before we use it, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D49189

--HG--
extra : moz-landing-system : lando
2019-10-15 08:28:56 +00:00
Martin Stransky
6bafd20d69 Bug 1587731 - [Wayland] Don't throw missing GdkDisplay warning in headless mode r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D49155

--HG--
extra : moz-landing-system : lando
2019-10-14 13:37:44 +00:00
dennisschagt
67d3f0e9f3 Bug 1553835 - Set GTK window hint to make PIP window floating r=stransky
I believe the GDK_WINDOW_TYPE_HINT_UTILITY [1] makes the most sense,
especially when looking at the description of the related
_NET_WM_WINDOW_TYPE_UTILITY [2].

This works well in i3-wm.

[1] https://developer.gnome.org/gdk3/stable/gdk3-Windows.html#GdkWindowTypeHint
[2] https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#idm140130317606816

Differential Revision: https://phabricator.services.mozilla.com/D48771

--HG--
extra : moz-landing-system : lando
2019-10-10 10:00:32 +00:00
Martin Stransky
1d95ca87e8 Bug 1586187 - provide logging to nsLookAndFeel, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D48149

--HG--
extra : moz-landing-system : lando
2019-10-08 08:53:40 +00:00
Martin Stransky
55183b1b38 Bug 1586544 - [Wayland] Fix FBO creation check, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D48270

--HG--
extra : moz-landing-system : lando
2019-10-08 07:59:11 +00:00
Martin Stransky
95eed2f101 Bug 1586993 - [Linux] Add logging to nsWindow::UpdateOpaqueRegion, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D48480

--HG--
extra : moz-landing-system : lando
2019-10-08 07:56:49 +00:00
Olli Pettay
bf03e4a42e Bug 1552814, make it possible to start dnd from dragable element even if DataTransfer is empty, r=NeilDeakin
Chrome and old Edge at least seem to have this behavior, and this way the testcase on the bug doesn't trigger click anymore since
we enter dnd mode and get dragleave etc. events.

Manually tested on linux and Windows, and annyg tested on Mac

Update test_dragstart.html's draggable=true test to follow the pattern used by other tests

Differential Revision: https://phabricator.services.mozilla.com/D48208

--HG--
extra : moz-landing-system : lando
2019-10-07 21:01:57 +00:00
Bogdan Tara
cfbd01b5d9 Backed out changeset c9b71d1747ea (bug 1552814) for assertion failures on nsBaseDragService.cpp CLOSED TREE
--HG--
extra : rebase_source : 4a3e9922237c8638c9b2edd45cc2309094f3d352
extra : amend_source : 1629bf05b705065193ec1ee3e17086db3efd254e
2019-10-07 19:02:02 +03:00
Olli Pettay
6ceb072e65 Bug 1552814, make it possible to start dnd from dragable element even if DataTransfer is empty, r=NeilDeakin
Chrome and old Edge at least seem to have this behavior, and this way the testcase on the bug doesn't trigger click anymore since
we enter dnd mode and get dragleave etc. events.

Manually tested on linux and Windows, and annyg tested on Mac

Differential Revision: https://phabricator.services.mozilla.com/D48208

--HG--
extra : moz-landing-system : lando
2019-10-07 09:43:18 +00:00
Martin Stransky
ff742900bd Bug 1584790 - [Linux] De-scale window size when calculating aspect ratio, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D48311

--HG--
extra : moz-landing-system : lando
2019-10-07 10:55:01 +00:00
Jan Horak
4a0dbe414e Bug 1582679 - Rewrite popup hiding on wayland; r=stransky
Under Wayland it is possible to add only one popup window
to a parent window. If we try to attach another popup to the window,
the GTK refuses to do that. This can happen when the previous popup
has not yet been hidden while the new popup is showing (in some cases
the nsWindow::Show(false) for the previous popup is not called before
nsWindow::Show(true) for the new one).

We deal with it by hiding wayland popups which are no longer in the
XULPopupManager (PM) before showing a new one. We only do that for
the main menu popups or context (sub)menus. We cannot use PM to check
for the panel popup content like Folder dropdown in Edit Bookmark panel
or WebRTC microphone/video source dropdown. In that case we simply use
the last shown popup as a transient for the new one or the toplevel window.

Differential Revision: https://phabricator.services.mozilla.com/D47610

--HG--
extra : moz-landing-system : lando
2019-10-02 13:21:56 +00:00
Martin Stransky
41e46a8792 Bug 1578464 - [Wayland] Set opaque region for toplevel window, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D47602

--HG--
extra : moz-landing-system : lando
2019-10-02 08:57:44 +00:00
Brindusan Cristian
bc0bc5f832 Backed out changeset 30310d7d693a (bug 1582679) for mochitest assertions at nsWindow.cpp:3766. CLOSED TREE 2019-10-02 00:14:31 +03:00
Jan Horak
730e9ad9d9 Bug 1582679 - Rewrite popup hiding on wayland; r=stransky
Under Wayland it is possible to add only one popup window
to a parent window. If we try to attach another popup to the window,
the GTK refuses to do that. This can happen when the previous popup
has not yet been hidden while the new popup is showing (in some cases
the nsWindow::Show(false) for the previous popup is not called before
nsWindow::Show(true) for the new one).

We deal with it by hiding wayland popups which are no longer in the
XULPopupManager (PM) before showing a new one. We only do that for
the main menu popups or context (sub)menus. We cannot use PM to check
for the panel popup content like Folder dropdown in Edit Bookmark panel
or WebRTC microphone/video source dropdown. In that case we simply use
the last shown popup as a transient for the new one or the toplevel window.

Differential Revision: https://phabricator.services.mozilla.com/D47610

--HG--
extra : moz-landing-system : lando
2019-10-01 13:14:02 +00:00
Gabriele Svelto
10d41866a5 Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678

--HG--
extra : moz-landing-system : lando
2019-09-30 22:06:47 +00:00
Martin Stransky
9691b5d142 Bug 1536747 - [Linux] PictureInPicture window - open window manager menu on right mouse click, r=jhorak
This patch depends on Bug 1584492.

Differential Revision: https://phabricator.services.mozilla.com/D47424

--HG--
extra : moz-landing-system : lando
2019-09-27 15:14:23 +00:00
Martin Stransky
43b2ca4820 Bug 1583852 - [Linux] Disable round corners/alpha blending for PictureInPicture windows, r=jhorak
This bug depends on Bug 1584492.

Differential Revision: https://phabricator.services.mozilla.com/D47415

--HG--
extra : moz-landing-system : lando
2019-09-27 15:13:52 +00:00
Martin Stransky
47f4838fa0 Bug 1584492 [Linux] Add mIsPIPWindow to nsWindow, r=jhorak
Depends on D47409

Differential Revision: https://phabricator.services.mozilla.com/D47410

--HG--
extra : moz-landing-system : lando
2019-09-28 06:55:54 +00:00
Martin Stransky
39d980d661 Bug 1575136 - [Linux/Gtk] Set initial wm_role for windows, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D47217

--HG--
extra : moz-landing-system : lando
2019-09-26 12:11:44 +00:00
Martin Stransky
ded82a61e2 Bug 1584139 [Linux/CSD] Add decoration size to nsWindow::LockAspectRatio() when CSD mode is used, r=jhorak
Depends on D47234

Differential Revision: https://phabricator.services.mozilla.com/D47235

--HG--
extra : moz-landing-system : lando
2019-09-26 12:03:32 +00:00
Martin Stransky
ae44a5d195 Bug 1584139 - [Linux/Gtk] Provide logging to nsWindow::Resize(), nsWindow::SetWindowDecoration(), nsWindow::SetDrawsInTitlebar(), r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D47234

--HG--
extra : moz-landing-system : lando
2019-09-26 12:05:03 +00:00
Martin Stransky
b39e038df7 Bug 1583737 - Implement nsWindow::LockAspectRatio() on Linux, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D47046

--HG--
extra : moz-landing-system : lando
2019-09-26 07:57:57 +00:00