Commit Graph

1819 Commits

Author SHA1 Message Date
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
Andrew Osmond
fce484c34f Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

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

--HG--
extra : moz-landing-system : lando
2019-09-14 16:17:04 +00:00
Ciure Andrei
a4046ec458 Backed out 6 changesets (bug 1574493) for causing nested-sticky-2.html to perma fail CLOSED TREE
Backed out changeset 358746636448 (bug 1574493)
Backed out changeset 34aef5498237 (bug 1574493)
Backed out changeset 1f88e2031c76 (bug 1574493)
Backed out changeset 07c588b5ea10 (bug 1574493)
Backed out changeset 0685e8d3510e (bug 1574493)
Backed out changeset 15d4390220c4 (bug 1574493)
2019-09-13 19:26:50 +03:00
Andrew Osmond
25866edb78 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

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

--HG--
extra : moz-landing-system : lando
2019-09-13 14:03:23 +00:00
Ciure Andrei
8c3feea58a Backed out 6 changesets (bug 1574493) for causing nested-sticky-1.html to perma fail CLOSED TREE
Backed out changeset fdc25a90b0ef (bug 1574493)
Backed out changeset 0ce3c48c1f79 (bug 1574493)
Backed out changeset 326b9f96614b (bug 1574493)
Backed out changeset b0817c0aee77 (bug 1574493)
Backed out changeset 70d99c264df9 (bug 1574493)
Backed out changeset e5217ab4b668 (bug 1574493)
2019-09-13 16:17:47 +03:00
Andrew Osmond
b2d4e121cb Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

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

--HG--
extra : moz-landing-system : lando
2019-09-13 10:48:31 +00:00
Gurzau Raul
4793791015 Backed out changeset 84302aebbe43 (bug 1573813) for failing mochitest jobs on a CLOSED TREE. 2019-09-12 18:35:47 +03:00
Gurzau Raul
fe4bb6d539 Backed out 6 changesets (bug 1574493) for wrench failures at stacking-context-clip.yaml on a CLOSED TREE.
Backed out changeset 8a8736ac4e25 (bug 1574493)
Backed out changeset 4a3294e88823 (bug 1574493)
Backed out changeset 0c26ecdc1ddc (bug 1574493)
Backed out changeset 11257f7b3ad3 (bug 1574493)
Backed out changeset dcedc286ad9d (bug 1574493)
Backed out changeset 87f216e0753d (bug 1574493)
2019-09-12 18:34:07 +03:00
Jan Horak
9f70c0454a Bug 1573813 - use parent window scale factor for the popup/tooltips; r=stransky
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 13:29:03 +00:00
Andrew Osmond
320cbbf828 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 12:42:41 +00:00
Jan Horak
ab88be917c Bug 1580174 - Don't use toplevel window as parent for the menus in popupnotification; r=stransky
Under Wayland where there's a strict popup window hierarchy, using toplevel window
for the submenus in popupnotification cause the popupnotification to hide
when opening them and this breaks user to Allow/Don't allow the action.

We have to use last opened popup window as a parent for these submenus.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 09:38:05 +00:00
Martin Stransky
eee009c581 Bug 1579849 - [Wayland] Optimize cached rendering to wl_buffer for widget.wayland_cache_mode=1, r=jhorak
- When widget.wayland_cache_mode=1 use direct rendering to wl_buffer only when there isn't any
  cached rendering pending and we're updating one big piece of screen (video playback/scrolling etc..)

- Disable frame callback commits between WindowSurfaceWayland::Lock and WindowSurfaceWayland::Commit
  as the buffer can be updated by gecko compositor

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

--HG--
extra : moz-landing-system : lando
2019-09-11 15:32:48 +00:00
Martin Stransky
71d17fbe95 Bug 1579823 - [Wayland] remove __PRETTY_FUNCTION__ from wayland logs as it produces too long function names, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D45173

--HG--
extra : moz-landing-system : lando
2019-09-09 12:42:30 +00:00
Martin Stransky
6dbfafeb2f Bug 1579794 - [Wayland] Explicitly enable/disable direct rendering to wl_buffer, r=jhorak
Recently direct wl_buffer rendering is kept enabled until we have wl_buffer available which
produces rendering artifacts when screen damage rects overlaps.

Let's enable/disable it explicitly at every rendering cycle start to avoid
screen flickering.

Depends on D45166

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

--HG--
extra : moz-landing-system : lando
2019-09-09 13:04:26 +00:00
Martin Stransky
2ba6437bbb Bug 1579794 - [Wayland] Use wl_surface_damage_buffer() and require wl_compositor v.4, r=jhorak
Use wl_surface_damage_buffer() to propagate wl_buffer damage to avoid rounding errors and
rendering artifacts for HiDPI wl_buffers.

Depends on D45165

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

--HG--
extra : moz-landing-system : lando
2019-09-10 07:58:56 +00:00
Martin Stransky
7a6c6dc9d7 Bug 1579794 - [Wayland] Copy pixel data for cached images, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D45165

--HG--
extra : moz-landing-system : lando
2019-09-10 08:09:57 +00:00
Timothy Nikkel
e0a79ba9f2 Bug 1578164. Use async notifications when requesting decode of an image in most places. r=aosmond
Most of things will likely be no real change because they ask for the exact frame they want immediately before.

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

--HG--
extra : moz-landing-system : lando
2019-09-03 15:36:23 +00:00
Emilio Cobos Álvarez
a2e997b40b Bug 1578652 - Add a comment pointing to a gross gtk resize workaround. r=stransky
This was fixed upstream, so we can eventually remove this.

Having the issue number makes it much nicer to figure out when is the right time
to remove it.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 08:18:12 +00:00
Martin Stransky
145616c1c1 Bug 1576904 [Wayland] Add WaylandDMABufSurface GL binding ability, r=jhorak
- Allow to create WaylandDMABufSurface with wl_buffer or EGLImage on top of it
- Disable dmabuf modifiers as they slow down the data upload
- Add ability to export/import WaylandDMABufSurface via. file descriptors

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

--HG--
extra : moz-landing-system : lando
2019-09-03 09:41:32 +00:00
Martin Stransky
7ec25f9853 Bug 1577024 - [Wayland] Enable experimental wayland backend modes by widget.wayland_cache_mode pref, r=jhorak
Image cache mode can be set by widget.wayland_cache_mode.

- widget.wayland_cache_mode = 0 (or missing):
  Cache and clip all drawings, default. It's slowest
  but also without any rendered artifacts.

- widget.wayland_cache_mode = 1:
  Cache drawing only when back buffer is missing. May produce
  some rendering artifacts and flickering when partial screen update
  is rendered.

- widget.wayland_cache_mode = 2:
  Don't cache anything, draw only when back buffer is available.
  Suitable for fullscreen content only like fullscreen video playback and
  may work well with dmabuf backend.

Differential Revision: https://phabricator.services.mozilla.com/D43681
2019-08-31 00:19:03 +03:00
Martin Stransky
1cf5fdd9b6 Bug 1562827 - [Linux] Merge nsWindow::ReparentNativeWidgetInternal() to nsWindow::SetParent() and use nsWindow::ReparentNativeWidget() for toplevel windows only, r=karlt
- Use former ReparentNativeWidgetInternal() code in nsWindow::SetParent().
  Also update mToplevelParentWindow for Wayland to hold default toplevel window.

- Make nsWindow::ReparentNativeWidget() to work on toplevel windows only and use only gtk_window_set_transient_for() to reparent
  a toplevel window. Also update mToplevelParentWindow for Wayland.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 23:48:44 +00:00
Gurzau Raul
6321d98bb4 Backed out changeset 9b5ceca1eedf (bug 1573813) for failures at /crashtests/1113005.html on a CLOSED TREE. 2019-08-28 17:15:26 +03:00
Martin Stransky
4e8409ddcd Bug 1576898 - [Wayland] Implement gbm_bo_import & gbm_device_is_format_supported at nsGbmLib, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D43603

--HG--
extra : moz-landing-system : lando
2019-08-28 10:38:11 +00:00
Jan Horak
37a9627a4c Bug 1573813 - use parent window scale factor for the popup/tooltips; r=stransky
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale

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

--HG--
extra : moz-landing-system : lando
2019-08-27 13:03:50 +00:00
Martin Stransky
89132239ea Bug 1574036 - [Wayland] Fix flickering during window resize, r=jhorak
Recently window resize on Wayland produces flickering/rendering artifacts because
window background is randomly cleared due to actual window size changes.
We recently query widget size and do clear/fullscreen update when the size changes.

To avoid that, get widget size once at WindowSurfaceWayland::Lock() and use it
until next WindowSurfaceWayland::Lock(). Also don't to switch wayland back buffers
until there's really fullscreen update from compositor.

This patch:

- Use mLockedScreenRect to store window size at WindowSurfaceWayland::Lock(). It's used
  to detect widget resize, when it happens throw away all cached painting and wait for
  full screen update.

- Use mBufferScreenRect to store size of wayland back buffer and pass it
  instead of actual widget size we used before this patch. This ensures all our
  drawing matches the buffer size.

- Rename aFullScreenUpdate to aCanSwitchBuffer at LockWaylandBuffer() to stress
  actual meaning - we can/can't switch back buffers for partial drawing and we need to
  wait until recent back buffer is released by compositor.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 12:33:25 +00:00
Martin Stransky
388e4b2d74 Bug 1576268 - [Wayland] Use MOVE as a default Drag and Drop action to match X11 behavior, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D43578

--HG--
extra : moz-landing-system : lando
2019-08-27 12:12:14 +00:00
Kristen Wright
cff2295408 Bug 1573992 - Convert ui.context_menus.after_mouseup to static pref. r=njn
Converts ui.context_menus.after_mouseup varcache pref to a static pref and removes its associated function.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 00:07:49 +00:00
kriswright
943e049dcc Bug 1573992 - Convert layout.css.devPixelsPerPx to static pref. r=njn
Converts layout.css.devPixelsPerPx to a static pref. This one was one of the slightly odd ones; some values were expecting an atomic float, so instead of defining a regular type float it is defined in StaticPrefList.yaml as an AtomicFloat. I am assuming this was the intent of the pref value all along.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 21:02:43 +00:00
Mike Hommey
66d7fe943e Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42765

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:42 +00:00
Mike Hommey
17d34d41d7 Bug 1575415 - Always register the nsApplicationChooser component in Gtk builds. r=froydnj
Bug 1278282 removed Gtk2 support, so MOZ_WIDGET_TOOLKIT is always "gtk3"
for Gtk builds, and never "gtk", which makes the current check never
match.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:21 +00:00
Csoregi Natalia
6c32e4cdbf Backed out changeset 4f82f0b92629 (bug 1573813) for browser-chrome crashes on /browser_bookmarkProperties_folderSelection.js. CLOSED TREE 2019-08-20 21:48:27 +03:00
Jan Horak
248e644f9e Bug 1573813 - use parent window scale factor for the popup/tooltips; r=stransky
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale

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

--HG--
extra : moz-landing-system : lando
2019-08-20 15:52:12 +00:00
Sebastian Streich
db893cf0d7 Bug 1561056 - Pass CSP on Link-drop r=ckerschb,Gijs,farre
***
Fix linux build

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

--HG--
extra : moz-landing-system : lando
2019-08-20 12:43:02 +00:00
Markus Stange
cc120aa3b7 Bug 1573343 - Make the aInvalidRegion parameter of EndRemoteDrawing a const reference rather than a regular reference. r=mattwoodrow
There's no point in mutating it, and nobody does.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 22:40:39 +00:00
Csoregi Natalia
0989eb85a3 Backed out changeset 38b37dfa1f33 (bug 1469716) for causing Bug 1572116. a=backout 2019-08-16 04:36:30 +03:00
Jan Horak
74fb3f0f1c Bug 1572455 Workaround for restoring minimized window in Wayland; r=stransky
Under Wayland the GTK does not send the correct window state event change
when the window is iconified. We need to add a workaround for that to avoid
unresponsive UI after restoring the window.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 13:06:58 +00:00
Kristen Wright
b7b95930c5 Bug 1571544 - Convert mozilla.widget.disable-native-theme to static pref. r=njn
Converts mozilla.widget.disable-native-theme varcache pref to a static pref and updates uses of its associated global variable with the pref. This also renames the pref to widget.disable-native-theme to group with other widget prefs.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 23:05:05 +00:00
Tom Schuster
0e913c22c4 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-07 19:49:40 +00:00
Cosmin Sabou
c3430326e6 Backed out changeset ca88862d6b63 (bug 1558915) for causing build bustages on StartupCacheUtils. CLOSED TREE 2019-08-07 13:20:32 +03:00
Tom Schuster
8bc1f5ada8 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-07 09:36:56 +00:00
Razvan Maries
eedbf1137f Backed out changeset b197ca57677a (bug 1558915) for build bustages. CLOSED TREE 2019-08-07 01:04:43 +03:00
Tom Schuster
03c7998ef2 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-06 20:19:41 +00:00
Karl Tomlinson
a871c0a392 Bug 1469716 allow transparency mode to be set appropriately according to whether drawing a titlebar r=stransky
The early return for non-popup windows was to workaround
https://bugzilla.mozilla.org/show_bug.cgi?id=1344839 which involved problems
with CleanLayerManagerRecursive().  In cases where layer manager configuration
does not change, there is no need to clean the layer manager and so no need to
return early.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 08:27:20 +00:00
Martin Stransky
d4ee7064f5 Bug 1567434 - [Wayland] Use dynamic popup hierarchy for tooltips/context menu only, r=jhorak
If the popup is a regular menu but GetParentMenuWidget() returns
nullptr, it's connected non-menu parent (bookmark toolbar for instance).

In this case use a parent given at nsWindow::Create() and don't attach it
to latest active popup as it has a real parent.

Depends on D39347

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

--HG--
extra : moz-landing-system : lando
2019-08-05 10:37:34 +00:00