Date: Tue, 12 Mar 2019 00:59:04 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r495404 - in head/www/firefox: . files Message-ID: <201903120059.x2C0x43f046302@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Tue Mar 12 00:59:03 2019 New Revision: 495404 URL: https://svnweb.freebsd.org/changeset/ports/495404 Log: www/firefox: add one more WeBrender+Wayland fix Added: head/www/firefox/files/patch-bug1532024 (contents, props changed) Modified: head/www/firefox/Makefile (contents, props changed) Modified: head/www/firefox/Makefile ============================================================================== --- head/www/firefox/Makefile Tue Mar 12 00:55:59 2019 (r495403) +++ head/www/firefox/Makefile Tue Mar 12 00:59:03 2019 (r495404) @@ -3,6 +3,7 @@ PORTNAME= firefox DISTVERSION= 66.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ Added: head/www/firefox/files/patch-bug1532024 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox/files/patch-bug1532024 Tue Mar 12 00:59:03 2019 (r495404) @@ -0,0 +1,106 @@ +commit 554777b1d130 +Author: sotaro <sotaro.ikeda.g@gmail.com> +Date: Wed Mar 6 08:17:51 2019 +0000 + + Bug 1532024 - Handle a case that GetRemoteRenderer() returned nullptr r=stransky + + Differential Revision: https://phabricator.services.mozilla.com/D21831 + + --HG-- + extra : moz-landing-system : lando +--- + widget/gtk/nsWindow.cpp | 27 ++++++++++++++++++--------- + widget/gtk/nsWindow.h | 3 +++ + 2 files changed, 21 insertions(+), 9 deletions(-) + +diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp +index 96faeea1cf87..46956412f341 100644 +--- widget/gtk/nsWindow.cpp ++++ widget/gtk/nsWindow.cpp +@@ -399,6 +399,10 @@ nsWindow::nsWindow() { + mXDepth = 0; + #endif /* MOZ_X11 */ + ++#ifdef MOZ_WAYLAND ++ mNeedsUpdatingEGLSurface = false; ++#endif ++ + if (!gGlobalsInitialized) { + gGlobalsInitialized = true; + +@@ -1872,12 +1876,14 @@ static bool ExtractExposeRegion(LayoutDeviceIntRegion &aRegion, cairo_t *cr) { + void nsWindow::WaylandEGLSurfaceForceRedraw() { + MOZ_RELEASE_ASSERT(NS_IsMainThread()); + +- if (mIsDestroyed) { ++ if (mIsDestroyed || !mNeedsUpdatingEGLSurface) { + return; + } + +- if (CompositorBridgeChild* remoteRenderer = GetRemoteRenderer()) { ++ if (CompositorBridgeChild *remoteRenderer = GetRemoteRenderer()) { ++ MOZ_ASSERT(mCompositorWidgetDelegate); + if (mCompositorWidgetDelegate) { ++ mNeedsUpdatingEGLSurface = false; + mCompositorWidgetDelegate->RequestsUpdatingEGLSurface(); + } + remoteRenderer->SendForcePresent(); +@@ -3483,10 +3489,10 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent, + #ifdef MOZ_WAYLAND + if (!mIsX11Display && ComputeShouldAccelerate()) { + RefPtr<nsWindow> self(this); +- moz_container_set_initial_draw_callback(mContainer, +- [self]() -> void { +- self->WaylandEGLSurfaceForceRedraw(); +- }); ++ moz_container_set_initial_draw_callback(mContainer, [self]() -> void { ++ self->mNeedsUpdatingEGLSurface = true; ++ self->WaylandEGLSurfaceForceRedraw(); ++ }); + } + #endif + +@@ -6058,6 +6064,9 @@ void nsWindow::SetCompositorWidgetDelegate(CompositorWidgetDelegate *delegate) { + MOZ_ASSERT(mCompositorWidgetDelegate, + "nsWindow::SetCompositorWidgetDelegate called with a " + "non-PlatformCompositorWidgetDelegate"); ++#ifdef MOZ_WAYLAND ++ WaylandEGLSurfaceForceRedraw(); ++#endif + } else { + mCompositorWidgetDelegate = nullptr; + } +@@ -6543,8 +6552,7 @@ nsWindow::CSDSupportLevel nsWindow::GetSystemCSDSupportLevel() { + // Check for Mutter regression on X.org (Bug 1530252). In that case we + // don't hide system titlebar by default as we can't draw transparent + // corners reliably. +-bool nsWindow::TitlebarCanUseShapeMask() +-{ ++bool nsWindow::TitlebarCanUseShapeMask() { + static int canUseShapeMask = -1; + if (canUseShapeMask != -1) { + return canUseShapeMask; +@@ -6574,7 +6582,8 @@ bool nsWindow::HideTitlebarByDefault() { + // When user defined widget.default-hidden-titlebar don't do any + // heuristics and just follow it. + if (Preferences::HasUserValue("widget.default-hidden-titlebar")) { +- hideTitlebar = Preferences::GetBool("widget.default-hidden-titlebar", false); ++ hideTitlebar = ++ Preferences::GetBool("widget.default-hidden-titlebar", false); + return hideTitlebar; + } + +diff --git widget/gtk/nsWindow.h widget/gtk/nsWindow.h +index 309905757431..ae2ebd350af4 100644 +--- widget/gtk/nsWindow.h ++++ widget/gtk/nsWindow.h +@@ -433,6 +433,9 @@ class nsWindow final : public nsBaseWidget { + bool mIsDragPopup; + // Can we access X? + bool mIsX11Display; ++#ifdef MOZ_WAYLAND ++ bool mNeedsUpdatingEGLSurface; ++#endif + + private: + void DestroyChildWindows();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903120059.x2C0x43f046302>