From bc4443fda98d5998451b752e77686920ad63b5a3 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Sun, 11 Jan 2026 19:37:15 +0100 Subject: [PATCH] feat: Make sure to enable animations and spaces when running PGO testings, b=no-bug, c=common, workspaces --- .../components/tabbrowser/content/tabbrowser-js.patch | 4 ++-- src/zen/common/modules/ZenUIManager.mjs | 5 ++++- src/zen/workspaces/ZenWorkspaces.mjs | 7 +------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index a8365a0ab..e14cb6678 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..f3966d85049735538b24424f42d4a690eaf7bbec 100644 +index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..64b6fc581be1791ef9a750e03ab9a91c92325be3 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -398,6 +398,7 @@ @@ -591,7 +591,7 @@ index 0eaca7a58e0026237b71b2ad515efe84d9e8c779..f3966d85049735538b24424f42d4a690 Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId); aTab._closeTimeAnimTimerId = null; - this._endRemoveTab(aTab); -+ if (animate && !gReduceMotion && !gZenUIManager.testingEnabled) { ++ if (animate && !gReduceMotion && !(gZenUIManager.testingEnabled && !gZenUIManager.profilingEnabled)) { + gZenVerticalTabsManager.animateTabClose(aTab, (animate && !gReduceMotion)).then(() => { + this._endRemoveTab(aTab); + }); diff --git a/src/zen/common/modules/ZenUIManager.mjs b/src/zen/common/modules/ZenUIManager.mjs index 55b793e4a..d6d3f5892 100644 --- a/src/zen/common/modules/ZenUIManager.mjs +++ b/src/zen/common/modules/ZenUIManager.mjs @@ -10,6 +10,7 @@ window.gZenUIManager = { _hoverPausedForExpand: false, _hasLoadedDOM: false, testingEnabled: Services.prefs.getBoolPref('zen.testing.enabled', false), + profilingEnabled: Services.prefs.getBoolPref('zen.testing.profiling.enabled', false), _lastClickPosition: null, @@ -857,7 +858,9 @@ window.gZenVerticalTabsManager = { !aItem || !gZenUIManager._hasLoadedDOM || !aItem.isConnected || - gZenUIManager.testingEnabled || + // We do want to do some animations during testing with profiling enabled + // so we can capture and improve them. + (gZenUIManager.testingEnabled && !gZenUIManager.profilingEnabled) || !gZenStartup.isReady || aItem.group?.hasAttribute('split-view-group') ) { diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 8c28b6da6..9b51fa5f2 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -777,12 +777,7 @@ class nsZenWorkspaces { } get workspaceEnabled() { - if (typeof this._workspaceEnabled === 'undefined') { - this._workspaceEnabled = - this.shouldHaveWorkspaces && - !Services.prefs.getBoolPref('zen.testing.profiling.enabled', false); - } - return this._workspaceEnabled && !window.closed; + return this.shouldHaveWorkspaces && !window.closed; } getActiveWorkspaceFromCache() {