tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 97db2d6fd7bb9cfdaa2fddf8c2054eef7a593262
parent 6a3dc6db5ef4b986dec4256c0964e65223f2b90c
Author: Cristina Horotan <chorotan@mozilla.com>
Date:   Mon, 15 Dec 2025 11:38:53 +0200

Revert "Bug 2004350 [KDE] Don't use stable subsurface rounding on KDE r=emilio" for causing build bustage on WaylandSurface.cpp

This reverts commit 9ea357021925d50a7d3c203011a0c75d54cbad04.

Diffstat:
Mwidget/gtk/WaylandSurface.cpp | 5+----
Mwidget/gtk/nsWindow.cpp | 9+--------
Mwidget/gtk/nsWindow.h | 8--------
3 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/widget/gtk/WaylandSurface.cpp b/widget/gtk/WaylandSurface.cpp @@ -941,12 +941,9 @@ bool WaylandSurface::RemoveOpaqueSurfaceHandlerLocked( LayoutDeviceIntSize WaylandSurface::GetScaledSize( const DesktopIntSize& aSize) const { - DesktopIntRect rect( - gUseStableRounding ? mSubsurfacePosition : DesktopIntPoint(), aSize); - + DesktopIntRect rect(mSubsurfacePosition, aSize); auto scaledRect = LayoutDeviceIntRect::Round(rect * DesktopToLayoutDeviceScale(GetScale())); - LOGVERBOSE( "WaylandSurface::GetScaledSize() pos [%d, %d] size [%d x %d] scale %f " "scaled [%d x %d]", diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp @@ -357,7 +357,6 @@ static nsWindow* gFocusWindow = nullptr; static bool gBlockActivateEvent = false; static bool gGlobalsInitialized = false; static bool gUseAspectRatio = true; -bool gUseStableRounding = true; static uint32_t gLastTouchID = 0; // See Bug 1777269 for details. We don't know if the suspected leave notify // event is a correct one when we get it. @@ -593,10 +592,7 @@ void nsWindow::DispatchResized() { return; } - auto clientSize = gUseStableRounding - ? GetClientSize() - : LayoutDeviceIntSize::Round(mClientArea.Size() * - GetDesktopToDeviceScale()); + auto clientSize = GetClientSize(); LOG("nsWindow::DispatchResized() client scaled size [%d, %d]", (int)clientSize.width, (int)clientSize.height); @@ -8808,9 +8804,6 @@ static nsresult initialize_prefs(void) { } else { gUseAspectRatio = IsGnomeDesktopEnvironment() || IsKdeDesktopEnvironment(); } - // 'Stable' Wayland subsurface rounding algorithm is used by all compositors - // except KDE. - gUseStableRounding = !IsKdeDesktopEnvironment() || GdkIsX11Display(); return NS_OK; } diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h @@ -108,14 +108,6 @@ struct _GdkEventTouchpadPinch; typedef struct _GdkEventTouchpadPinch GdkEventTouchpadPinch; #endif -// 'Stable' Wayland subsurface rounding algorithm is used by all compositors -// except KDE. -// See -// https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/143#note_1343171 -// for details. -// We want to replace it by wp-fractional-scale-v2 when it's available. -extern bool gUseStableRounding; - #if !GTK_CHECK_VERSION(3, 22, 0) typedef enum { GDK_ANCHOR_FLIP_X = 1 << 0,