tor-browser

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

commit 9bba5ff6a8124f94b8f6353f715c305df2568411
parent 2b92c4f86d82faa200e4e6f7e7f04f08302b7f67
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Thu, 30 Oct 2025 22:59:12 +0000

Bug 1995976 - Ensure nsWindow resize bounds are not empty. r=stransky

This popup can get empty legitimately and when that happens we might end
up bailing on the move (because AreBoundsSane() returns false), which
causes following badness.

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

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

diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp @@ -933,6 +933,8 @@ void nsWindow::ConstrainSize(int* aWidth, int* aHeight) { nsIWidget::ConstrainSize(aWidth, aHeight); *aWidth += mClientMargin.LeftRight(); *aHeight += mClientMargin.TopBottom(); + *aWidth = std::max(*aWidth, 1); + *aHeight = std::max(*aHeight, 1); } void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints) {