forked from ZenBrowserMirrors/zen-desktop
Merge branch 'dev' into synced-workspaces
This commit is contained in:
commit
d5cfdfbb43
8 changed files with 115 additions and 101 deletions
|
@ -226,9 +226,6 @@ pref('zen.watermark.enabled', false, sticky);
|
||||||
pref('dom.private-attribution.submission.enabled', false);
|
pref('dom.private-attribution.submission.enabled', false);
|
||||||
pref('dom.security.https_only_mode', true);
|
pref('dom.security.https_only_mode', true);
|
||||||
|
|
||||||
// Enable EME
|
|
||||||
pref('media.eme.enabled', true);
|
|
||||||
|
|
||||||
// Crash reports
|
// Crash reports
|
||||||
pref("breakpad.reportURL", "");
|
pref("breakpad.reportURL", "");
|
||||||
pref("browser.tabs.crashReporting.sendReport", false);
|
pref("browser.tabs.crashReporting.sendReport", false);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66f0137ad2 100644
|
index 6dece2b9d0462d90a28e75350ce983d87816ef73..a285c5cbc23eaeebc8248b950c0275645f8a5cd3 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
@@ -415,11 +415,58 @@
|
@@ -415,11 +415,58 @@
|
||||||
|
@ -389,17 +389,23 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
);
|
);
|
||||||
tabsFragment.appendChild(tabGroup.node);
|
tabsFragment.appendChild(tabGroup.node);
|
||||||
}
|
}
|
||||||
@@ -3726,6 +3866,9 @@
|
@@ -3723,8 +3863,15 @@
|
||||||
|
// to remove the old selected tab.
|
||||||
|
if (tabToSelect) {
|
||||||
|
let leftoverTab = this.selectedTab;
|
||||||
|
+ if (tabToSelect.pinned) {
|
||||||
|
+ ZenWorkspaces._tabToRemoveForEmpty = leftoverTab;
|
||||||
|
+ } else {
|
||||||
this.selectedTab = tabToSelect;
|
this.selectedTab = tabToSelect;
|
||||||
this.removeTab(leftoverTab);
|
this.removeTab(leftoverTab);
|
||||||
}
|
+ }
|
||||||
|
+ }
|
||||||
+ else {
|
+ else {
|
||||||
+ this.selectedTab._possiblyEmpty = this.selectedTab.isEmpty; // Not needed, but just in case.
|
+ this.selectedTab._possiblyEmpty = this.selectedTab.isEmpty; // Not needed, but just in case.
|
||||||
+ }
|
}
|
||||||
|
|
||||||
if (tabs.length > 1 || !tabs[0].selected) {
|
if (tabs.length > 1 || !tabs[0].selected) {
|
||||||
this._updateTabsAfterInsert();
|
@@ -3912,7 +4059,7 @@
|
||||||
@@ -3912,7 +4055,7 @@
|
|
||||||
// Ensure we have an index if one was not provided.
|
// Ensure we have an index if one was not provided.
|
||||||
if (typeof index != "number") {
|
if (typeof index != "number") {
|
||||||
// Move the new tab after another tab if needed, to the end otherwise.
|
// Move the new tab after another tab if needed, to the end otherwise.
|
||||||
|
@ -408,7 +414,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
if (
|
if (
|
||||||
!bulkOrderedOpen &&
|
!bulkOrderedOpen &&
|
||||||
((openerTab &&
|
((openerTab &&
|
||||||
@@ -3958,18 +4101,18 @@
|
@@ -3958,18 +4105,18 @@
|
||||||
|
|
||||||
// Ensure index is within bounds.
|
// Ensure index is within bounds.
|
||||||
if (tab.pinned) {
|
if (tab.pinned) {
|
||||||
|
@ -431,7 +437,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
|
if (this.isTab(itemAfter) && itemAfter.group == tabGroup) {
|
||||||
// Place at the front of, or between tabs in, the same tab group
|
// Place at the front of, or between tabs in, the same tab group
|
||||||
this.tabContainer.insertBefore(tab, itemAfter);
|
this.tabContainer.insertBefore(tab, itemAfter);
|
||||||
@@ -4290,6 +4433,9 @@
|
@@ -4290,6 +4437,9 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +447,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
this.removeTabs(selectedTabs, { telemetrySource });
|
this.removeTabs(selectedTabs, { telemetrySource });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4542,6 +4688,7 @@
|
@@ -4542,6 +4692,7 @@
|
||||||
telemetrySource,
|
telemetrySource,
|
||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
|
@ -449,7 +455,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||||
// can be considered equivalent to closing the window.
|
// can be considered equivalent to closing the window.
|
||||||
if (
|
if (
|
||||||
@@ -4626,6 +4773,7 @@
|
@@ -4626,6 +4777,7 @@
|
||||||
if (lastToClose) {
|
if (lastToClose) {
|
||||||
this.removeTab(lastToClose, aParams);
|
this.removeTab(lastToClose, aParams);
|
||||||
}
|
}
|
||||||
|
@ -457,7 +463,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
@@ -4650,6 +4798,7 @@
|
@@ -4650,6 +4802,7 @@
|
||||||
telemetrySource,
|
telemetrySource,
|
||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
|
@ -465,7 +471,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
if (UserInteraction.running("browser.tabs.opening", window)) {
|
if (UserInteraction.running("browser.tabs.opening", window)) {
|
||||||
UserInteraction.finish("browser.tabs.opening", window);
|
UserInteraction.finish("browser.tabs.opening", window);
|
||||||
}
|
}
|
||||||
@@ -4663,6 +4812,12 @@
|
@@ -4663,6 +4816,12 @@
|
||||||
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
|
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,7 +484,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
// Handle requests for synchronously removing an already
|
// Handle requests for synchronously removing an already
|
||||||
// asynchronously closing tab.
|
// asynchronously closing tab.
|
||||||
if (!animate && aTab.closing) {
|
if (!animate && aTab.closing) {
|
||||||
@@ -4677,7 +4832,9 @@
|
@@ -4677,7 +4836,9 @@
|
||||||
// frame created for it (for example, by updating the visually selected
|
// frame created for it (for example, by updating the visually selected
|
||||||
// state).
|
// state).
|
||||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||||
|
@ -489,7 +495,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
if (
|
if (
|
||||||
!this._beginRemoveTab(aTab, {
|
!this._beginRemoveTab(aTab, {
|
||||||
closeWindowFastpath: true,
|
closeWindowFastpath: true,
|
||||||
@@ -4840,7 +4997,7 @@
|
@@ -4840,7 +5001,7 @@
|
||||||
closeWindowWithLastTab != null
|
closeWindowWithLastTab != null
|
||||||
? closeWindowWithLastTab
|
? closeWindowWithLastTab
|
||||||
: !window.toolbar.visible ||
|
: !window.toolbar.visible ||
|
||||||
|
@ -498,7 +504,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
|
|
||||||
if (closeWindow) {
|
if (closeWindow) {
|
||||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||||
@@ -4864,6 +5021,7 @@
|
@@ -4864,6 +5025,7 @@
|
||||||
|
|
||||||
newTab = true;
|
newTab = true;
|
||||||
}
|
}
|
||||||
|
@ -506,7 +512,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||||
|
|
||||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||||
@@ -4903,9 +5061,7 @@
|
@@ -4903,9 +5065,7 @@
|
||||||
aTab._mouseleave();
|
aTab._mouseleave();
|
||||||
|
|
||||||
if (newTab) {
|
if (newTab) {
|
||||||
|
@ -517,7 +523,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
} else {
|
} else {
|
||||||
TabBarVisibility.update();
|
TabBarVisibility.update();
|
||||||
}
|
}
|
||||||
@@ -5034,6 +5190,8 @@
|
@@ -5034,6 +5194,8 @@
|
||||||
this.tabs[i]._tPos = i;
|
this.tabs[i]._tPos = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +532,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
if (!this._windowIsClosing) {
|
if (!this._windowIsClosing) {
|
||||||
if (wasPinned) {
|
if (wasPinned) {
|
||||||
this.tabContainer._positionPinnedTabs();
|
this.tabContainer._positionPinnedTabs();
|
||||||
@@ -5159,8 +5317,8 @@
|
@@ -5159,8 +5321,8 @@
|
||||||
return closedCount;
|
return closedCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -537,7 +543,15 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
if (unloadBlocked) {
|
if (unloadBlocked) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -5260,13 +5418,13 @@
|
@@ -5247,6 +5409,7 @@
|
||||||
|
aExcludeTabs.push(FirefoxViewHandler.tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ aExcludeTabs.push(...ZenWorkspaces.getTabsToExclude(aTab));
|
||||||
|
let excludeTabs = new Set(aExcludeTabs);
|
||||||
|
|
||||||
|
// If this tab has a successor, it should be selectable, since
|
||||||
|
@@ -5260,13 +5423,13 @@
|
||||||
!excludeTabs.has(aTab.owner) &&
|
!excludeTabs.has(aTab.owner) &&
|
||||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||||
) {
|
) {
|
||||||
|
@ -553,7 +567,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
);
|
);
|
||||||
|
|
||||||
let tab = this.tabContainer.findNextTab(aTab, {
|
let tab = this.tabContainer.findNextTab(aTab, {
|
||||||
@@ -5282,7 +5440,7 @@
|
@@ -5282,7 +5445,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tab) {
|
if (tab) {
|
||||||
|
@ -562,7 +576,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no qualifying visible tab was found, see if there is a tab in
|
// If no qualifying visible tab was found, see if there is a tab in
|
||||||
@@ -5303,7 +5461,7 @@
|
@@ -5303,7 +5466,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,7 +585,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
}
|
}
|
||||||
|
|
||||||
_blurTab(aTab) {
|
_blurTab(aTab) {
|
||||||
@@ -5704,10 +5862,10 @@
|
@@ -5704,10 +5867,10 @@
|
||||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,7 +598,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
aTab.selected ||
|
aTab.selected ||
|
||||||
aTab.closing ||
|
aTab.closing ||
|
||||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||||
@@ -6001,7 +6159,7 @@
|
@@ -6001,7 +6164,7 @@
|
||||||
|
|
||||||
// Don't allow mixing pinned and unpinned tabs.
|
// Don't allow mixing pinned and unpinned tabs.
|
||||||
if (this.isTab(element) && element.pinned) {
|
if (this.isTab(element) && element.pinned) {
|
||||||
|
@ -593,7 +607,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
} else {
|
} else {
|
||||||
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
||||||
}
|
}
|
||||||
@@ -6028,9 +6186,16 @@
|
@@ -6028,9 +6191,16 @@
|
||||||
element,
|
element,
|
||||||
() => {
|
() => {
|
||||||
let neighbor = this.tabs[tabIndex];
|
let neighbor = this.tabs[tabIndex];
|
||||||
|
@ -611,7 +625,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
||||||
neighbor.after(element);
|
neighbor.after(element);
|
||||||
} else {
|
} else {
|
||||||
@@ -6099,7 +6264,9 @@
|
@@ -6099,7 +6269,9 @@
|
||||||
targetElement = targetElement.group;
|
targetElement = targetElement.group;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -622,7 +636,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
// Don't allow mixing pinned and unpinned tabs.
|
// Don't allow mixing pinned and unpinned tabs.
|
||||||
if (element.pinned && !targetElement?.pinned) {
|
if (element.pinned && !targetElement?.pinned) {
|
||||||
targetElement = this.tabs[this.pinnedTabCount - 1];
|
targetElement = this.tabs[this.pinnedTabCount - 1];
|
||||||
@@ -6109,7 +6276,13 @@
|
@@ -6109,7 +6281,13 @@
|
||||||
moveBefore = true;
|
moveBefore = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -636,7 +650,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
if (element.pinned && this.tabContainer.verticalMode) {
|
if (element.pinned && this.tabContainer.verticalMode) {
|
||||||
return this.tabContainer.verticalPinnedTabsContainer;
|
return this.tabContainer.verticalPinnedTabsContainer;
|
||||||
}
|
}
|
||||||
@@ -6169,7 +6342,7 @@
|
@@ -6169,7 +6347,7 @@
|
||||||
if (!this.isTab(aTab)) {
|
if (!this.isTab(aTab)) {
|
||||||
throw new Error("Can only move a tab into a tab group");
|
throw new Error("Can only move a tab into a tab group");
|
||||||
}
|
}
|
||||||
|
@ -645,7 +659,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||||
@@ -6263,6 +6436,10 @@
|
@@ -6263,6 +6441,10 @@
|
||||||
|
|
||||||
moveActionCallback();
|
moveActionCallback();
|
||||||
|
|
||||||
|
@ -656,7 +670,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||||
// changed.
|
// changed.
|
||||||
this.tabContainer._invalidateCachedTabs();
|
this.tabContainer._invalidateCachedTabs();
|
||||||
@@ -7080,7 +7257,7 @@
|
@@ -7080,7 +7262,7 @@
|
||||||
// preventDefault(). It will still raise the window if appropriate.
|
// preventDefault(). It will still raise the window if appropriate.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -665,7 +679,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
window.focus();
|
window.focus();
|
||||||
aEvent.preventDefault();
|
aEvent.preventDefault();
|
||||||
break;
|
break;
|
||||||
@@ -7981,6 +8158,7 @@
|
@@ -7981,6 +8163,7 @@
|
||||||
aWebProgress.isTopLevel
|
aWebProgress.isTopLevel
|
||||||
) {
|
) {
|
||||||
this.mTab.setAttribute("busy", "true");
|
this.mTab.setAttribute("busy", "true");
|
||||||
|
@ -673,7 +687,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||||
}
|
}
|
||||||
@@ -8954,7 +9132,7 @@ var TabContextMenu = {
|
@@ -8954,7 +9137,7 @@ var TabContextMenu = {
|
||||||
);
|
);
|
||||||
contextUnpinSelectedTabs.hidden =
|
contextUnpinSelectedTabs.hidden =
|
||||||
!this.contextTab.pinned || !this.multiselected;
|
!this.contextTab.pinned || !this.multiselected;
|
||||||
|
@ -682,7 +696,7 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..e80730ed2db404c0d47f2e29c3235c66
|
||||||
// Move Tab items
|
// Move Tab items
|
||||||
let contextMoveTabOptions = document.getElementById(
|
let contextMoveTabOptions = document.getElementById(
|
||||||
"context_moveTabOptions"
|
"context_moveTabOptions"
|
||||||
@@ -9223,6 +9401,7 @@ var TabContextMenu = {
|
@@ -9223,6 +9406,7 @@ var TabContextMenu = {
|
||||||
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP,
|
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
diff --git a/testing/profiles/profileserver/user.js b/testing/profiles/profileserver/user.js
|
diff --git a/testing/profiles/profileserver/user.js b/testing/profiles/profileserver/user.js
|
||||||
index 19ff7d474f6d22d2d386764e2e6942ce6a324470..b8a915b921e624c416d2ec379a2b54aedfcf9c36 100644
|
index 19ff7d474f6d22d2d386764e2e6942ce6a324470..531446847039fd683af52ac7fdfd601bea3cb624 100644
|
||||||
--- a/testing/profiles/profileserver/user.js
|
--- a/testing/profiles/profileserver/user.js
|
||||||
+++ b/testing/profiles/profileserver/user.js
|
+++ b/testing/profiles/profileserver/user.js
|
||||||
@@ -8,3 +8,12 @@
|
@@ -8,3 +8,13 @@
|
||||||
user_pref("dom.timeout.enable_budget_timer_throttling", false);
|
user_pref("dom.timeout.enable_budget_timer_throttling", false);
|
||||||
// Turn off update
|
// Turn off update
|
||||||
user_pref("app.update.disabledForTesting", true);
|
user_pref("app.update.disabledForTesting", true);
|
||||||
|
@ -14,4 +14,5 @@ index 19ff7d474f6d22d2d386764e2e6942ce6a324470..b8a915b921e624c416d2ec379a2b54ae
|
||||||
+user_pref("zen.watermark.enabled", false);
|
+user_pref("zen.watermark.enabled", false);
|
||||||
+user_pref("zen.urlbar.replace-newtab", false);
|
+user_pref("zen.urlbar.replace-newtab", false);
|
||||||
+user_pref("zen.testing.enabled", true);
|
+user_pref("zen.testing.enabled", true);
|
||||||
|
+user_pref("zen.testing.profiling.enabled", true);
|
||||||
+user_pref("dom.security.https_only_mode", false); // Dont ask why
|
+user_pref("dom.security.https_only_mode", false); // Dont ask why
|
||||||
|
|
|
@ -66,11 +66,7 @@ var gZenUIManager = {
|
||||||
tabs.style.removeProperty('flex');
|
tabs.style.removeProperty('flex');
|
||||||
tabs.style.maxHeight = height + 'px';
|
tabs.style.maxHeight = height + 'px';
|
||||||
gZenVerticalTabsManager.actualWindowButtons.removeAttribute('zen-has-hover');
|
gZenVerticalTabsManager.actualWindowButtons.removeAttribute('zen-has-hover');
|
||||||
try {
|
gZenVerticalTabsManager.recalculateURLBarHeight();
|
||||||
gURLBar.zenUpdateLayoutBreakout();
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error updating layout breakout:', error);
|
|
||||||
}
|
|
||||||
if (!this._preventToolbarRebuild) {
|
if (!this._preventToolbarRebuild) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ZenWorkspaces.updateTabsContainers();
|
ZenWorkspaces.updateTabsContainers();
|
||||||
|
@ -629,7 +625,7 @@ var gZenVerticalTabsManager = {
|
||||||
document.getElementById('urlbar').removeAttribute('--urlbar-height');
|
document.getElementById('urlbar').removeAttribute('--urlbar-height');
|
||||||
if (!this._hasSetSingleToolbar) {
|
if (!this._hasSetSingleToolbar) {
|
||||||
document.getElementById('urlbar').style.setProperty('--urlbar-height', '32px');
|
document.getElementById('urlbar').style.setProperty('--urlbar-height', '32px');
|
||||||
} else {
|
} else if (gURLBar.getAttribute('breakout') !== 'true') {
|
||||||
try {
|
try {
|
||||||
gURLBar.zenUpdateLayoutBreakout();
|
gURLBar.zenUpdateLayoutBreakout();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -147,11 +147,28 @@
|
||||||
position: fixed;
|
position: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#urlbar[breakout-extend='true'] #urlbar-background {
|
#urlbar[breakout-extend='true'] {
|
||||||
box-shadow: 0px 0px 90px -10px rgba(0, 0, 0, 0.6) !important;
|
z-index: 2;
|
||||||
border: 1px solid hsla(0, 0%, 100%, 0.1) !important;
|
--urlbar-margin-inline: 5px;
|
||||||
backdrop-filter: none !important;
|
|
||||||
border-radius: 0.8rem !important;
|
& #identity-box {
|
||||||
|
margin-right: var(--urlbar-margin-inline);
|
||||||
|
}
|
||||||
|
|
||||||
|
& #urlbar-background {
|
||||||
|
/* We cant have a transparent background with a backdrop-filter because on normal websites,
|
||||||
|
the backdrop woudn't work, we would need to apply a clip-path to the site and that's not recommended
|
||||||
|
due to performance issues */
|
||||||
|
background-color: light-dark(
|
||||||
|
hsl(0, 0%, 100%),
|
||||||
|
color-mix(in srgb, hsl(0, 0%, 5%) 60%, var(--zen-colors-primary) 40%)
|
||||||
|
) !important;
|
||||||
|
box-shadow: 0px 0px 90px -10px rgba(0, 0, 0, 0.6) !important;
|
||||||
|
backdrop-filter: none !important;
|
||||||
|
border-radius: 1.1rem !important;
|
||||||
|
outline: 0.5px solid rgba(255, 255, 255, 0.15) !important;
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#urlbar-go-button {
|
#urlbar-go-button {
|
||||||
|
@ -414,28 +431,6 @@ button.popup-notification-dropmarker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#urlbar[open] {
|
|
||||||
z-index: 2;
|
|
||||||
--urlbar-margin-inline: 5px;
|
|
||||||
|
|
||||||
& #identity-box {
|
|
||||||
margin-right: var(--urlbar-margin-inline);
|
|
||||||
}
|
|
||||||
|
|
||||||
& #urlbar-background {
|
|
||||||
/* We cant have a transparent background with a backdrop-filter because on normal websites,
|
|
||||||
the backdrop woudn't work, we would need to apply a clip-path to the site and that's not recommended
|
|
||||||
due to performance issues */
|
|
||||||
background-color: light-dark(
|
|
||||||
hsl(0, 0%, 100%),
|
|
||||||
color-mix(in srgb, hsl(0, 0%, 5%) 90%, var(--zen-colors-primary) 10%)
|
|
||||||
) !important;
|
|
||||||
@media (-prefers-color-scheme: dark) {
|
|
||||||
outline: 1px solid rgba(0, 0, 0, 0.3) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:root[zen-single-toolbar='true'] {
|
:root[zen-single-toolbar='true'] {
|
||||||
#urlbar[open] {
|
#urlbar[open] {
|
||||||
min-width: min(90%, 40rem);
|
min-width: min(90%, 40rem);
|
||||||
|
@ -459,7 +454,7 @@ button.popup-notification-dropmarker {
|
||||||
font-size: 1.5em !important;
|
font-size: 1.5em !important;
|
||||||
width: min(90%, 60rem) !important;
|
width: min(90%, 60rem) !important;
|
||||||
}
|
}
|
||||||
top: 25vh !important;
|
top: 22svh !important;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
left: 50% !important;
|
left: 50% !important;
|
||||||
|
|
||||||
|
|
|
@ -1250,10 +1250,7 @@
|
||||||
gap: calc(var(--zen-toolbox-padding) - 2px);
|
gap: calc(var(--zen-toolbox-padding) - 2px);
|
||||||
transition: max-height 0.3s ease-out;
|
transition: max-height 0.3s ease-out;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(48px, 1fr) minmax(48px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(max(23.7%, 48px), 1fr));
|
||||||
&[data-hack-type='3'] {
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(calc(100% / 3 - 1%), auto));
|
|
||||||
}
|
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
min-width: calc(100% + var(--zen-toolbox-padding) * 2);
|
min-width: calc(100% + var(--zen-toolbox-padding) * 2);
|
||||||
padding: 0 var(--zen-toolbox-padding);
|
padding: 0 var(--zen-toolbox-padding);
|
||||||
|
|
|
@ -610,8 +610,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply a translateX to the tab strip to give the user feedback on the swipe
|
// Apply a translateX to the tab strip to give the user feedback on the swipe
|
||||||
const currentWorkspace = this.activeWorkspace;
|
const currentWorkspace = this.getActiveWorkspaceFromCache();
|
||||||
this._organizeWorkspaceStripLocations({ uuid: currentWorkspace }, true, translateX);
|
this._organizeWorkspaceStripLocations(currentWorkspace, true, translateX);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _handleSwipeEnd(event) {
|
async _handleSwipeEnd(event) {
|
||||||
|
@ -678,7 +678,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
|
|
||||||
get workspaceEnabled() {
|
get workspaceEnabled() {
|
||||||
if (typeof this._workspaceEnabled === 'undefined') {
|
if (typeof this._workspaceEnabled === 'undefined') {
|
||||||
this._workspaceEnabled = this.shouldHaveWorkspaces;
|
this._workspaceEnabled = this.shouldHaveWorkspaces && !Services.prefs.getBoolPref('zen.testing.profiling.enabled', false);
|
||||||
}
|
}
|
||||||
return this._workspaceEnabled && !window.closed;
|
return this._workspaceEnabled && !window.closed;
|
||||||
}
|
}
|
||||||
|
@ -784,13 +784,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
}
|
}
|
||||||
const currentTab = gBrowser.selectedTab;
|
const currentTab = gBrowser.selectedTab;
|
||||||
let showed = false;
|
let showed = false;
|
||||||
if (currentTab.pinned) {
|
if (this._tabToRemoveForEmpty) {
|
||||||
this.selectEmptyTab();
|
this.selectEmptyTab();
|
||||||
try {
|
gBrowser.removeTab(this._tabToRemoveForEmpty);
|
||||||
gZenTabUnloader.explicitUnloadTabs([currentTab]);
|
delete this._tabToRemoveForEmpty;
|
||||||
} catch (e) {
|
|
||||||
console.error('ZenWorkspaces: Error unloading tab', e);
|
|
||||||
}
|
|
||||||
showed = true;
|
showed = true;
|
||||||
} else {
|
} else {
|
||||||
const currentTabURL = currentTab.linkedBrowser?.currentURI?.spec;
|
const currentTabURL = currentTab.linkedBrowser?.currentURI?.spec;
|
||||||
|
@ -2032,7 +2029,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
);
|
);
|
||||||
for (const cloned of clonedEssentials) {
|
for (const cloned of clonedEssentials) {
|
||||||
const container = cloned.container;
|
const container = cloned.container;
|
||||||
const essentialsWorkspacess = cloned.workspaces;
|
const essentialsWorkspaces = cloned.workspaces;
|
||||||
const repeats = cloned.repeat;
|
const repeats = cloned.repeat;
|
||||||
// Animate like the workspaces above expect essentials are a bit more
|
// Animate like the workspaces above expect essentials are a bit more
|
||||||
// complicated because they are not based on workspaces but on containers
|
// complicated because they are not based on workspaces but on containers
|
||||||
|
@ -2047,9 +2044,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
// will slide in from the right
|
// will slide in from the right
|
||||||
|
|
||||||
// Get the index from first and last workspace
|
// Get the index from first and last workspace
|
||||||
const firstWorkspaceIndex = workspaces.workspaces.findIndex((w) => w.uuid === essentialsWorkspacess[0].uuid);
|
const firstWorkspaceIndex = workspaces.workspaces.findIndex((w) => w.uuid === essentialsWorkspaces[0].uuid);
|
||||||
const lastWorkspaceIndex = workspaces.workspaces.findIndex(
|
const lastWorkspaceIndex = workspaces.workspaces.findIndex(
|
||||||
(w) => w.uuid === essentialsWorkspacess[essentialsWorkspacess.length - 1].uuid
|
(w) => w.uuid === essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid
|
||||||
);
|
);
|
||||||
// Check if the container is even going to appear on the screen, to save on animation
|
// Check if the container is even going to appear on the screen, to save on animation
|
||||||
if (
|
if (
|
||||||
|
@ -2077,7 +2074,18 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
(isGoingLeft ? repeats - 1 : -repeats + 1)
|
(isGoingLeft ? repeats - 1 : -repeats + 1)
|
||||||
) * 100;
|
) * 100;
|
||||||
|
|
||||||
const needsOffsetAdjustment = stepsInBetween > essentialsWorkspacess.length || usingSameContainer;
|
// If we are on the same container and both new and old workspace are in the same "essentialsWorkspaces"
|
||||||
|
// we can simply not animate the essentials
|
||||||
|
if (
|
||||||
|
usingSameContainer &&
|
||||||
|
essentialsWorkspaces.some((w) => w.uuid === newWorkspace.uuid) &&
|
||||||
|
essentialsWorkspaces.some((w) => w.uuid === previousWorkspace.uuid)
|
||||||
|
) {
|
||||||
|
newOffset = 0;
|
||||||
|
existingOffset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const needsOffsetAdjustment = stepsInBetween > essentialsWorkspaces.length || usingSameContainer;
|
||||||
|
|
||||||
if (repeats > 0 && needsOffsetAdjustment) {
|
if (repeats > 0 && needsOffsetAdjustment) {
|
||||||
if (!isGoingLeft) {
|
if (!isGoingLeft) {
|
||||||
|
@ -2386,16 +2394,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
);
|
);
|
||||||
const workspaceObject = this.getWorkspaceFromId(workspaceId);
|
const workspaceObject = this.getWorkspaceFromId(workspaceId);
|
||||||
const essentialContainer = this.getEssentialsSection(workspaceObject.containerTabId);
|
const essentialContainer = this.getEssentialsSection(workspaceObject.containerTabId);
|
||||||
const essentialNumChildren = essentialContainer.children.length;
|
|
||||||
let essentialHackType = 0;
|
|
||||||
if (essentialNumChildren % 3 === 0) {
|
|
||||||
essentialHackType = 3;
|
|
||||||
}
|
|
||||||
if (essentialHackType > 0) {
|
|
||||||
essentialContainer.setAttribute('data-hack-type', essentialHackType);
|
|
||||||
} else {
|
|
||||||
essentialContainer.removeAttribute('data-hack-type');
|
|
||||||
}
|
|
||||||
this._updateMarginTopPinnedTabs(arrowScrollbox, pinnedContainer, essentialContainer, workspaceIndicator, forAnimation);
|
this._updateMarginTopPinnedTabs(arrowScrollbox, pinnedContainer, essentialContainer, workspaceIndicator, forAnimation);
|
||||||
this.updateShouldHideSeparator(arrowScrollbox, pinnedContainer);
|
this.updateShouldHideSeparator(arrowScrollbox, pinnedContainer);
|
||||||
}
|
}
|
||||||
|
@ -2659,7 +2657,12 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
return [userContextId, false, undefined];
|
return [userContextId, false, undefined];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.shouldForceContainerTabsToWorkspace && typeof userContextId !== 'undefined' && this._workspaceCache?.workspaces) {
|
if (
|
||||||
|
this.shouldForceContainerTabsToWorkspace &&
|
||||||
|
typeof userContextId !== 'undefined' &&
|
||||||
|
this._workspaceCache?.workspaces &&
|
||||||
|
!fromExternal
|
||||||
|
) {
|
||||||
// Find all workspaces that match the given userContextId
|
// Find all workspaces that match the given userContextId
|
||||||
const matchingWorkspaces = this._workspaceCache.workspaces.filter(
|
const matchingWorkspaces = this._workspaceCache.workspaces.filter(
|
||||||
(workspace) => workspace.containerTabId === userContextId
|
(workspace) => workspace.containerTabId === userContextId
|
||||||
|
@ -2683,6 +2686,17 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||||
return [activeWorkspaceUserContextId, true, undefined];
|
return [activeWorkspaceUserContextId, true, undefined];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTabsToExclude(aTab) {
|
||||||
|
const tabWorkspaceId = aTab.getAttribute('zen-workspace-id');
|
||||||
|
// Return all tabs that are not on the same workspace
|
||||||
|
return this.allStoredTabs.filter(
|
||||||
|
(tab) =>
|
||||||
|
tab.getAttribute('zen-workspace-id') !== tabWorkspaceId &&
|
||||||
|
!tab.hasAttribute('zen-essential') &&
|
||||||
|
!(this.containerSpecificEssentials && tab.getAttribute('container') !== aTab.getAttribute('container'))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
async shortcutSwitchTo(index) {
|
async shortcutSwitchTo(index) {
|
||||||
const workspaces = await this._workspaces();
|
const workspaces = await this._workspaces();
|
||||||
// The index may be out of bounds, if it doesnt exist, don't do anything
|
// The index may be out of bounds, if it doesnt exist, don't do anything
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"brandShortName": "Zen",
|
"brandShortName": "Zen",
|
||||||
"brandFullName": "Zen Browser",
|
"brandFullName": "Zen Browser",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.11.5b",
|
"displayVersion": "1.12b",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
},
|
},
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
"brandShortName": "Twilight",
|
"brandShortName": "Twilight",
|
||||||
"brandFullName": "Zen Twilight",
|
"brandFullName": "Zen Twilight",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.11.5t",
|
"displayVersion": "1.12t",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue