commit c7997e56c7aea32e34550892084980c0b582bbbf
parent 9b29eed8549a894f23289bec6e60b57754f95cc6
Author: Moritz Beier <mbeier@mozilla.com>
Date: Wed, 3 Dec 2025 14:08:13 +0000
Bug 1927942 - Remove gURLBar.onWidgetAfterDOMChange callback. r=emilio,dao,urlbar-reviewers
This is not needed anymore because showPopover is called from connectedCallback
Differential Revision: https://phabricator.services.mozilla.com/D274435
Diffstat:
1 file changed, 0 insertions(+), 29 deletions(-)
diff --git a/browser/components/urlbar/content/UrlbarInput.mjs b/browser/components/urlbar/content/UrlbarInput.mjs
@@ -20,8 +20,6 @@ const lazy = XPCOMUtils.declareLazy({
"moz-src:///browser/components/search/BrowserSearchTelemetry.sys.mjs",
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
- CustomizableUI:
- "moz-src:///browser/components/customizableui/CustomizableUI.sys.mjs",
ExtensionSearchHandler:
"resource://gre/modules/ExtensionSearchHandler.sys.mjs",
ExtensionUtils: "resource://gre/modules/ExtensionUtils.sys.mjs",
@@ -400,9 +398,6 @@ export class UrlbarInput extends HTMLElement {
// recording abandonment events when the command causes a blur event.
this.view.panel.addEventListener("command", this, true);
- lazy.CustomizableUI.addListener(this);
-
- this.window.addEventListener("unload", this);
this.window.addEventListener("customizationstarting", this);
this.window.addEventListener("aftercustomization", this);
this.window.addEventListener("toolbarvisibilitychange", this);
@@ -486,10 +481,6 @@ export class UrlbarInput extends HTMLElement {
// recording abandonment events when the command causes a blur event.
this.view.panel.removeEventListener("command", this, true);
- lazy.CustomizableUI.removeListener(this);
-
- this.window.removeEventListener("unload", this);
-
this.window.removeEventListener("customizationstarting", this);
this.window.removeEventListener("aftercustomization", this);
this.window.removeEventListener("toolbarvisibilitychange", this);
@@ -5478,8 +5469,6 @@ export class UrlbarInput extends HTMLElement {
this.blur();
}
- // TODO(emilio, bug 1927942): Consider removing this listener and using
- // onCustomizeEnd.
_on_aftercustomization() {
this.decrementBreakoutBlockerCount();
this.#updateLayoutBreakout();
@@ -5492,24 +5481,6 @@ export class UrlbarInput extends HTMLElement {
this.#updateLayoutBreakout();
}
- // CustomizableUI might unbind and bind us again, which makes us lose the
- // popover state, which this fixes up. This can easily happen outside of
- // customize mode with a call to CustomizableUI.reset().
- // TODO(emilio): Do we need some of the on-aftercustomization fixups here?
- onWidgetAfterDOMChange(aNode) {
- if (aNode != this.parentNode || !this.hasAttribute("breakout")) {
- return;
- }
- if (!this.matches(":popover-open")) {
- this.showPopover();
- }
- this.#updateTextboxPositionNextFrame();
- }
-
- _on_unload() {
- lazy.CustomizableUI.removeListener(this);
- }
-
_on_toolbarvisibilitychange() {
this.#updateTextboxPositionNextFrame();
}