commit 3b4d8f108883ffbb08269ca07ee6bf1a08852796
parent 66524bcb3f11b9198d77a26aeb76f97b34d8b3b8
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date: Sat, 18 Oct 2025 04:04:24 +0000
Bug 1995081 - Fix accidentally introduced behavior change on HeadlessWidget.
Move() calls SetSizeMode() which we don't want here.
Differential Revision: https://phabricator.services.mozilla.com/D269133
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/widget/headless/HeadlessWidget.cpp b/widget/headless/HeadlessWidget.cpp
@@ -272,7 +272,10 @@ void HeadlessWidget::ResizeInternal(int32_t aWidth, int32_t aHeight,
}
void HeadlessWidget::Resize(const DesktopRect& aRect, bool aRepaint) {
- Move(aRect.TopLeft());
+ auto tl =
+ LayoutDeviceIntPoint::Round(aRect.TopLeft() * GetDesktopToDeviceScale());
+ // Intentionally to avoid SetSizeMode() call in Move().
+ MoveInternal(tl.x, tl.y);
Resize(aRect.Size(), aRepaint);
}