commit 3965a4a39d48b5cac30f22dce85e494c6676b64e parent 19a8af49bf9706cf23e5f5735e8b17ce132e6e38 Author: agoloman <agoloman@mozilla.com> Date: Sat, 22 Nov 2025 01:03:14 +0200 Revert "Bug 1905212 - Allow less flickering in the performance tests, don't render the sidebar launcher when hidden. r=nsharpley" for causing bc failures @browser_a11y_sidebar.js. This reverts commit 4739a0951cc79979b2955e011f06481f4d6ca6fc. Diffstat:
5 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/browser/base/content/test/performance/browser.toml b/browser/base/content/test/performance/browser.toml @@ -16,6 +16,8 @@ prefs = [ # For perfomance tests do not enable the remote control cue, which gets set # when Marionette is enabled, but users normally don't see. "browser.chrome.disableRemoteControlCueForTests=true", + # Need to keep the revamped sidebar off until Bug 1905212 is done + "sidebar.revamp=false", ] support-files = ["head.js"] diff --git a/browser/base/content/test/performance/head.js b/browser/base/content/test/performance/head.js @@ -1013,7 +1013,7 @@ async function checkLoadedScripts({ // window for some reason. See bug 1445161. This function allows to deal with // that in a central place. function isLikelyFocusChange(rects, frame) { - if (rects.length >= 3 && rects.every(r => r.y2 < 100)) { + if (rects.length > 3 && rects.every(r => r.y2 < 100)) { // There are at least 4 areas that changed near the top of the screen. // Note that we need a bit more leeway than the titlebar height, because on // OSX other toolbarbuttons in the navigation toolbar also get disabled diff --git a/browser/components/customizableui/test/browser_sidebar_toggle.js b/browser/components/customizableui/test/browser_sidebar_toggle.js @@ -13,19 +13,6 @@ registerCleanupFunction(async function () { } }); -async function ensureSidebarLauncherIsVisible() { - await TestUtils.waitForTick(); - // Show the sidebar launcher if its hidden - if (SidebarController.sidebarContainer.hidden) { - document.getElementById("sidebar-button").doCommand(); - } - await TestUtils.waitForTick(); - Assert.ok( - BrowserTestUtils.isVisible(SidebarController.sidebarMain), - "Sidebar launcher is visible" - ); -} - var showSidebar = async function (win = window) { let button = win.document.getElementById("sidebar-button"); let sidebarFocusedPromise = BrowserTestUtils.waitForEvent( @@ -81,7 +68,7 @@ add_task(async function () { await hideSidebar(); } else { const sidebar = document.querySelector("sidebar-main"); - await ensureSidebarLauncherIsVisible(); + ok(sidebar, "Sidebar is shown."); for (const [index, toolButton] of sidebar.toolButtons.entries()) { await SidebarController.toggle(toolButton.getAttribute("view")); is( diff --git a/browser/components/sidebar/SidebarState.sys.mjs b/browser/components/sidebar/SidebarState.sys.mjs @@ -468,7 +468,6 @@ export class SidebarState { this.#launcherEverVisible = true; } this.#launcherContainerEl.hidden = !visible; - this.#launcherEl.requestUpdate(); this.#updateTabbrowser(visible); this.#sidebarBoxEl.style.paddingInlineStart = this.panelOpen && !visible ? "var(--space-small)" : "unset"; diff --git a/browser/components/sidebar/sidebar-main.mjs b/browser/components/sidebar/sidebar-main.mjs @@ -776,11 +776,6 @@ export default class SidebarMain extends MozLitElement { ); } - shouldUpdate() { - const container = window.SidebarController.sidebarContainer; - return container && !container.hidden; - } - render() { /* Add 1 to tools and extensions count for "Customize sidebar" option */ let enabledToolsAndExtensionsCount =