tor-browser

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

commit 9d8043b2b7b07928d14e97c93d637696d21d2c4a
parent a2586e4723b725d111ec72b3f090d1ecd62a04c7
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Tue,  9 Dec 2025 12:28:51 +0000

Bug 1999838 - Don't lose a client-area-changing bounds change. r=stransky

The problematic sequence here is that we get:

 * _NET_FRAME_EXTENTS change. Schedules a pending bounds change with
   recomputation of the client area.
 * State change which directly calls RecomputeBounds(false)

The later call loses the mPendingBoundsChangeMayChangeCsdMargin.

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

Diffstat:
Mwidget/gtk/nsWindow.cpp | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp @@ -3501,8 +3501,10 @@ void nsWindow::RecomputeBounds(bool aMayChangeCsdMargin, bool aScaleChange) { LOG("RecomputeBounds() margin %d scale change %d", aMayChangeCsdMargin, aScaleChange); - mPendingBoundsChange = false; - mPendingBoundsChangeMayChangeCsdMargin = false; + if (aMayChangeCsdMargin || !mPendingBoundsChangeMayChangeCsdMargin) { + mPendingBoundsChange = false; + mPendingBoundsChangeMayChangeCsdMargin = false; + } auto* toplevel = GetToplevelGdkWindow(); if (!toplevel || mIsDestroyed) {