tor-browser

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

commit 3826fb528daf61c80a9a214bb5dadbbfb828b543
parent c312d825926cb411dd3260e4d8ca8d91a084249a
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Thu,  9 Oct 2025 19:56:11 +0000

Bug 1993570 - Minor simplification to XULPopupElement::GetOuterScreenRect. r=layout-reviewers,dshin

No behavior change.

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

Diffstat:
Mdom/xul/XULPopupElement.cpp | 10+++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/dom/xul/XULPopupElement.cpp b/dom/xul/XULPopupElement.cpp @@ -294,14 +294,10 @@ already_AddRefed<DOMRect> XULPopupElement::GetOuterScreenRect() { // instead, which at least has the position at which we were intending to // open the menu. screenRect = Some(CSSRect(menuPopupFrame->GetScreenAnchorRect())); - } else { + } else if (nsIWidget* widget = menuPopupFrame->GetWidget()) { // For non-native menus, query the bounds from the widget. - if (nsView* view = menuPopupFrame->GetView()) { - if (nsIWidget* widget = view->GetWidget()) { - screenRect = Some(widget->GetScreenBounds() / - menuPopupFrame->PresContext()->CSSToDevPixelScale()); - } - } + screenRect = Some(widget->GetScreenBounds() / + menuPopupFrame->PresContext()->CSSToDevPixelScale()); } if (screenRect) {