tor-browser

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

commit 5beff46081b4718b58399181683bf29123b9dab9
parent b8647f6fa77b4b9f70b347d0f062ba45b4b847a2
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Thu,  9 Oct 2025 20:02:53 +0000

Bug 1993570 - Use views a bit less in nsMenuPopupFrame. r=layout-reviewers,dshin

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

Diffstat:
Mlayout/xul/nsMenuPopupFrame.cpp | 14+++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp @@ -2116,15 +2116,11 @@ nsresult nsMenuPopupFrame::AttributeChanged(int32_t aNameSpaceID, if (aAttribute == nsGkAtoms::label) { // set the label for the titlebar - nsView* view = GetView(); - if (view) { - nsIWidget* widget = view->GetWidget(); - if (widget) { - nsAutoString title; - mContent->AsElement()->GetAttr(nsGkAtoms::label, title); - if (!title.IsEmpty()) { - widget->SetTitle(title); - } + if (nsIWidget* widget = GetWidget()) { + nsAutoString title; + mContent->AsElement()->GetAttr(nsGkAtoms::label, title); + if (!title.IsEmpty()) { + widget->SetTitle(title); } } } else if (aAttribute == nsGkAtoms::ignorekeys) {