Commit Graph

1862 Commits

Author SHA1 Message Date
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
Martin Stransky
878cb981d1 Bug 1582405 - [Wayland] Assert only when we want to commit attached buffer, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D46908

--HG--
extra : moz-landing-system : lando
2019-09-26 07:58:26 +00:00
Martin Stransky
a33bdb4e60 Bug 1578380 - [Wayland] Use WaylandDMABufSurface as ref-counted and store GLContext, r=jhorak
Depends on D46841

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

--HG--
extra : moz-landing-system : lando
2019-09-24 11:30:16 +00:00
Oana Pop Rus
a22fdc5e79 Backed out 8 changesets (bug 1578380) for causing build bustages in ContentClient.cpp on a CLOSED TREE
Backed out changeset 28c2e884d20a (bug 1578380)
Backed out changeset 373c4563e9fd (bug 1578380)
Backed out changeset 3fdbc241d63a (bug 1578380)
Backed out changeset 754865b2810f (bug 1578380)
Backed out changeset b80b7e186f02 (bug 1578380)
Backed out changeset 3a8abb5d7a43 (bug 1578380)
Backed out changeset 2b52c3d15b7b (bug 1578380)
Backed out changeset ca57727c3aad (bug 1578380)
2019-09-24 13:06:55 +03:00
Martin Stransky
d9e67b0424 Bug 1578380 - [Wayland] Use WaylandDMABufSurface as ref-counted and store GLContext, r=jhorak
Depends on D46841

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

--HG--
extra : moz-landing-system : lando
2019-09-24 09:39:29 +00:00
Martin Stransky
ce56a99d89 Bug 1578464 - [Wayland] Set opaque region to wl_surface of toplevel window, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D46280

--HG--
extra : moz-landing-system : lando
2019-09-20 12:58:03 +00:00
Martin Stransky
214f4c1207 Bug 1582714 - Remove #undef LOG from nsClipboard.h, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D46589

--HG--
extra : moz-landing-system : lando
2019-09-20 12:56:13 +00:00
Martin Stransky
59589dad99 Bug 1581638 - Provide logging to Linux/Gtk clipboard code, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D46266

--HG--
extra : moz-landing-system : lando
2019-09-19 07:24:41 +00:00
Jan Horak
f1f19846f0 Bug 1581773 - Fix disappearing bookmark edit panel when choosing folder under Wayland; r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D46440

--HG--
extra : moz-landing-system : lando
2019-09-19 09:28:28 +00:00
Martin Stransky
ae1cc485f3 Bug 1581748 - [Wayland] Fixed rendering of overlapping areas, r=jhorak
- Don't store whole buffer update information at mWholeWindowBufferDamage but use damage region instead.
- Check and remove overlapped images when they are stored at image cache.
- Remove CanDrawToWaylandBufferDirectly() as it's not very useful.

This commit depends on Bug 1580152 which needs to land first.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 13:26:36 +00:00
Martin Stransky
4b928e7b91 Bug 1580152 - [Wayland] Fix rendering glitches on wayland , r=jhorak
- Recently we're missing some drawings as we disabled flushing cached images in frame callback. Let's enable it again and make sure we don't flush the drawings between Lock()/Commit() compositor calls which is controlled by mBufferCommitAllowed.

- When we draw directly to wl_buffer, flush all cached drawings we have or clear them if there's fullscreen update. It prevents potential rendering of cached images over unrelevant buffer content.

- Flush cached images when wl_buffer is detached by wayland compositor. It allows to paint delayed drawings and ensures they won't stay in the queue infinitely.

- Use mBufferPendingCommit to indicate that the WaylandBuffer contains updates from gecko which has not been submitted to wayland compositor yet. Allows delated commit handlers (frame callback, delayed commit and when wl_buffer is detached) to send WaylandBuffer content to wayland compositor.

- Record time of last finished commit to mLastCommitTime and throws warning when wayland compositor does not release wl_buffer in 200ms.

- Use wl_display_sync() to synchronize wl_display events. Wait for events from wl_display until all pending events are processed before we start drawing at WindowSurfaceWayland::Lock(). There may wl_buffer release event waiting which releases wl_buffer for rendering.

- Don't use XMost()/YMost() to get drawing area size.

- Remove mDisplayThreadMessageLoop as it's no longer used.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 12:34:28 +00:00
Marius Gedminas
1fee916641 Bug 1550721 - Fix GTK title bar for tiled windows. r=stransky,dao
Differential Revision: https://phabricator.services.mozilla.com/D45500

--HG--
extra : moz-landing-system : lando
2019-09-17 12:05:00 +00:00
Brindusan Cristian
e32489a0d8 Backed out changeset 44d3452f6a07 (bug 1550721) for build bustages on nsWindow.cpp. CLOSED TREE 2019-09-17 02:27:52 +03:00
Marius Gedminas
880d097a69 Bug 1550721 - Fix GTK title bar for tiled windows. r=stransky,dao
Differential Revision: https://phabricator.services.mozilla.com/D45500

--HG--
extra : moz-landing-system : lando
2019-09-16 20:35:47 +00:00