tor-browser

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

commit 958d42472935744332be3b4e4721bd0cf02e8759
parent 78c420564d75a9d5bbdabd2f462ad88a02333b9f
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Tue, 28 Oct 2025 22:55:23 +0000

Bug 1996661 - Remove unused fade attribute for panels. r=desktop-theme-reviewers,hjones

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

Diffstat:
Mtoolkit/content/widgets/panel.js | 27+--------------------------
1 file changed, 1 insertion(+), 26 deletions(-)

diff --git a/toolkit/content/widgets/panel.js b/toolkit/content/widgets/panel.js @@ -15,7 +15,6 @@ super(); this._prevFocus = 0; - this._fadeTimer = null; this.attachShadow({ mode: "open" }); @@ -146,23 +145,6 @@ // it is removed when popupshown fires this.setAttribute("animating", "true"); } - - // set fading - var fade = this.getAttribute("fade"); - var fadeDelay = 0; - if (fade == "fast") { - fadeDelay = 1; - } else if (fade == "slow") { - fadeDelay = 4000; - } - - if (fadeDelay != 0) { - this._fadeTimer = setTimeout( - () => this.hidePopup(true), - fadeDelay, - this - ); - } } // Capture the previous focus before has a chance to get set inside the panel @@ -192,14 +174,7 @@ on_popuphiding(event) { if (this.isArrowPanel && event.target == this) { - let animate = this.getAttribute("animate") != "false"; - - if (this._fadeTimer) { - clearTimeout(this._fadeTimer); - if (animate) { - this.setAttribute("animate", "fade"); - } - } else if (animate) { + if (this.getAttribute("animate") != "false") { this.setAttribute("animate", "cancel"); }