Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc88c99c45 | ||
|
|
9d36ed6b1b | ||
|
|
a6b8843c5c | ||
|
|
9cf4dbd710 | ||
|
|
589335f665 | ||
|
|
1a04cac47c | ||
|
|
417c6d09bf | ||
|
|
c36cb4a76a | ||
|
|
e65b786b46 | ||
|
|
713f1486c3 | ||
|
|
a0d3447202 | ||
|
|
286999599a | ||
|
|
9b6fae2523 | ||
|
|
c250279b46 | ||
|
|
f687df335e | ||
|
|
aeec7866b4 | ||
|
|
b49c47516e | ||
|
|
3bf854c6c3 | ||
|
|
b55edb8ae9 | ||
|
|
78bc66668c | ||
|
|
f965abe7f1 | ||
|
|
509cb2471d | ||
|
|
3c273d817b | ||
|
|
21817ca97a | ||
|
|
b31e712d2c | ||
|
|
8f1ee11ff2 | ||
|
|
0cb80ace3f | ||
|
|
295a2bb8b8 | ||
|
|
dd6757be5b | ||
|
|
e90e4b27a3 | ||
|
|
2932ca6c2b | ||
|
|
06a685fc31 | ||
|
|
e06c20d2f6 | ||
|
|
e5527cf825 | ||
|
|
6864af1b2f | ||
|
|
87ff59bfa7 | ||
|
|
ecd407d924 | ||
|
|
ce55e7eed5 | ||
|
|
f9b3fed403 | ||
|
|
484f77bffc | ||
|
|
814e697675 | ||
|
|
e469c04125 | ||
|
|
a33e2cbd88 | ||
|
|
4ecccd67bd | ||
|
|
8af25b4c67 | ||
|
|
d6c30caf1b | ||
|
|
7025efa6f8 | ||
|
|
d0877eb6bc | ||
|
|
87c62b4319 | ||
|
|
9d3382d773 | ||
|
|
5333e92c42 |
@@ -28,9 +28,9 @@
|
||||
|
||||
## 🖥️ Compatibility
|
||||
|
||||
Zen is currently built using Firefox version `136.0.2`! 🚀
|
||||
Zen is currently built using Firefox version `137.0.1`! 🚀
|
||||
|
||||
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 136.0`!
|
||||
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `137.0.1`!
|
||||
- Check out the latest [release notes](https://zen-browser.app/release-notes)!
|
||||
- Part of our mission is to keep Zen up-to-date with the latest version of Firefox, so you can enjoy the latest features and security updates!
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
e834aca3620253ea774e85826e43dd55e0c4f8b2
|
||||
01c20afaa6fe914ff4f083689b8d234c1ba76961
|
||||
@@ -6,7 +6,6 @@ param(
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
echo "Preparing environment"
|
||||
git pull --recurse-submodules
|
||||
mkdir windsign-temp -ErrorAction SilentlyContinue
|
||||
|
||||
# Download in parallel
|
||||
@@ -29,7 +28,7 @@ echo "Downloaded x86_64 artifacts"
|
||||
|
||||
mkdir engine\obj-x86_64-pc-windows-msvc\ -ErrorAction SilentlyContinue
|
||||
|
||||
npm run surfer -- ci --brand release
|
||||
surfer -- ci --brand release
|
||||
|
||||
function SignAndPackage($name) {
|
||||
echo "Executing on $name"
|
||||
@@ -45,7 +44,7 @@ function SignAndPackage($name) {
|
||||
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
|
||||
echo "Packaging $name"
|
||||
$env:SURFER_SIGNING_MODE="sign"
|
||||
$env:MAR="$PWD\\build\\winsign\\mar.exe"
|
||||
$env:MAR="..\\build\\winsign\\mar.exe"
|
||||
if ($name -eq "arm64") {
|
||||
$env:SURFER_COMPAT="aarch64"
|
||||
} else {
|
||||
@@ -92,12 +91,12 @@ function SignAndPackage($name) {
|
||||
}
|
||||
|
||||
# Extract the zip, sign everything inside, and repackage it
|
||||
Expand-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name.zip -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name
|
||||
rm windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
|
||||
$files = Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.exe
|
||||
$files += Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.dll
|
||||
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
|
||||
Compress-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
|
||||
#Expand-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name.zip -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name
|
||||
#rm windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
|
||||
#$files = Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.exe
|
||||
#$files += Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.dll
|
||||
#signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
|
||||
#Compress-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
|
||||
rmdir windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -ErrorAction SilentlyContinue
|
||||
|
||||
# Move the manifest
|
||||
|
||||
@@ -380,6 +380,11 @@ pref('widget.macos.titlebar-blend-mode.behind-window', true);
|
||||
pref('zen.widget.macos.window-material', 3);
|
||||
#endif
|
||||
|
||||
// Enable transparent background for linux
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
pref('zen.widget.linux.transparency', false);
|
||||
#endif
|
||||
|
||||
// Urlbar and autocomplete
|
||||
pref("browser.urlbar.maxRichResults", 6);
|
||||
pref("browser.urlbar.trimHttps", true);
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
this._initSidebarScrolling();
|
||||
|
||||
gZenCompactModeManager.init();
|
||||
ZenWorkspaces.init();
|
||||
gZenVerticalTabsManager.init();
|
||||
gZenUIManager.init();
|
||||
@@ -41,7 +40,34 @@
|
||||
} catch (e) {
|
||||
console.error('ZenThemeModifier: Error initializing browser layout', e);
|
||||
}
|
||||
ZenWorkspaces.promiseInitialized.then(() => {
|
||||
if (gBrowserInit.delayedStartupFinished) {
|
||||
this.delayedStartupFinished();
|
||||
} else {
|
||||
Services.obs.addObserver(this, 'browser-delayed-startup-finished');
|
||||
}
|
||||
},
|
||||
|
||||
observe(aSubject, aTopic) {
|
||||
// This nsIObserver method allows us to defer initialization until after
|
||||
// this window has finished painting and starting up.
|
||||
if (aTopic == 'browser-delayed-startup-finished' && aSubject == window) {
|
||||
Services.obs.removeObserver(this, 'browser-delayed-startup-finished');
|
||||
this.delayedStartupFinished();
|
||||
}
|
||||
},
|
||||
|
||||
delayedStartupFinished() {
|
||||
ZenWorkspaces.promiseInitialized.then(async () => {
|
||||
await delayedStartupPromise;
|
||||
await SessionStore.promiseAllWindowsRestored;
|
||||
setTimeout(() => {
|
||||
gZenCompactModeManager.init();
|
||||
setTimeout(() => {
|
||||
// A bit of a hack to make sure the tabs toolbar is updated.
|
||||
// Just in case we didn't get the right size.
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
}, 100);
|
||||
}, 0);
|
||||
this.closeWatermark();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -544,7 +544,7 @@ var gZenVerticalTabsManager = {
|
||||
);
|
||||
elements = Array.from(elements).reverse();
|
||||
// Add separator if it doesn't exist
|
||||
if (!buttonsTarget.contains(this._topButtonsSeparatorElement)) {
|
||||
if (!this._hasSetSingleToolbar) {
|
||||
buttonsTarget.append(this._topButtonsSeparatorElement);
|
||||
}
|
||||
for (const button of elements) {
|
||||
@@ -656,7 +656,9 @@ var gZenVerticalTabsManager = {
|
||||
// Always move the splitter next to the sidebar
|
||||
this.navigatorToolbox.after(document.getElementById('zen-sidebar-splitter'));
|
||||
window.dispatchEvent(new Event('resize'));
|
||||
gZenCompactModeManager.getAndApplySidebarWidth();
|
||||
if (!isCompactMode) {
|
||||
gZenCompactModeManager.getAndApplySidebarWidth();
|
||||
}
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
|
||||
@media -moz-pref('zen.view.experimental-rounded-view') {
|
||||
#tabbrowser-tabpanels {
|
||||
mix-blend-mode: multiply;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
isolation: isolate;
|
||||
:root:not([zen-no-padding='true']) & {
|
||||
mix-blend-mode: multiply;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
isolation: isolate;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,15 +114,10 @@
|
||||
background: var(--zen-dialog-background);
|
||||
outline: 1px solid var(--zen-colors-border-contrast);
|
||||
outline-offset: -1px;
|
||||
/* times 4 because we have the inner padding and the outter padding to consider */
|
||||
:root[zen-sidebar-expanded='true'] & {
|
||||
&[has-animated-padding='true'] {
|
||||
width: calc(var(--zen-sidebar-width) + var(--zen-toolbox-padding));
|
||||
}
|
||||
min-width: var(--zen-toolbox-min-width);
|
||||
|
||||
&:not([has-animated-padding='true']) {
|
||||
width: calc(var(--zen-sidebar-width) - var(--zen-toolbox-padding));
|
||||
}
|
||||
:root[zen-sidebar-expanded='true'] & {
|
||||
width: calc(var(--zen-sidebar-width) + var(--zen-toolbox-padding));
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
@@ -344,7 +339,7 @@
|
||||
}
|
||||
|
||||
& #urlbar {
|
||||
opacity: 0;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
@media -moz-pref('zen.view.compact.color-toolbar') {
|
||||
@@ -356,6 +351,7 @@
|
||||
}
|
||||
|
||||
& #zen-appcontent-navbar-container[zen-has-hover],
|
||||
& #zen-appcontent-navbar-container:hover,
|
||||
& #zen-appcontent-navbar-container:focus-within,
|
||||
& #zen-appcontent-navbar-container[zen-user-show],
|
||||
& #zen-appcontent-navbar-container[has-popup-menu],
|
||||
@@ -382,7 +378,7 @@
|
||||
}
|
||||
|
||||
& #urlbar {
|
||||
opacity: 1;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
& #urlbar[breakout-extend='true']:not([zen-floating-urlbar='true']) {
|
||||
|
||||
@@ -43,6 +43,8 @@ panel[type='arrow'] {
|
||||
--panel-border-color: transparent !important;
|
||||
--panel-shadow-margin: 0px !important;
|
||||
|
||||
transition-duration: 0s !important;
|
||||
|
||||
&::part(content) {
|
||||
animation: none !important;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,12 @@
|
||||
border-radius: var(--zen-native-inner-radius);
|
||||
box-shadow: var(--zen-big-shadow);
|
||||
overflow: hidden;
|
||||
|
||||
&[positionend=''] {
|
||||
order: 6;
|
||||
& ~ #sidebar-splitter {
|
||||
order: 5;
|
||||
}
|
||||
}
|
||||
:root:not([zen-right-side='true']) &[positionend='true'] {
|
||||
margin-right: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
--toolbar-field-focus-background-color: var(--urlbar-box-bgcolor) !important;
|
||||
--zen-input-border-color: light-dark(rgb(204, 204, 204), rgb(66, 65, 77));
|
||||
--urlbar-box-hover-bgcolor: var(--toolbarbutton-hover-background) !important;
|
||||
--input-bgcolor: light-dark(rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2)) !important;
|
||||
|
||||
/* XUL */
|
||||
--zen-main-browser-background: light-dark(rgb(235, 235, 235), #1b1b1b);
|
||||
@@ -167,6 +168,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-platform: linux) and -moz-pref('zen.widget.linux.transparency') {
|
||||
background: transparent;
|
||||
--zen-themed-toolbar-bg-transparent: transparent;
|
||||
}
|
||||
|
||||
--toolbar-field-background-color: var(--zen-colors-input-bg) !important;
|
||||
--arrowpanel-background: var(--zen-dialog-background) !important;
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
}
|
||||
|
||||
:root[inDOMFullscreen='true'] #zen-appcontent-navbar-container {
|
||||
display: none;
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
@@ -365,10 +365,6 @@ button.popup-notification-dropmarker {
|
||||
}
|
||||
|
||||
:root:not([zen-single-toolbar='true']) {
|
||||
& #nav-bar {
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
&[zen-right-side='true']:not([zen-window-buttons-reversed='true']) #nav-bar {
|
||||
margin-inline-start: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
const kZenThemePrefsList = ['zen.theme.accent-color', 'zen.theme.border-radius', 'zen.theme.content-element-separation'];
|
||||
const kZenMaxElementSeparation = 12;
|
||||
|
||||
/**
|
||||
* ZenThemeModifier controls the application of theme data to the browser,
|
||||
@@ -68,7 +69,7 @@ var ZenThemeModifier = {
|
||||
},
|
||||
|
||||
updateElementSeparation() {
|
||||
const separation = Services.prefs.getIntPref('zen.theme.content-element-separation');
|
||||
let separation = this.elementSeparation;
|
||||
document.documentElement.style.setProperty('--zen-element-separation', separation + 'px');
|
||||
if (separation == 0) {
|
||||
document.documentElement.setAttribute('zen-no-padding', true);
|
||||
@@ -77,6 +78,10 @@ var ZenThemeModifier = {
|
||||
}
|
||||
},
|
||||
|
||||
get elementSeparation() {
|
||||
return Math.min(Services.prefs.getIntPref('zen.theme.content-element-separation'), kZenMaxElementSeparation);
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the accent color.
|
||||
*/
|
||||
|
||||
@@ -28,15 +28,23 @@ var gZenCompactModeManager = {
|
||||
_evenListeners: [],
|
||||
_removeHoverFrames: {},
|
||||
|
||||
preInit() {
|
||||
// Remove it before initializing so we can properly calculate the width
|
||||
// of the sidebar at startup and avoid overflowing items not being hidden
|
||||
const isCompactMode = lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode') === 'true';
|
||||
lazyCompactMode.mainAppWrapper.removeAttribute('zen-compact-mode');
|
||||
this._wasInCompactMode = isCompactMode;
|
||||
|
||||
this.addMouseActions();
|
||||
this.addContextMenu();
|
||||
},
|
||||
|
||||
init() {
|
||||
Services.prefs.addObserver('zen.tabs.vertical.right-side', this._updateSidebarIsOnRight.bind(this));
|
||||
|
||||
gZenUIManager.addPopupTrackingAttribute(this.sidebar);
|
||||
gZenUIManager.addPopupTrackingAttribute(document.getElementById('zen-appcontent-navbar-container'));
|
||||
|
||||
this.addMouseActions();
|
||||
this.addContextMenu();
|
||||
|
||||
// Clear hover states when window state changes (minimize, maximize, etc.)
|
||||
window.addEventListener('sizemodechange', () => this._clearAllHoverStates());
|
||||
|
||||
@@ -47,21 +55,10 @@ var gZenCompactModeManager = {
|
||||
buttons.removeAttribute('zen-has-hover');
|
||||
});
|
||||
}
|
||||
this.preference = this._wasInCompactMode;
|
||||
},
|
||||
|
||||
get preference() {
|
||||
if (!document.documentElement.hasAttribute('zen-compact-mode')) {
|
||||
window.addEventListener(
|
||||
'MozAfterPaint',
|
||||
() => {
|
||||
document.documentElement.setAttribute(
|
||||
'zen-compact-mode',
|
||||
lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode')
|
||||
);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
return lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode') === 'true';
|
||||
},
|
||||
|
||||
@@ -156,11 +153,16 @@ var gZenCompactModeManager = {
|
||||
await this.animateCompactMode();
|
||||
this._evenListeners.forEach((callback) => callback());
|
||||
}
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
},
|
||||
|
||||
// NOTE: Dont actually use event, it's just so we make sure
|
||||
// the caller is from the ResizeObserver
|
||||
getAndApplySidebarWidth(event = undefined) {
|
||||
if (this._ignoreNextResize) {
|
||||
this._ignoreNextResize = false;
|
||||
return;
|
||||
}
|
||||
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
|
||||
if (sidebarWidth > 1) {
|
||||
gZenUIManager.restoreScrollbarState();
|
||||
@@ -184,18 +186,18 @@ var gZenCompactModeManager = {
|
||||
const isCompactMode = this.preference;
|
||||
const canHideSidebar =
|
||||
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') || gZenVerticalTabsManager._hasSetSingleToolbar;
|
||||
const canAnimate =
|
||||
let canAnimate =
|
||||
lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR &&
|
||||
!this.sidebar.hasAttribute('zen-user-show') &&
|
||||
!this.sidebar.hasAttribute('zen-has-empty-tab') &&
|
||||
!this.sidebar.hasAttribute('zen-has-hover');
|
||||
if (typeof this._wasInCompactMode !== 'undefined') {
|
||||
canAnimate = false;
|
||||
delete this._wasInCompactMode;
|
||||
}
|
||||
// Do this so we can get the correct width ONCE compact mode styled have been applied
|
||||
const titlebar = this.sidebar.querySelector('#titlebar');
|
||||
if (canAnimate) {
|
||||
this.sidebar.setAttribute('animate', 'true');
|
||||
titlebar.setAttribute('has-animated-padding', 'true');
|
||||
} else {
|
||||
titlebar.removeAttribute('has-animated-padding');
|
||||
}
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
@@ -209,7 +211,14 @@ var gZenCompactModeManager = {
|
||||
return;
|
||||
}
|
||||
if (canHideSidebar && isCompactMode) {
|
||||
sidebarWidth -= 0.5 * splitterWidth;
|
||||
const elementSeparation = ZenThemeModifier.elementSeparation;
|
||||
if (document.documentElement.hasAttribute('zen-sidebar-expanded')) {
|
||||
sidebarWidth -= 0.5 * splitterWidth;
|
||||
if (elementSeparation < splitterWidth) {
|
||||
// Subtract from the splitter width to end up with the correct element separation
|
||||
sidebarWidth += 1.5 * splitterWidth - elementSeparation;
|
||||
}
|
||||
}
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
this.sidebar,
|
||||
@@ -227,25 +236,17 @@ var gZenCompactModeManager = {
|
||||
.then(() => {
|
||||
this.sidebar.style.transition = 'none';
|
||||
this.sidebar.style.opacity = 0;
|
||||
this.getAndApplySidebarWidth();
|
||||
setTimeout(() => {
|
||||
this.sidebar.removeAttribute('animate');
|
||||
document.documentElement.removeAttribute('zen-compact-animating');
|
||||
|
||||
this.getAndApplySidebarWidth({});
|
||||
this._ignoreNextResize = true;
|
||||
|
||||
this.sidebar.style.removeProperty('margin-right');
|
||||
this.sidebar.style.removeProperty('margin-left');
|
||||
if (this.sidebarIsOnRight) {
|
||||
this.sidebar.style.right = `-100%`;
|
||||
} else {
|
||||
this.sidebar.style.left = `-100%`;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.sidebar.style.left = '';
|
||||
this.sidebar.style.right = '';
|
||||
this.sidebar.style.removeProperty('opacity');
|
||||
this.sidebar.style.removeProperty('transform');
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
}, 200);
|
||||
this.sidebar.style.removeProperty('opacity');
|
||||
this.sidebar.style.removeProperty('transition');
|
||||
|
||||
resolve();
|
||||
}, 0);
|
||||
@@ -500,3 +501,11 @@ var gZenCompactModeManager = {
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
document.addEventListener(
|
||||
'MozBeforeInitialXULLayout',
|
||||
() => {
|
||||
gZenCompactModeManager.preInit();
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -386,8 +386,8 @@
|
||||
await this._resetTabToStoredState(tab);
|
||||
}
|
||||
|
||||
async replacePinnedUrlWithCurrent() {
|
||||
const tab = TabContextMenu.contextTab;
|
||||
async replacePinnedUrlWithCurrent(tab = undefined) {
|
||||
tab ??= TabContextMenu.contextTab;
|
||||
if (!tab || !tab.pinned || !tab.getAttribute('zen-pin-id')) {
|
||||
return;
|
||||
}
|
||||
@@ -806,8 +806,11 @@
|
||||
if (!pin) {
|
||||
return;
|
||||
}
|
||||
// Remove # and ? from the url
|
||||
const pinUrl = pin.url.split('#')[0].split('?')[0];
|
||||
const currentUrl = browser.currentURI.spec.split('#')[0].split('?')[0];
|
||||
// Add an indicator that the pin has been changed
|
||||
if (pin.url === browser.currentURI.spec) {
|
||||
if (pinUrl === currentUrl) {
|
||||
this.resetPinChangedUrl(tab);
|
||||
return;
|
||||
}
|
||||
@@ -967,6 +970,20 @@
|
||||
indicator.style.removeProperty('top');
|
||||
}
|
||||
}
|
||||
|
||||
async onTabLabelChanged(tab) {
|
||||
if (!this._pinsCache) {
|
||||
return;
|
||||
}
|
||||
// If our current pin in the cache point to about:blank, we need to update the entry
|
||||
const pin = this._pinsCache.find((pin) => pin.uuid === tab.getAttribute('zen-pin-id'));
|
||||
if (!pin) {
|
||||
return;
|
||||
}
|
||||
if (pin.url === 'about:blank') {
|
||||
await this.replacePinnedUrlWithCurrent(tab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.gZenPinnedTabManager = new ZenPinnedTabManager();
|
||||
|
||||
@@ -63,48 +63,12 @@
|
||||
static INTERVAL = 1000 * 60; // 1 minute
|
||||
|
||||
interval = null;
|
||||
/** @type {ZenTabUnloader} */
|
||||
unloader = null;
|
||||
|
||||
#excludedUrls = [];
|
||||
#compiledExcludedUrls = [];
|
||||
|
||||
constructor(unloader) {
|
||||
this.unloader = unloader;
|
||||
this.interval = setInterval(this.intervalListener.bind(this), ZenTabsIntervalUnloader.INTERVAL);
|
||||
this.#excludedUrls = this.lazyExcludeUrls;
|
||||
}
|
||||
|
||||
get lazyExcludeUrls() {
|
||||
return [
|
||||
...ZEN_TAB_UNLOADER_DEFAULT_EXCLUDED_URLS,
|
||||
...lazy.zenTabUnloaderExcludedUrls.split(',').map((url) => url.trim()),
|
||||
];
|
||||
}
|
||||
|
||||
arraysEqual(a, b) {
|
||||
if (a === b) return true;
|
||||
if (a == null || b == null) return false;
|
||||
if (a.length !== b.length) return false;
|
||||
|
||||
// If you don't care about the order of the elements inside
|
||||
// the array, you should sort both arrays here.
|
||||
// Please note that calling sort on an array will modify that array.
|
||||
// you might want to clone your array first.
|
||||
|
||||
for (var i = 0; i < a.length; ++i) {
|
||||
if (a[i] !== b[i]) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
get excludedUrls() {
|
||||
// Check if excludedrls is the same as the pref value
|
||||
const excludedUrls = this.lazyExcludeUrls;
|
||||
if (!this.arraysEqual(this.#excludedUrls, excludedUrls) || !this.#compiledExcludedUrls.length) {
|
||||
this.#excludedUrls = excludedUrls;
|
||||
this.#compiledExcludedUrls = excludedUrls.map((url) => new RegExp(url));
|
||||
}
|
||||
return this.#compiledExcludedUrls;
|
||||
}
|
||||
|
||||
intervalListener() {
|
||||
@@ -112,11 +76,10 @@
|
||||
return;
|
||||
}
|
||||
const currentTimestamp = Date.now();
|
||||
const excludedUrls = this.excludedUrls;
|
||||
const tabs = ZenWorkspaces.allStoredTabs;
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
const tab = tabs[i];
|
||||
if (this.unloader.canUnloadTab(tab, currentTimestamp, excludedUrls)) {
|
||||
if (this.unloader.canUnloadTab(tab, currentTimestamp)) {
|
||||
this.unloader.unload(tab);
|
||||
}
|
||||
}
|
||||
@@ -126,8 +89,14 @@
|
||||
class ZenTabUnloader extends ZenDOMOperatedFeature {
|
||||
static ACTIVITY_MODIFIERS = ['muted', 'soundplaying', 'label', 'attention'];
|
||||
|
||||
#excludedUrls = [];
|
||||
#compiledExcludedUrls = [];
|
||||
#lastCheckedUrlTimestamp = 0;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.#excludedUrls = this.lazyExcludeUrls;
|
||||
if (!lazy.zenTabUnloaderEnabled) {
|
||||
return;
|
||||
}
|
||||
@@ -217,6 +186,45 @@
|
||||
document.getElementById('context_closeDuplicateTabs').parentNode.appendChild(element);
|
||||
}
|
||||
|
||||
get lazyExcludeUrls() {
|
||||
return [
|
||||
...ZEN_TAB_UNLOADER_DEFAULT_EXCLUDED_URLS,
|
||||
...lazy.zenTabUnloaderExcludedUrls.split(',').map((url) => url.trim()),
|
||||
];
|
||||
}
|
||||
|
||||
arraysEqual(a, b) {
|
||||
if (a === b) return true;
|
||||
if (a == null || b == null) return false;
|
||||
if (a.length !== b.length) return false;
|
||||
|
||||
const currentTimestamp = Date.now();
|
||||
if (currentTimestamp - this.#lastCheckedUrlTimestamp < 5 * 1000) {
|
||||
return true;
|
||||
}
|
||||
|
||||
this.#lastCheckedUrlTimestamp = currentTimestamp;
|
||||
// If you don't care about the order of the elements inside
|
||||
// the array, you should sort both arrays here.
|
||||
// Please note that calling sort on an array will modify that array.
|
||||
// you might want to clone your array first.
|
||||
|
||||
for (let i = 0; i < a.length; ++i) {
|
||||
if (a[i] !== b[i]) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
get excludedUrls() {
|
||||
// Check if excludedrls is the same as the pref value
|
||||
const excludedUrls = this.lazyExcludeUrls;
|
||||
if (!this.arraysEqual(this.#excludedUrls, excludedUrls) || !this.#compiledExcludedUrls.length) {
|
||||
this.#excludedUrls = excludedUrls;
|
||||
this.#compiledExcludedUrls = excludedUrls.map((url) => new RegExp(url));
|
||||
}
|
||||
return this.#compiledExcludedUrls;
|
||||
}
|
||||
|
||||
unload(tab, skipPermitUnload = false) {
|
||||
gBrowser.explicitUnloadTabs([tab], skipPermitUnload);
|
||||
tab.removeAttribute('linkedpanel');
|
||||
@@ -229,7 +237,7 @@
|
||||
|
||||
explicitUnloadTabs(tabs, extraArgs = {}) {
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
if (this.canUnloadTab(tabs[i], Date.now(), this.intervalUnloader.excludedUrls, true, extraArgs)) {
|
||||
if (this.canUnloadTab(tabs[i], Date.now(), true, extraArgs)) {
|
||||
this.unload(tabs[i], true);
|
||||
}
|
||||
}
|
||||
@@ -251,7 +259,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
canUnloadTab(tab, currentTimestamp, excludedUrls, ignoreTimestamp = false, extraArgs = {}) {
|
||||
canUnloadTab(tab, currentTimestamp, ignoreTimestamp = false, extraArgs = {}) {
|
||||
if (
|
||||
(tab.pinned && !ignoreTimestamp) ||
|
||||
tab.selected ||
|
||||
@@ -266,7 +274,7 @@
|
||||
(tab.pictureinpicture && !ignoreTimestamp) ||
|
||||
(tab.soundPlaying && !ignoreTimestamp) ||
|
||||
(tab.zenIgnoreUnload && !ignoreTimestamp) ||
|
||||
(excludedUrls.some((url) => url.test(tab.linkedBrowser?.currentURI.spec)) &&
|
||||
(this.excludedUrls.some((url) => url.test(tab.linkedBrowser?.currentURI.spec)) &&
|
||||
tab.linkedBrowser?.currentURI.spec !== 'about:blank')
|
||||
) {
|
||||
return false;
|
||||
|
||||
@@ -188,8 +188,8 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
this.fakeBrowser ||
|
||||
!this._lastOpenedTab ||
|
||||
(this._lastOpenedTab &&
|
||||
(this._lastOpenedTab.getAttribute('zen-workspace-id') !== draggedTab.getAttribute('zen-workspace-id') ||
|
||||
this._lastOpenedTab.hasAttribute('zen-essential')))
|
||||
this._lastOpenedTab.getAttribute('zen-workspace-id') !== draggedTab.getAttribute('zen-workspace-id') &&
|
||||
!this._lastOpenedTab.hasAttribute('zen-essential'))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
}
|
||||
this.fakeBrowser = document.createXULElement('vbox');
|
||||
window.addEventListener('dragend', this.onBrowserDragEndToSplit, { once: true });
|
||||
const padding = Services.prefs.getIntPref('zen.theme.content-element-separation', 0);
|
||||
const padding = ZenThemeModifier.elementSeparation;
|
||||
this.fakeBrowser.setAttribute('flex', '1');
|
||||
this.fakeBrowser.id = 'zen-split-view-fake-browser';
|
||||
if (oldTab.splitView) {
|
||||
@@ -317,7 +317,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
}
|
||||
const panelsWidth = panelsRect.width;
|
||||
const halfWidth = panelsWidth / 2;
|
||||
const padding = Services.prefs.getIntPref('zen.theme.content-element-separation', 0);
|
||||
const padding = ZenThemeModifier.elementSeparation;
|
||||
if (!this.fakeBrowser) {
|
||||
return;
|
||||
}
|
||||
@@ -887,7 +887,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
return false;
|
||||
}
|
||||
for (const tab of window.gBrowser.selectedTabs) {
|
||||
if (tab.splitView || tab.hasAttribute('zen-empty-tab') || tab.hasAttribute('zen-essential')) {
|
||||
if (tab.splitView || tab.hasAttribute('zen-empty-tab')) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -945,14 +945,14 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
*/
|
||||
splitTabs(tabs, gridType, initialIndex = 0) {
|
||||
// TODO: Add support for splitting essential tabs
|
||||
tabs = tabs.filter((t) => !t.hidden && !t.hasAttribute('zen-empty-tab') && !t.hasAttribute('zen-essential'));
|
||||
tabs = tabs.filter((t) => !t.hidden && !t.hasAttribute('zen-empty-tab'));
|
||||
if (tabs.length < 2 || tabs.length > this.MAX_TABS) {
|
||||
return;
|
||||
}
|
||||
this._moveTabsToContainer(tabs, tabs[initialIndex]);
|
||||
|
||||
const existingSplitTab = tabs.find((tab) => tab.splitView);
|
||||
if (existingSplitTab) {
|
||||
this._moveTabsToContainer(tabs, tabs[initialIndex]);
|
||||
const groupIndex = this._data.findIndex((group) => group.tabs.includes(existingSplitTab));
|
||||
const group = this._data[groupIndex];
|
||||
const gridTypeChange = gridType && group.gridType !== gridType;
|
||||
@@ -978,6 +978,23 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
this.activateSplitView(group, true);
|
||||
return;
|
||||
}
|
||||
|
||||
// We are here if none of the tabs have been previously split
|
||||
// If there's ANY pinned tab on the list, we clone the pinned tab
|
||||
// state to all the tabs
|
||||
const allArePinned = tabs.every((tab) => tab.pinned);
|
||||
const thereIsOnePinned = tabs.some((tab) => tab.pinned);
|
||||
const thereIsOneEssential = tabs.some((tab) => tab.hasAttribute('zen-essential'));
|
||||
|
||||
if (thereIsOneEssential || (thereIsOnePinned && !allArePinned)) {
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
const tab = tabs[i];
|
||||
if (tab.pinned) {
|
||||
tabs[i] = gBrowser.duplicateTab(tab, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gridType ??= 'grid';
|
||||
|
||||
const splitData = {
|
||||
@@ -1507,7 +1524,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
|
||||
const dropSide = this.fakeBrowser?.getAttribute('side');
|
||||
const containerRect = this.fakeBrowser.getBoundingClientRect();
|
||||
const padding = Services.prefs.getIntPref('zen.theme.content-element-separation', 0);
|
||||
const padding = ZenThemeModifier.elementSeparation;
|
||||
const dropTarget = document.elementFromPoint(
|
||||
dropSide === 'left' ? containerRect.left + containerRect.width + padding + 5 : containerRect.left - padding - 5,
|
||||
event.clientY
|
||||
|
||||
@@ -2307,16 +2307,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
|
||||
// Session restore functions
|
||||
get allStoredTabs() {
|
||||
if (!this._hasInitializedTabsStrip) {
|
||||
const children = this.tabboxChildren;
|
||||
children.pop(); // Remove the last child which is the new tab button
|
||||
return [
|
||||
...document.querySelectorAll('#zen-essentials-container tab'),
|
||||
...document.querySelectorAll('#vertical-pinned-tabs-container tab'),
|
||||
...children,
|
||||
];
|
||||
}
|
||||
|
||||
if (this._allStoredTabs) {
|
||||
return this._allStoredTabs;
|
||||
}
|
||||
@@ -2324,8 +2314,12 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
const tabs = [];
|
||||
// we need to go through each tab in each container
|
||||
const essentialsContainer = document.getElementById('zen-essentials-container');
|
||||
const pinnedContainers = document.querySelectorAll('#vertical-pinned-tabs-container .zen-workspace-tabs-section');
|
||||
const normalContainers = document.querySelectorAll('#tabbrowser-arrowscrollbox .zen-workspace-tabs-section');
|
||||
let pinnedContainers = document.querySelectorAll('#vertical-pinned-tabs-container .zen-workspace-tabs-section');
|
||||
let normalContainers = document.querySelectorAll('#tabbrowser-arrowscrollbox .zen-workspace-tabs-section');
|
||||
if (!this._hasInitializedTabsStrip) {
|
||||
pinnedContainers = [document.getElementById('vertical-pinned-tabs-container')];
|
||||
normalContainers = [this.activeWorkspaceStrip];
|
||||
}
|
||||
const containers = [essentialsContainer, ...pinnedContainers, ...normalContainers];
|
||||
for (const container of containers) {
|
||||
for (const tab of container.children) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344b86e2a7c 100644
|
||||
index 5f406ea5d09273c9b70b84eee24c6267f88692f8..cdffd1cb1b7744aecc56a8ce57b115e218b527ed 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -424,11 +424,67 @@
|
||||
@@ -151,16 +151,17 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
// If focus is on the old tab, move it to the new tab.
|
||||
if (activeEl == oldTab) {
|
||||
newTab.focus();
|
||||
@@ -1762,7 +1833,7 @@
|
||||
@@ -1762,7 +1833,8 @@
|
||||
}
|
||||
|
||||
_setTabLabel(aTab, aLabel, { beforeTabOpen, isContentTitle, isURL } = {}) {
|
||||
- if (!aLabel || aLabel.includes("about:reader?")) {
|
||||
+ gZenPinnedTabManager.onTabLabelChanged(aTab);
|
||||
+ if (!aLabel || aLabel.includes("about:reader?") || aTab.hasAttribute("zen-has-static-label")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1865,7 +1936,7 @@
|
||||
@@ -1865,7 +1937,7 @@
|
||||
newIndex = this.selectedTab._tPos + 1;
|
||||
}
|
||||
|
||||
@@ -169,7 +170,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
let browser;
|
||||
if (targetTab) {
|
||||
browser = this.getBrowserForTab(targetTab);
|
||||
@@ -2122,6 +2193,7 @@
|
||||
@@ -2122,6 +2194,7 @@
|
||||
uriIsAboutBlank,
|
||||
userContextId,
|
||||
skipLoad,
|
||||
@@ -177,7 +178,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
} = {}) {
|
||||
let b = document.createXULElement("browser");
|
||||
// Use the JSM global to create the permanentKey, so that if the
|
||||
@@ -2195,8 +2267,7 @@
|
||||
@@ -2195,8 +2268,7 @@
|
||||
// we use a different attribute name for this?
|
||||
b.setAttribute("name", name);
|
||||
}
|
||||
@@ -187,7 +188,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
b.setAttribute("transparent", "true");
|
||||
}
|
||||
|
||||
@@ -2373,7 +2444,7 @@
|
||||
@@ -2373,7 +2445,7 @@
|
||||
|
||||
let panel = this.getPanel(browser);
|
||||
let uniqueId = this._generateUniquePanelID();
|
||||
@@ -196,7 +197,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
aTab.linkedPanel = uniqueId;
|
||||
|
||||
// Inject the <browser> into the DOM if necessary.
|
||||
@@ -2432,8 +2503,8 @@
|
||||
@@ -2432,8 +2504,8 @@
|
||||
// If we transitioned from one browser to two browsers, we need to set
|
||||
// hasSiblings=false on both the existing browser and the new browser.
|
||||
if (this.tabs.length == 2) {
|
||||
@@ -207,7 +208,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
} else {
|
||||
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
|
||||
}
|
||||
@@ -2655,6 +2726,7 @@
|
||||
@@ -2655,6 +2727,7 @@
|
||||
schemelessInput,
|
||||
hasValidUserGestureActivation = false,
|
||||
textDirectiveUserActivation = false,
|
||||
@@ -215,7 +216,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
} = {}
|
||||
) {
|
||||
// all callers of addTab that pass a params object need to pass
|
||||
@@ -2665,6 +2737,12 @@
|
||||
@@ -2665,6 +2738,12 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -228,7 +229,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (!UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.start("browser.tabs.opening", "initting", window);
|
||||
}
|
||||
@@ -2728,6 +2806,16 @@
|
||||
@@ -2728,6 +2807,16 @@
|
||||
noInitialLabel,
|
||||
skipBackgroundNotify,
|
||||
});
|
||||
@@ -245,7 +246,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (insertTab) {
|
||||
// insert the tab into the tab container in the correct position
|
||||
this._insertTabAtIndex(t, {
|
||||
@@ -2752,6 +2840,7 @@
|
||||
@@ -2752,6 +2841,7 @@
|
||||
initialBrowsingContextGroupId,
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
@@ -253,7 +254,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
}));
|
||||
|
||||
if (focusUrlBar) {
|
||||
@@ -2871,6 +2960,9 @@
|
||||
@@ -2871,6 +2961,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +264,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this._notifyPinnedStatus(t);
|
||||
@@ -2891,12 +2983,15 @@
|
||||
@@ -2891,12 +2984,15 @@
|
||||
* @param {string} [label=]
|
||||
* @returns {MozTabbrowserTabGroup}
|
||||
*/
|
||||
@@ -280,7 +281,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
return group;
|
||||
}
|
||||
|
||||
@@ -2937,6 +3032,7 @@
|
||||
@@ -2937,6 +3033,7 @@
|
||||
insertBefore = null,
|
||||
isUserCreated = false,
|
||||
telemetryUserCreateSource = "unknown",
|
||||
@@ -288,7 +289,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
} = {}
|
||||
) {
|
||||
if (!tabs?.length) {
|
||||
@@ -2951,7 +3047,12 @@
|
||||
@@ -2951,7 +3048,12 @@
|
||||
id = `${Date.now()}-${Math.round(Math.random() * 100)}`;
|
||||
}
|
||||
let group = this._createTabGroup(id, color, false, label);
|
||||
@@ -302,7 +303,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
group,
|
||||
insertBefore?.group ?? insertBefore
|
||||
);
|
||||
@@ -3268,6 +3369,7 @@
|
||||
@@ -3268,6 +3370,7 @@
|
||||
initialBrowsingContextGroupId,
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
@@ -310,7 +311,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
}
|
||||
) {
|
||||
// If we don't have a preferred remote type, and we have a remote
|
||||
@@ -3331,6 +3433,7 @@
|
||||
@@ -3331,6 +3434,7 @@
|
||||
openWindowInfo,
|
||||
name,
|
||||
skipLoad,
|
||||
@@ -318,7 +319,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3509,6 +3612,27 @@
|
||||
@@ -3509,6 +3613,27 @@
|
||||
) {
|
||||
tabWasReused = true;
|
||||
tab = this.selectedTab;
|
||||
@@ -346,7 +347,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (!tabData.pinned) {
|
||||
this.unpinTab(tab);
|
||||
} else {
|
||||
@@ -3522,6 +3646,7 @@
|
||||
@@ -3522,6 +3647,7 @@
|
||||
restoreTabsLazily && !select && !tabData.pinned;
|
||||
|
||||
let url = "about:blank";
|
||||
@@ -354,7 +355,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (tabData.entries?.length) {
|
||||
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
||||
// Ensure the index is in bounds.
|
||||
@@ -3557,7 +3682,27 @@
|
||||
@@ -3557,7 +3683,27 @@
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
});
|
||||
@@ -383,7 +384,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -3570,8 +3715,8 @@
|
||||
@@ -3570,8 +3716,8 @@
|
||||
// inserted in the DOM. If the tab is not yet in the DOM,
|
||||
// just insert it in the right place from the start.
|
||||
if (!tab.parentNode) {
|
||||
@@ -394,7 +395,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
tab.toggleAttribute("pinned", true);
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
// Then ensure all the tab open/pinning information is sent.
|
||||
@@ -3581,7 +3726,8 @@
|
||||
@@ -3581,7 +3727,8 @@
|
||||
// needs calling:
|
||||
shouldUpdateForPinnedTabs = true;
|
||||
}
|
||||
@@ -404,7 +405,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
let { groupId } = tabData;
|
||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||
// if a tab refers to a tab group we don't know, skip any group
|
||||
@@ -3595,7 +3741,10 @@
|
||||
@@ -3595,7 +3742,10 @@
|
||||
tabGroup.stateData.id,
|
||||
tabGroup.stateData.color,
|
||||
tabGroup.stateData.collapsed,
|
||||
@@ -416,7 +417,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
);
|
||||
tabsFragment.appendChild(tabGroup.node);
|
||||
}
|
||||
@@ -3646,6 +3795,9 @@
|
||||
@@ -3646,6 +3796,9 @@
|
||||
this.selectedTab = tabToSelect;
|
||||
this.removeTab(leftoverTab);
|
||||
}
|
||||
@@ -426,7 +427,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
this._updateTabsAfterInsert();
|
||||
@@ -3830,7 +3982,7 @@
|
||||
@@ -3830,7 +3983,7 @@
|
||||
// Ensure we have an index if one was not provided.
|
||||
if (typeof index != "number") {
|
||||
// Move the new tab after another tab if needed, to the end otherwise.
|
||||
@@ -435,7 +436,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -3876,18 +4028,18 @@
|
||||
@@ -3876,18 +4029,18 @@
|
||||
|
||||
// Ensure index is within bounds.
|
||||
if (tab.pinned) {
|
||||
@@ -458,7 +459,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (tabAfter && tabAfter.group == tabGroup) {
|
||||
// Place at the front of, or between tabs in, the same tab group
|
||||
this.tabContainer.insertBefore(tab, tabAfter);
|
||||
@@ -4199,6 +4351,9 @@
|
||||
@@ -4199,6 +4352,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -468,7 +469,15 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
this.removeTabs(selectedTabs);
|
||||
}
|
||||
|
||||
@@ -4556,6 +4711,7 @@
|
||||
@@ -4450,6 +4606,7 @@
|
||||
skipGroupCheck = false,
|
||||
} = {}
|
||||
) {
|
||||
+ tabs = tabs.filter(tab => !tab.hasAttribute("zen-empty-tab"));
|
||||
// When 'closeWindowWithLastTab' pref is enabled, closing all tabs
|
||||
// can be considered equivalent to closing the window.
|
||||
if (
|
||||
@@ -4556,6 +4713,7 @@
|
||||
skipSessionStore,
|
||||
} = {}
|
||||
) {
|
||||
@@ -476,7 +485,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.finish("browser.tabs.opening", window);
|
||||
}
|
||||
@@ -4572,6 +4728,12 @@
|
||||
@@ -4572,6 +4730,12 @@
|
||||
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||
}
|
||||
|
||||
@@ -489,7 +498,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
// Handle requests for synchronously removing an already
|
||||
// asynchronously closing tab.
|
||||
if (!animate && aTab.closing) {
|
||||
@@ -4586,7 +4748,9 @@
|
||||
@@ -4586,7 +4750,9 @@
|
||||
// frame created for it (for example, by updating the visually selected
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
@@ -500,7 +509,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -4600,7 +4764,6 @@
|
||||
@@ -4600,7 +4766,6 @@
|
||||
TelemetryStopwatch.cancel("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||
return;
|
||||
}
|
||||
@@ -508,7 +517,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
let lockTabSizing =
|
||||
!this.tabContainer.verticalMode &&
|
||||
!aTab.pinned &&
|
||||
@@ -4739,14 +4902,14 @@
|
||||
@@ -4739,14 +4904,14 @@
|
||||
!!this.tabsInCollapsedTabGroups.length;
|
||||
if (
|
||||
aTab.visible &&
|
||||
@@ -525,7 +534,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -4770,6 +4933,7 @@
|
||||
@@ -4770,6 +4935,7 @@
|
||||
|
||||
newTab = true;
|
||||
}
|
||||
@@ -533,7 +542,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||
|
||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||
@@ -4810,9 +4974,7 @@
|
||||
@@ -4810,9 +4976,7 @@
|
||||
aTab._mouseleave();
|
||||
|
||||
if (newTab) {
|
||||
@@ -544,7 +553,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
} else {
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -4941,6 +5103,8 @@
|
||||
@@ -4941,6 +5105,8 @@
|
||||
this.tabs[i]._tPos = i;
|
||||
}
|
||||
|
||||
@@ -553,7 +562,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (!this._windowIsClosing) {
|
||||
if (wasPinned) {
|
||||
this.tabContainer._positionPinnedTabs();
|
||||
@@ -5064,8 +5228,8 @@
|
||||
@@ -5064,8 +5230,8 @@
|
||||
return closedCount;
|
||||
}
|
||||
|
||||
@@ -564,7 +573,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (unloadBlocked) {
|
||||
return;
|
||||
}
|
||||
@@ -5159,7 +5323,7 @@
|
||||
@@ -5159,7 +5325,7 @@
|
||||
!excludeTabs.has(aTab.owner) &&
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||
) {
|
||||
@@ -573,7 +582,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
}
|
||||
|
||||
// Try to find a remaining tab that comes after the given tab
|
||||
@@ -5181,7 +5345,7 @@
|
||||
@@ -5181,7 +5347,7 @@
|
||||
}
|
||||
|
||||
if (tab) {
|
||||
@@ -582,7 +591,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
}
|
||||
|
||||
// If no qualifying visible tab was found, see if there is a tab in
|
||||
@@ -5599,10 +5763,10 @@
|
||||
@@ -5599,10 +5765,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -595,7 +604,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -5838,7 +6002,7 @@
|
||||
@@ -5838,7 +6004,7 @@
|
||||
moveTabTo(aTab, aIndex, { forceStandaloneTab = false } = {}) {
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (aTab.pinned) {
|
||||
@@ -604,7 +613,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
} else {
|
||||
aIndex = Math.max(aIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -5848,10 +6012,17 @@
|
||||
@@ -5848,10 +6014,17 @@
|
||||
|
||||
this.#handleTabMove(aTab, () => {
|
||||
let neighbor = this.tabs[aIndex];
|
||||
@@ -624,7 +633,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
neighbor.after(aTab);
|
||||
} else {
|
||||
this.tabContainer.insertBefore(aTab, neighbor);
|
||||
@@ -5901,13 +6072,22 @@
|
||||
@@ -5901,13 +6074,22 @@
|
||||
* Bug 1955388 - prevent pinned tabs from commingling with non-pinned tabs
|
||||
* when there are hidden tabs present
|
||||
*/
|
||||
@@ -648,7 +657,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (tab.pinned && this.tabContainer.verticalMode) {
|
||||
return this.tabContainer.verticalPinnedTabsContainer;
|
||||
}
|
||||
@@ -5937,7 +6117,7 @@
|
||||
@@ -5937,7 +6119,7 @@
|
||||
}
|
||||
|
||||
moveTabToGroup(aTab, aGroup) {
|
||||
@@ -657,7 +666,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
return;
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
@@ -5961,6 +6141,10 @@
|
||||
@@ -5961,6 +6143,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
@@ -668,7 +677,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -6015,7 +6199,7 @@
|
||||
@@ -6015,7 +6201,7 @@
|
||||
createLazyBrowser,
|
||||
};
|
||||
|
||||
@@ -677,7 +686,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
if (aIndex < numPinned || (aTab.pinned && aIndex == numPinned)) {
|
||||
params.pinned = true;
|
||||
}
|
||||
@@ -6765,7 +6949,7 @@
|
||||
@@ -6765,7 +6951,7 @@
|
||||
// preventDefault(). It will still raise the window if appropriate.
|
||||
break;
|
||||
}
|
||||
@@ -686,7 +695,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
@@ -7671,6 +7855,7 @@
|
||||
@@ -7671,6 +7857,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -694,7 +703,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -8640,7 +8825,7 @@ var TabContextMenu = {
|
||||
@@ -8640,7 +8827,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !this.multiselected;
|
||||
@@ -703,7 +712,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
// Move Tab items
|
||||
let contextMoveTabOptions = document.getElementById(
|
||||
"context_moveTabOptions"
|
||||
@@ -8674,7 +8859,7 @@ var TabContextMenu = {
|
||||
@@ -8674,7 +8861,7 @@ var TabContextMenu = {
|
||||
let isFirstTab =
|
||||
!this.contextTabs[0].group &&
|
||||
(this.contextTabs[0] == visibleTabs[0] ||
|
||||
@@ -712,7 +721,7 @@ index 5f406ea5d09273c9b70b84eee24c6267f88692f8..70cde185cb560a325f894c0ce79f1344
|
||||
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
|
||||
|
||||
document.getElementById("context_openTabInWindow").disabled =
|
||||
@@ -8904,6 +9089,7 @@ var TabContextMenu = {
|
||||
@@ -8904,6 +9091,7 @@ var TabContextMenu = {
|
||||
if (this.contextTab.multiselected) {
|
||||
gBrowser.removeMultiSelectedTabs();
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
|
||||
index 5da0404b2672ba8cce7bcf808bf2373474776654..1405c53a927a64ecda8255d78d9aa5ddf8806685 100644
|
||||
index 5da0404b2672ba8cce7bcf808bf2373474776654..3b93217b38f25f54d7ef44d151e314bc1c5e5ce3 100644
|
||||
--- a/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
|
||||
+++ b/toolkit/components/pictureinpicture/PictureInPicture.sys.mjs
|
||||
@@ -494,7 +494,7 @@ export var PictureInPicture = {
|
||||
@@ -11,11 +11,3 @@ index 5da0404b2672ba8cce7bcf808bf2373474776654..1405c53a927a64ecda8255d78d9aa5dd
|
||||
await this.closeSinglePipWindow({ reason: "Unpip", actorRef: pipActor });
|
||||
},
|
||||
|
||||
@@ -623,6 +623,7 @@ export var PictureInPicture = {
|
||||
pipToggle.hidden = true;
|
||||
}
|
||||
|
||||
+ win.gZenMediaController.updatePipEligibility(browser, !pipToggle.hidden);
|
||||
let browserHasPip = !!this.browserWeakMap.get(browser);
|
||||
if (browserHasPip) {
|
||||
this.setUrlbarPipIconActive(browser.ownerGlobal);
|
||||
|
||||
10
surfer.json
10
surfer.json
@@ -5,8 +5,8 @@
|
||||
"binaryName": "zen",
|
||||
"version": {
|
||||
"product": "firefox",
|
||||
"version": "137.0",
|
||||
"candidate": "137.0"
|
||||
"version": "137.0.1",
|
||||
"candidate": "137.0.1"
|
||||
},
|
||||
"buildOptions": {
|
||||
"generateBranding": true
|
||||
@@ -19,7 +19,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.11.1b",
|
||||
"displayVersion": "1.11.2b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
@@ -39,7 +39,7 @@
|
||||
"brandShortName": "Twilight",
|
||||
"brandFullName": "Zen Twilight",
|
||||
"release": {
|
||||
"displayVersion": "1.11.1t",
|
||||
"displayVersion": "1.11.2t",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
}
|
||||
@@ -53,4 +53,4 @@
|
||||
"licenseType": "MPL-2.0"
|
||||
},
|
||||
"updateHostname": "updates.zen-browser.app"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user