1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 21:49:58 +02:00

Updated to firfox RC 140.0 (#9092)

This commit is contained in:
mr. m 2025-06-18 17:16:40 +02:00 committed by GitHub
parent dcd032856b
commit bed6fa7eca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 278 additions and 273 deletions

View file

@ -30,7 +30,7 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
### Firefox Versions ### Firefox Versions
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `139.0.4`! 🚀 - [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `139.0.4`! 🚀
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 139.0.4`! - [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 140.0`!
### Contributing ### Contributing

View file

@ -1 +1 @@
29fd9c19879c6f9bfcf414f47426d8dc00dee1a5 667950575bde54b8d83db2a25ccf468522d4e0c9

View file

@ -53,3 +53,4 @@ pref("app.update.checkInstallTime.days", 6);
// TODO: Check this out! // TODO: Check this out!
pref("browser.profiles.enabled", false); pref("browser.profiles.enabled", false);
pref("browser.tabs.groups.enabled", false); pref("browser.tabs.groups.enabled", false);
pref("browser.urlbar.scotchBonnet.enableOverride", false);

View file

@ -1,10 +1,10 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index beced8067e6c8b5c8cf8e3f6060ba259ec9a294d..33a264e7f9cf97944da3888bdb957fa6e7c4c346 100644 index 412e0879bbb0c7e7d1eb842212b064e1c77cab8f..bd23e5f2cd3f9c382f704fd1fcfdbb3edd71a454 100644
--- a/browser/app/profile/firefox.js --- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js
@@ -3398,3 +3398,5 @@ pref("toolkit.contentRelevancy.enabled", false); @@ -3361,3 +3361,5 @@ pref("toolkit.contentRelevancy.log", false);
pref("toolkit.contentRelevancy.ingestEnabled", false); // rotation altogether.
// Pref to enable extra logging for the content relevancy feature pref("browser.contextual-services.contextId.rotation-in-days", 0);
pref("toolkit.contentRelevancy.log", false); pref("browser.contextual-services.contextId.rust-component.enabled", false);
+ +
+#include zen-browser.js +#include zen-browser.js

View file

@ -3,7 +3,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Enable transparent background for macos // Enable transparent background for macos
pref('widget.macos.titlebar-blend-mode.behind-window', true); pref('widget.macos.sidebar-blend-mode.behind-window', true);
// 1. hudWindow // 1. hudWindow
// 2. fullScreenUI // 2. fullScreenUI
// 3. popover // 3. popover

View file

@ -1,8 +1,8 @@
diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js
index 73593191936cc345ee8e2c28cb251dc13f4c2fd4..e6c459c1ebc60a1f3930a55e212570f696bf07a0 100644 index f4d5125d9a1c8f0aef24536ca7d2ef3f133d8a99..cacd7f465e67226de4a366354779c6cb0cbd0b4c 100644
--- a/browser/base/content/browser-addons.js --- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js +++ b/browser/base/content/browser-addons.js
@@ -735,7 +735,7 @@ var gXPInstallObserver = { @@ -1057,7 +1057,7 @@ var gXPInstallObserver = {
persistent: true, persistent: true,
hideClose: true, hideClose: true,
popupOptions: { popupOptions: {
@ -11,7 +11,7 @@ index 73593191936cc345ee8e2c28cb251dc13f4c2fd4..e6c459c1ebc60a1f3930a55e212570f6
}, },
}; };
@@ -942,7 +942,7 @@ var gXPInstallObserver = { @@ -1266,7 +1266,7 @@ var gXPInstallObserver = {
hideClose: true, hideClose: true,
timeout: Date.now() + 30000, timeout: Date.now() + 30000,
popupOptions: { popupOptions: {
@ -20,16 +20,16 @@ index 73593191936cc345ee8e2c28cb251dc13f4c2fd4..e6c459c1ebc60a1f3930a55e212570f6
}, },
}; };
@@ -2125,7 +2125,7 @@ var gUnifiedExtensions = { @@ -2571,7 +2571,7 @@ var gUnifiedExtensions = {
this.recordButtonTelemetry(reason || "extensions_panel_showing");
panel.hidden = false; this.ensureButtonShownBeforeAttachingPanel(panel);
PanelMultiView.openPopup(panel, this._button, { PanelMultiView.openPopup(panel, this._button, {
- position: "bottomright topright", - position: "bottomright topright",
+ position: gZenUIManager.panelUIPosition, + position: gZenUIManager.panelUIPosition,
triggerEvent: aEvent, triggerEvent: aEvent,
}); });
} }
@@ -2294,18 +2294,20 @@ var gUnifiedExtensions = { @@ -2758,18 +2758,20 @@ var gUnifiedExtensions = {
this._maybeMoveWidgetNodeBack(widgetId); this._maybeMoveWidgetNodeBack(widgetId);
} }

View file

@ -1,9 +1,9 @@
diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml
index 7d7e8697f02f90d4f336c9ab0a73a89848e0c21c..64e950106dd05b443ce72107613ac9cc405d56ea 100644 index afa7f8e7dd74173bf2c696bd96f7e86e8b0126bc..4847c24923f673e91eb7fb65ea6b037f38062405 100644
--- a/browser/base/content/browser-box.inc.xhtml --- a/browser/base/content/browser-box.inc.xhtml
+++ b/browser/base/content/browser-box.inc.xhtml +++ b/browser/base/content/browser-box.inc.xhtml
@@ -23,7 +23,15 @@ @@ -25,7 +25,15 @@
<browser id="sidebar" autoscroll="false" disablehistory="true" disablefullscreen="true" tooltip="aHTMLTooltip"/> </stack>
</vbox> </vbox>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/> <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" resizebefore="sibling" resizeafter="none" hidden="true"/>
+<vbox flex="1" id="zen-appcontent-wrapper"> +<vbox flex="1" id="zen-appcontent-wrapper">

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml
index 30e7b9b2ac63db6ccd2727a9341081cecefc25cb..ceff29d10a32fe9e5296340c8c56a2fdbf321c31 100644 index ad1515eb111bc2532b2f17ea28fc04463030d30d..899f4baf2cd3472abd5591f3c9987f0c02b9313f 100644
--- a/browser/base/content/navigator-toolbox.inc.xhtml --- a/browser/base/content/navigator-toolbox.inc.xhtml
+++ b/browser/base/content/navigator-toolbox.inc.xhtml +++ b/browser/base/content/navigator-toolbox.inc.xhtml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
@ -29,9 +29,9 @@ index 30e7b9b2ac63db6ccd2727a9341081cecefc25cb..ceff29d10a32fe9e5296340c8c56a2fd
+<html:div id="zen-essentials" skipintoolbarset="true"></html:div> +<html:div id="zen-essentials" skipintoolbarset="true"></html:div>
+<html:div id="zen-tabs-wrapper"> +<html:div id="zen-tabs-wrapper">
<hbox class="tab-drop-indicator" hidden="true"/> <hbox class="tab-drop-indicator" hidden="true"/>
<html:span id="tab-drag-empty-feedback" role="presentation"/>
# If the name (tabbrowser-arrowscrollbox) or structure of this changes # If the name (tabbrowser-arrowscrollbox) or structure of this changes
@@ -76,6 +78,7 @@ # significantly, there is an optimization in
@@ -75,6 +77,7 @@
tooltip="dynamic-shortcut-tooltip" tooltip="dynamic-shortcut-tooltip"
data-l10n-id="tabs-toolbar-new-tab"/> data-l10n-id="tabs-toolbar-new-tab"/>
<html:span id="tabbrowser-tab-a11y-desc" hidden="true"/> <html:span id="tabbrowser-tab-a11y-desc" hidden="true"/>
@ -39,7 +39,7 @@ index 30e7b9b2ac63db6ccd2727a9341081cecefc25cb..ceff29d10a32fe9e5296340c8c56a2fd
</tabs> </tabs>
<toolbarbutton id="new-tab-button" <toolbarbutton id="new-tab-button"
@@ -101,9 +104,10 @@ @@ -100,9 +103,10 @@
#include private-browsing-indicator.inc.xhtml #include private-browsing-indicator.inc.xhtml
<toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/> <toolbarbutton class="content-analysis-indicator toolbarbutton-1 content-analysis-indicator-icon"/>

View file

@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.js b/browser/base/content/navigator-toolbox.js diff --git a/browser/base/content/navigator-toolbox.js b/browser/base/content/navigator-toolbox.js
index 64ded8fb2c08f1dbfec8fe08ab427a24b53f1169..9e1e888554279b6e1df3bc1cb907afd2ccb330ca 100644 index 31d0ee325847834e7c58c1079225adf43d738bcd..4d2c69d4dd7e313bdb085530b3289dc9d93530a5 100644
--- a/browser/base/content/navigator-toolbox.js --- a/browser/base/content/navigator-toolbox.js
+++ b/browser/base/content/navigator-toolbox.js +++ b/browser/base/content/navigator-toolbox.js
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
@ -17,8 +17,8 @@ index 64ded8fb2c08f1dbfec8fe08ab427a24b53f1169..9e1e888554279b6e1df3bc1cb907afd2
#reader-mode-button, #reader-mode-button,
+ #zen-tabs-wrapper, + #zen-tabs-wrapper,
#picture-in-picture-button, #picture-in-picture-button,
#shopping-sidebar-button,
#urlbar-zoom-button, #urlbar-zoom-button,
#star-button-box,
@@ -208,6 +209,7 @@ document.addEventListener( @@ -208,6 +209,7 @@ document.addEventListener(
case "vertical-tabs-newtab-button": case "vertical-tabs-newtab-button":
case "tabs-newtab-button": case "tabs-newtab-button":

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
index cebca6d017a0c3fc8eff7a38f987726324789e69..73a24df91bec368f2f27c538b37d57595e18c599 100644 index bde641f7112adde948707c172b9f18d3635d8ef1..3f430451586904e6be086114ec10f719745093be 100644
--- a/browser/components/BrowserGlue.sys.mjs --- a/browser/components/BrowserGlue.sys.mjs
+++ b/browser/components/BrowserGlue.sys.mjs +++ b/browser/components/BrowserGlue.sys.mjs
@@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; @@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
@ -8,13 +8,14 @@ index cebca6d017a0c3fc8eff7a38f987726324789e69..73a24df91bec368f2f27c538b37d5759
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
+ gZenUIMigration: "chrome://browser/content/zen-components/ZenUIMigration.mjs", + gZenUIMigration: "chrome://browser/content/zen-components/ZenUIMigration.mjs",
AboutHomeStartupCache: "resource:///modules/AboutHomeStartupCache.sys.mjs", AboutHomeStartupCache: "resource:///modules/AboutHomeStartupCache.sys.mjs",
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs", AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs",
@@ -881,6 +882,7 @@ BrowserGlue.prototype = { ASRouter: "resource:///modules/asrouter/ASRouter.sys.mjs",
@@ -1659,6 +1660,8 @@ BrowserGlue.prototype = {
} else if (profileDataVersion < APP_DATA_VERSION) {
lazy.ProfileDataUpgrader.upgrade(profileDataVersion, APP_DATA_VERSION);
}
+
+ lazy.gZenUIMigration.init(this._isNewProfile);
},
lazy.ProcessHangMonitor.init(); async _showUpgradeDialog() {
+ lazy.gZenUIMigration.init(this._isNewProfile, aWindow);
// A channel for "remote troubleshooting" code...
let channel = new lazy.WebChannel(
"remote-troubleshooting",

View file

@ -1,16 +1,16 @@
diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js diff --git a/browser/components/extensions/parent/ext-tabs.js b/browser/components/extensions/parent/ext-tabs.js
index 517ea0079c12941a844a4f9e4ba694c6411887ee..510ab14dfa2178c332c9862d6a01b75bd12dfe3b 100644 index a53a12f91817a9e3d1773480928e858bc3182c77..10f6559ffb128906be31de220c93320e9a6d40e7 100644
--- a/browser/components/extensions/parent/ext-tabs.js --- a/browser/components/extensions/parent/ext-tabs.js
+++ b/browser/components/extensions/parent/ext-tabs.js +++ b/browser/components/extensions/parent/ext-tabs.js
@@ -482,6 +482,7 @@ this.tabs = class extends ExtensionAPIPersistent { @@ -494,6 +494,7 @@ this.tabs = class extends ExtensionAPIPersistent {
} }
let tab = tabManager.getWrapper(event.originalTarget); let tab = tabManager.getWrapper(updatedTab);
+ if (!tab) return; + if (!tab) return;
let changeInfo = {}; let changeInfo = {};
for (let prop of needed) { for (let prop of needed) {
@@ -836,6 +837,7 @@ this.tabs = class extends ExtensionAPIPersistent { @@ -848,6 +849,7 @@ this.tabs = class extends ExtensionAPIPersistent {
}); });
} }

View file

@ -1,8 +1,8 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927c24bdc6d 100644 index be029379c101a0105d4837136e064e6007b67c3e..f998ad44015b05104e8a1dbeebd7b94e586e4fbd 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs --- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs +++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -2088,7 +2088,6 @@ var SessionStoreInternal = { @@ -2120,7 +2120,6 @@ var SessionStoreInternal = {
if (closedWindowState) { if (closedWindowState) {
let newWindowState; let newWindowState;
if ( if (
@ -10,7 +10,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
!lazy.SessionStartup.willRestore() !lazy.SessionStartup.willRestore()
) { ) {
// We want to split the window up into pinned tabs and unpinned tabs. // We want to split the window up into pinned tabs and unpinned tabs.
@@ -2303,11 +2302,9 @@ var SessionStoreInternal = { @@ -2353,11 +2352,9 @@ var SessionStoreInternal = {
tabbrowser.selectedTab.label; tabbrowser.selectedTab.label;
} }
@ -22,7 +22,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
// Store the window's close date to figure out when each individual tab // Store the window's close date to figure out when each individual tab
// was closed. This timestamp should allow re-arranging data based on how // was closed. This timestamp should allow re-arranging data based on how
@@ -3216,7 +3213,7 @@ var SessionStoreInternal = { @@ -3303,7 +3300,7 @@ var SessionStoreInternal = {
if (!isPrivateWindow && tabState.isPrivate) { if (!isPrivateWindow && tabState.isPrivate) {
return; return;
} }
@ -31,7 +31,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
return; return;
} }
@@ -3925,6 +3922,11 @@ var SessionStoreInternal = { @@ -4012,6 +4009,11 @@ var SessionStoreInternal = {
Math.min(tabState.index, tabState.entries.length) Math.min(tabState.index, tabState.entries.length)
); );
tabState.pinned = false; tabState.pinned = false;
@ -43,15 +43,15 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
if (inBackground === false) { if (inBackground === false) {
aWindow.gBrowser.selectedTab = newTab; aWindow.gBrowser.selectedTab = newTab;
@@ -4361,6 +4363,7 @@ var SessionStoreInternal = { @@ -4448,6 +4450,7 @@ var SessionStoreInternal = {
// Append the tab if we're opening into a different window, // Append the tab if we're opening into a different window,
index: aSource == aTargetWindow ? pos : Infinity, tabIndex: aSource == aTargetWindow ? pos : Infinity,
pinned: state.pinned, pinned: state.pinned,
+ essential: state.zenEssential, + essential: state.zenEssential,
userContextId: state.userContextId, userContextId: state.userContextId,
skipLoad: true, skipLoad: true,
preferredRemoteType, preferredRemoteType,
@@ -5179,7 +5182,7 @@ var SessionStoreInternal = { @@ -5303,7 +5306,7 @@ var SessionStoreInternal = {
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) { for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
let tab = tabbrowser.tabs[i]; let tab = tabbrowser.tabs[i];
@ -60,7 +60,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
removableTabs.push(tab); removableTabs.push(tab);
} }
} }
@@ -5239,7 +5242,7 @@ var SessionStoreInternal = { @@ -5363,7 +5366,7 @@ var SessionStoreInternal = {
} }
let workspaceID = aWindow.getWorkspaceID(); let workspaceID = aWindow.getWorkspaceID();
@ -69,7 +69,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
winData.workspaceID = workspaceID; winData.workspaceID = workspaceID;
} }
}, },
@@ -5430,14 +5433,15 @@ var SessionStoreInternal = { @@ -5554,14 +5557,15 @@ var SessionStoreInternal = {
} }
let tabbrowser = aWindow.gBrowser; let tabbrowser = aWindow.gBrowser;
@ -87,7 +87,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
continue; continue;
} }
let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab)); let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab));
@@ -5456,8 +5460,8 @@ var SessionStoreInternal = { @@ -5580,8 +5584,8 @@ var SessionStoreInternal = {
// We don't store the Firefox View tab in Session Store, so if it was the last selected "tab" when // We don't store the Firefox View tab in Session Store, so if it was the last selected "tab" when
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab, // a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
// since it's only inserted into the tab strip after it's selected). // since it's only inserted into the tab strip after it's selected).
@ -98,7 +98,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
winData.title = tabbrowser.tabs[0].label; winData.title = tabbrowser.tabs[0].label;
} }
winData.selected = selectedIndex; winData.selected = selectedIndex;
@@ -5569,8 +5573,8 @@ var SessionStoreInternal = { @@ -5693,8 +5697,8 @@ var SessionStoreInternal = {
// selectTab represents. // selectTab represents.
let selectTab = 0; let selectTab = 0;
if (overwriteTabs) { if (overwriteTabs) {
@ -109,7 +109,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
selectTab = Math.min(selectTab, winData.tabs.length); selectTab = Math.min(selectTab, winData.tabs.length);
} }
@@ -5613,6 +5617,7 @@ var SessionStoreInternal = { @@ -5737,6 +5741,7 @@ var SessionStoreInternal = {
winData.tabs, winData.tabs,
winData.groups ?? [] winData.groups ?? []
); );
@ -117,7 +117,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..d3472a36fc99c488f0fd0fa8cb9c6927
this._log.debug( this._log.debug(
`restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs` `restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs`
); );
@@ -6162,6 +6167,22 @@ var SessionStoreInternal = { @@ -6286,6 +6291,22 @@ var SessionStoreInternal = {
// Most of tabData has been restored, now continue with restoring // Most of tabData has been restored, now continue with restoring
// attributes that may trigger external events. // attributes that may trigger external events.

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b107efb855 100644 index 793ba822f087f4d198c9876ed208ff16d8a41e3b..e53ccd748de015997c355d5d37cb38cc73e90f3d 100644
--- a/browser/components/tabbrowser/content/tab.js --- a/browser/components/tabbrowser/content/tab.js
+++ b/browser/components/tabbrowser/content/tab.js +++ b/browser/components/tabbrowser/content/tab.js
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
@ -68,15 +68,15 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
on_click(event) { on_click(event) {
if (event.button != 0) { if (event.button != 0) {
return; return;
@@ -559,6 +568,7 @@ @@ -561,6 +570,7 @@
telemetrySource: lazy.TabMetrics.METRIC_SOURCE.TAB_STRIP, )
}); );
} else { } else {
+ gZenPinnedTabManager._removePinnedAttributes(this, true); + gZenPinnedTabManager._removePinnedAttributes(this, true);
gBrowser.removeTab(this, { gBrowser.removeTab(this, {
animate: true, animate: true,
triggeringEvent: event, triggeringEvent: event,
@@ -569,6 +579,14 @@ @@ -573,6 +583,14 @@
// (see tabbrowser-tabs 'click' handler). // (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true; gBrowser.tabContainer._blockDblClick = true;
} }
@ -91,7 +91,7 @@ index f43ab1cf6257ff1a9c9aa522a0180fd9bbfe4036..d9714c46de860243b06af7e8343d36b1
} }
on_dblclick(event) { on_dblclick(event) {
@@ -592,6 +610,8 @@ @@ -596,6 +614,8 @@
animate: true, animate: true,
triggeringEvent: event, triggeringEvent: event,
}); });

View file

@ -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 d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386ffc8ec0b 100644 index 37570c54b06f9cebc46aa232e2d01ac5d330e17a..818b1df6778d9d299b86fefa46bbf1d689d29fdb 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
@@ -413,11 +413,41 @@ @@ -413,11 +413,41 @@
@ -188,7 +188,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} else { } else {
aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1; aTab.linkedBrowser.browsingContext.hasSiblings = this.tabs.length > 1;
} }
@@ -2680,6 +2726,8 @@ @@ -2679,6 +2725,8 @@
schemelessInput, schemelessInput,
hasValidUserGestureActivation = false, hasValidUserGestureActivation = false,
textDirectiveUserActivation = false, textDirectiveUserActivation = false,
@ -197,7 +197,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} = {} } = {}
) { ) {
// all callers of addTab that pass a params object need to pass // all callers of addTab that pass a params object need to pass
@@ -2690,6 +2738,12 @@ @@ -2689,6 +2737,12 @@
); );
} }
@ -210,7 +210,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
if (!UserInteraction.running("browser.tabs.opening", window)) { if (!UserInteraction.running("browser.tabs.opening", window)) {
UserInteraction.start("browser.tabs.opening", "initting", window); UserInteraction.start("browser.tabs.opening", "initting", window);
} }
@@ -2753,6 +2807,19 @@ @@ -2752,6 +2806,19 @@
noInitialLabel, noInitialLabel,
skipBackgroundNotify, skipBackgroundNotify,
}); });
@ -229,8 +229,8 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
+ } + }
if (insertTab) { if (insertTab) {
// Insert the tab into the tab container in the correct position. // Insert the tab into the tab container in the correct position.
// For now, we support `index` as an alias for `tabIndex`. this.#insertTabAtIndex(t, {
@@ -2765,6 +2832,7 @@ @@ -2760,6 +2827,7 @@
ownerTab, ownerTab,
openerTab, openerTab,
pinned, pinned,
@ -238,7 +238,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
bulkOrderedOpen, bulkOrderedOpen,
tabGroup: tabGroup ?? openerTab?.group, tabGroup: tabGroup ?? openerTab?.group,
}); });
@@ -2783,6 +2851,7 @@ @@ -2778,6 +2846,7 @@
openWindowInfo, openWindowInfo,
skipLoad, skipLoad,
triggeringRemoteType, triggeringRemoteType,
@ -246,7 +246,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
})); }));
if (focusUrlBar) { if (focusUrlBar) {
@@ -2902,6 +2971,12 @@ @@ -2897,6 +2966,12 @@
} }
} }
@ -259,7 +259,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
// Additionally send pinned tab events // Additionally send pinned tab events
if (pinned) { if (pinned) {
this._notifyPinnedStatus(t); this._notifyPinnedStatus(t);
@@ -2990,10 +3065,10 @@ @@ -2985,10 +3060,10 @@
isAdoptingGroup = false, isAdoptingGroup = false,
isUserTriggered = false, isUserTriggered = false,
telemetryUserCreateSource = "unknown", telemetryUserCreateSource = "unknown",
@ -271,7 +271,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} }
if (!color) { if (!color) {
@@ -3014,7 +3089,12 @@ @@ -3009,7 +3084,12 @@
label, label,
isAdoptingGroup isAdoptingGroup
); );
@ -285,7 +285,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
group, group,
insertBefore?.group ?? insertBefore insertBefore?.group ?? insertBefore
); );
@@ -3303,6 +3383,7 @@ @@ -3304,6 +3384,7 @@
openWindowInfo, openWindowInfo,
skipLoad, skipLoad,
triggeringRemoteType, triggeringRemoteType,
@ -293,7 +293,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} }
) { ) {
// If we don't have a preferred remote type (or it is `NOT_REMOTE`), and // If we don't have a preferred remote type (or it is `NOT_REMOTE`), and
@@ -3372,6 +3453,7 @@ @@ -3373,6 +3454,7 @@
openWindowInfo, openWindowInfo,
name, name,
skipLoad, skipLoad,
@ -301,7 +301,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
}); });
} }
@@ -3517,7 +3599,9 @@ @@ -3518,7 +3600,9 @@
let shouldUpdateForPinnedTabs = false; let shouldUpdateForPinnedTabs = false;
/** @type {Map<TabGroupStateData['id'], TabGroupWorkingData>} */ /** @type {Map<TabGroupStateData['id'], TabGroupWorkingData>} */
let tabGroupWorkingData = new Map(); let tabGroupWorkingData = new Map();
@ -312,7 +312,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
for (const tabGroupData of tabGroupDataList) { for (const tabGroupData of tabGroupDataList) {
tabGroupWorkingData.set(tabGroupData.id, { tabGroupWorkingData.set(tabGroupData.id, {
stateData: tabGroupData, stateData: tabGroupData,
@@ -3560,7 +3644,7 @@ @@ -3561,7 +3645,7 @@
// Add a new tab if needed. // Add a new tab if needed.
if (!tab) { if (!tab) {
let createLazyBrowser = let createLazyBrowser =
@ -321,7 +321,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
let url = "about:blank"; let url = "about:blank";
if (tabData.entries?.length) { if (tabData.entries?.length) {
@@ -3598,7 +3682,8 @@ @@ -3599,7 +3683,8 @@
skipLoad: true, skipLoad: true,
preferredRemoteType, preferredRemoteType,
}); });
@ -331,7 +331,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
if (select) { if (select) {
tabToSelect = tab; tabToSelect = tab;
} }
@@ -3622,7 +3707,8 @@ @@ -3623,7 +3708,8 @@
// needs calling: // needs calling:
shouldUpdateForPinnedTabs = true; shouldUpdateForPinnedTabs = true;
} }
@ -341,7 +341,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
let { groupId } = tabData; let { groupId } = tabData;
const tabGroup = tabGroupWorkingData.get(groupId); const tabGroup = tabGroupWorkingData.get(groupId);
// if a tab refers to a tab group we don't know, skip any group // if a tab refers to a tab group we don't know, skip any group
@@ -3636,7 +3722,10 @@ @@ -3637,7 +3723,10 @@
tabGroup.stateData.id, tabGroup.stateData.id,
tabGroup.stateData.color, tabGroup.stateData.color,
tabGroup.stateData.collapsed, tabGroup.stateData.collapsed,
@ -353,7 +353,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
); );
tabsFragment.appendChild(tabGroup.node); tabsFragment.appendChild(tabGroup.node);
} }
@@ -3684,9 +3773,23 @@ @@ -3685,9 +3774,23 @@
// to remove the old selected tab. // to remove the old selected tab.
if (tabToSelect) { if (tabToSelect) {
let leftoverTab = this.selectedTab; let leftoverTab = this.selectedTab;
@ -377,7 +377,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
if (tabs.length > 1 || !tabs[0].selected) { if (tabs.length > 1 || !tabs[0].selected) {
this._updateTabsAfterInsert(); this._updateTabsAfterInsert();
@@ -3881,7 +3984,7 @@ @@ -3882,7 +3985,7 @@
// Ensure we have an index if one was not provided. // Ensure we have an index if one was not provided.
if (typeof elementIndex != "number" && typeof tabIndex != "number") { if (typeof elementIndex != "number" && typeof tabIndex != "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.
@ -386,7 +386,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
if ( if (
!bulkOrderedOpen && !bulkOrderedOpen &&
((openerTab && ((openerTab &&
@@ -3904,7 +4007,7 @@ @@ -3905,7 +4008,7 @@
) { ) {
elementIndex = Infinity; elementIndex = Infinity;
} else if (previousTab.visible) { } else if (previousTab.visible) {
@ -395,7 +395,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} else if (previousTab == FirefoxViewHandler.tab) { } else if (previousTab == FirefoxViewHandler.tab) {
elementIndex = 0; elementIndex = 0;
} }
@@ -3932,14 +4035,14 @@ @@ -3933,14 +4036,14 @@
} }
// Ensure index is within bounds. // Ensure index is within bounds.
if (tab.pinned) { if (tab.pinned) {
@ -414,7 +414,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
// Prevent a flash of unstyled content by setting up the tab content // Prevent a flash of unstyled content by setting up the tab content
// and inherited attributes before appending it (see Bug 1592054): // and inherited attributes before appending it (see Bug 1592054):
@@ -3947,7 +4050,7 @@ @@ -3948,7 +4051,7 @@
this.tabContainer._invalidateCachedTabs(); this.tabContainer._invalidateCachedTabs();
@ -423,7 +423,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
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);
@@ -3980,6 +4083,7 @@ @@ -3981,6 +4084,7 @@
if (pinned) { if (pinned) {
this._updateTabBarForPinnedTabs(); this._updateTabBarForPinnedTabs();
} }
@ -431,17 +431,17 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
TabBarVisibility.update(); TabBarVisibility.update();
} }
@@ -4268,6 +4372,9 @@ @@ -4270,6 +4374,9 @@
return; return;
} }
+ for (let tab of selectedTabs) { + for (let tab of selectedTabs) {
+ gZenPinnedTabManager._removePinnedAttributes(tab, true); + gZenPinnedTabManager._removePinnedAttributes(tab, true);
+ } + }
this.removeTabs(selectedTabs, { telemetrySource }); this.removeTabs(selectedTabs, { isUserTriggered, telemetrySource });
} }
@@ -4520,6 +4627,7 @@ @@ -4526,6 +4633,7 @@
telemetrySource, telemetrySource,
} = {} } = {}
) { ) {
@ -449,7 +449,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
// 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 (
@@ -4604,6 +4712,7 @@ @@ -4615,6 +4723,7 @@
if (lastToClose) { if (lastToClose) {
this.removeTab(lastToClose, aParams); this.removeTab(lastToClose, aParams);
} }
@ -457,7 +457,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} catch (e) { } catch (e) {
console.error(e); console.error(e);
} }
@@ -4641,6 +4750,12 @@ @@ -4653,6 +4762,12 @@
aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start(); aTab._closeTimeNoAnimTimerId = Glean.browserTabclose.timeNoAnim.start();
} }
@ -470,7 +470,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
// 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) {
@@ -4655,7 +4770,9 @@ @@ -4667,7 +4782,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;
@ -481,7 +481,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
if ( if (
!this._beginRemoveTab(aTab, { !this._beginRemoveTab(aTab, {
closeWindowFastpath: true, closeWindowFastpath: true,
@@ -4821,7 +4938,7 @@ @@ -4835,7 +4952,7 @@
closeWindowWithLastTab != null closeWindowWithLastTab != null
? closeWindowWithLastTab ? closeWindowWithLastTab
: !window.toolbar.visible || : !window.toolbar.visible ||
@ -490,7 +490,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
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,
@@ -4845,6 +4962,7 @@ @@ -4859,6 +4976,7 @@
newTab = true; newTab = true;
} }
@ -498,7 +498,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
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.
@@ -4885,9 +5003,7 @@ @@ -4899,9 +5017,7 @@
aTab._mouseleave(); aTab._mouseleave();
if (newTab) { if (newTab) {
@ -509,7 +509,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} else { } else {
TabBarVisibility.update(); TabBarVisibility.update();
} }
@@ -5016,6 +5132,7 @@ @@ -5035,6 +5151,7 @@
this.tabs[i]._tPos = i; this.tabs[i]._tPos = i;
} }
@ -517,7 +517,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
if (!this._windowIsClosing) { if (!this._windowIsClosing) {
if (wasPinned) { if (wasPinned) {
this.tabContainer._positionPinnedTabs(); this.tabContainer._positionPinnedTabs();
@@ -5230,6 +5347,7 @@ @@ -5249,6 +5366,7 @@
} }
let excludeTabs = new Set(aExcludeTabs); let excludeTabs = new Set(aExcludeTabs);
@ -525,7 +525,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
// If this tab has a successor, it should be selectable, since // If this tab has a successor, it should be selectable, since
// hiding or closing a tab removes that tab as a successor. // hiding or closing a tab removes that tab as a successor.
@@ -5242,13 +5360,13 @@ @@ -5261,13 +5379,13 @@
!excludeTabs.has(aTab.owner) && !excludeTabs.has(aTab.owner) &&
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose") Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
) { ) {
@ -541,7 +541,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
); );
let tab = this.tabContainer.findNextTab(aTab, { let tab = this.tabContainer.findNextTab(aTab, {
@@ -5264,7 +5382,7 @@ @@ -5283,7 +5401,7 @@
} }
if (tab) { if (tab) {
@ -550,7 +550,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} }
// 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
@@ -5285,7 +5403,7 @@ @@ -5304,7 +5422,7 @@
}); });
} }
@ -559,7 +559,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} }
_blurTab(aTab) { _blurTab(aTab) {
@@ -5686,10 +5804,10 @@ @@ -5701,10 +5819,10 @@
SessionStore.deleteCustomTabValue(aTab, "hiddenBy"); SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
} }
@ -572,7 +572,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
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.
@@ -5909,7 +6027,7 @@ @@ -5924,7 +6042,7 @@
* `true` if element is a `<tab-group>` * `true` if element is a `<tab-group>`
*/ */
isTabGroup(element) { isTabGroup(element) {
@ -581,7 +581,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} }
/** /**
@@ -5986,7 +6104,7 @@ @@ -6001,7 +6119,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) {
@ -590,7 +590,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
} else { } else {
tabIndex = Math.max(tabIndex, this.pinnedTabCount); tabIndex = Math.max(tabIndex, this.pinnedTabCount);
} }
@@ -6012,10 +6130,16 @@ @@ -6027,10 +6145,16 @@
this.#handleTabMove( this.#handleTabMove(
element, element,
() => { () => {
@ -609,7 +609,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
if (neighbor && this.isTab(element) && tabIndex > element._tPos) { if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
neighbor.after(element); neighbor.after(element);
} else { } else {
@@ -6084,17 +6208,29 @@ @@ -6099,17 +6223,29 @@
targetElement = targetElement.group; targetElement = targetElement.group;
} }
} }
@ -643,7 +643,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
if (element.pinned && this.tabContainer.verticalMode) { if (element.pinned && this.tabContainer.verticalMode) {
return this.tabContainer.verticalPinnedTabsContainer; return this.tabContainer.verticalPinnedTabsContainer;
} }
@@ -6154,7 +6290,7 @@ @@ -6169,7 +6305,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");
} }
@ -652,7 +652,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
return; return;
} }
if (aTab.group && aTab.group.id === aGroup.id) { if (aTab.group && aTab.group.id === aGroup.id) {
@@ -6248,6 +6384,10 @@ @@ -6263,6 +6399,10 @@
moveActionCallback(); moveActionCallback();
@ -663,7 +663,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
// 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();
@@ -7145,7 +7285,7 @@ @@ -7160,7 +7300,7 @@
// preventDefault(). It will still raise the window if appropriate. // preventDefault(). It will still raise the window if appropriate.
break; break;
} }
@ -672,7 +672,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
window.focus(); window.focus();
aEvent.preventDefault(); aEvent.preventDefault();
break; break;
@@ -8044,6 +8184,7 @@ @@ -8059,6 +8199,7 @@
aWebProgress.isTopLevel aWebProgress.isTopLevel
) { ) {
this.mTab.setAttribute("busy", "true"); this.mTab.setAttribute("busy", "true");
@ -680,7 +680,7 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
gBrowser._tabAttrModified(this.mTab, ["busy"]); gBrowser._tabAttrModified(this.mTab, ["busy"]);
this.mTab._notselectedsinceload = !this.mTab.selected; this.mTab._notselectedsinceload = !this.mTab.selected;
} }
@@ -9009,7 +9150,7 @@ var TabContextMenu = { @@ -9022,7 +9163,7 @@ var TabContextMenu = {
); );
contextUnpinSelectedTabs.hidden = contextUnpinSelectedTabs.hidden =
!this.contextTab.pinned || !this.multiselected; !this.contextTab.pinned || !this.multiselected;
@ -689,11 +689,11 @@ index d5aa64842a35c6697263c63fd3a0571b64b01344..e8f37acf7761adb7bd97cb06dc1df386
// Move Tab items // Move Tab items
let contextMoveTabOptions = document.getElementById( let contextMoveTabOptions = document.getElementById(
"context_moveTabOptions" "context_moveTabOptions"
@@ -9278,6 +9419,7 @@ var TabContextMenu = { @@ -9298,6 +9439,7 @@ var TabContextMenu = {
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP, )
}); );
} else { } else {
+ gZenPinnedTabManager._removePinnedAttributes(this.contextTab, true); + gZenPinnedTabManager._removePinnedAttributes(this.contextTab, true);
gBrowser.removeTab(this.contextTab, { gBrowser.removeTab(this.contextTab, {
animate: true, animate: true,
telemetrySource: gBrowser.TabMetrics.METRIC_SOURCE.TAB_STRIP, ...gBrowser.TabMetrics.userTriggeredContext(

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783eae31cc79a 100644 index 67bba60cfc21b940f263e1eb26b8b5429355660f..0d493a544d20e75e6e847d93fad1e113c072241f 100644
--- a/browser/components/tabbrowser/content/tabs.js --- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js +++ b/browser/components/tabbrowser/content/tabs.js
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
@ -46,7 +46,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
expandGroupOnDrop = true; expandGroupOnDrop = true;
} }
} }
@@ -868,7 +869,7 @@ @@ -871,7 +872,7 @@
? event.screenY - window.screenY - tabOffset ? event.screenY - window.screenY - tabOffset
: event.screenY - window.screenY, : event.screenY - window.screenY,
scrollPos: scrollPos:
@ -55,7 +55,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
? this.verticalPinnedTabsContainer.scrollPosition ? this.verticalPinnedTabsContainer.scrollPosition
: this.arrowScrollbox.scrollPosition, : this.arrowScrollbox.scrollPosition,
screenX: event.screenX, screenX: event.screenX,
@@ -921,6 +922,10 @@ @@ -925,6 +926,10 @@
} }
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0); let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
@ -66,7 +66,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
if ( if (
(effects == "move" || effects == "copy") && (effects == "move" || effects == "copy") &&
document == draggedTab.ownerDocument && document == draggedTab.ownerDocument &&
@@ -1077,6 +1082,18 @@ @@ -1081,6 +1086,18 @@
this._tabDropIndicator.hidden = true; this._tabDropIndicator.hidden = true;
event.stopPropagation(); event.stopPropagation();
@ -85,7 +85,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
if (draggedTab && dropEffect == "copy") { if (draggedTab && dropEffect == "copy") {
let duplicatedDraggedTab; let duplicatedDraggedTab;
let duplicatedTabs = []; let duplicatedTabs = [];
@@ -1116,10 +1133,11 @@ @@ -1120,10 +1137,11 @@
} }
} else { } else {
let isPinned = draggedTab.pinned; let isPinned = draggedTab.pinned;
@ -100,7 +100,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
); );
let size = this.verticalMode ? "height" : "width"; let size = this.verticalMode ? "height" : "width";
let screenAxis = this.verticalMode ? "screenY" : "screenX"; let screenAxis = this.verticalMode ? "screenY" : "screenX";
@@ -1168,7 +1186,7 @@ @@ -1172,7 +1190,7 @@
(oldTranslateX && oldTranslateX != newTranslateX) || (oldTranslateX && oldTranslateX != newTranslateX) ||
(oldTranslateY && oldTranslateY != newTranslateY); (oldTranslateY && oldTranslateY != newTranslateY);
} else if (this.verticalMode) { } else if (this.verticalMode) {
@ -109,7 +109,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
} else { } else {
shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX; shouldTranslate &&= oldTranslateX && oldTranslateX != newTranslateX;
} }
@@ -1337,6 +1355,7 @@ @@ -1341,6 +1359,7 @@
let nextItem = this.ariaFocusableItems[newIndex]; let nextItem = this.ariaFocusableItems[newIndex];
let tabGroup = isTab(nextItem) && nextItem.group; let tabGroup = isTab(nextItem) && nextItem.group;
@ -117,7 +117,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
gBrowser.loadTabs(urls, { gBrowser.loadTabs(urls, {
inBackground, inBackground,
replace, replace,
@@ -1369,6 +1388,17 @@ @@ -1373,6 +1392,17 @@
this.finishMoveTogetherSelectedTabs(draggedTab); this.finishMoveTogetherSelectedTabs(draggedTab);
this.finishAnimateTabMove(); this.finishAnimateTabMove();
@ -135,7 +135,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
this.#expandGroupOnDrop(draggedTab); this.#expandGroupOnDrop(draggedTab);
if ( if (
@@ -1597,7 +1627,7 @@ @@ -1601,7 +1631,7 @@
} }
get newTabButton() { get newTabButton() {
@ -144,7 +144,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
} }
get verticalMode() { get verticalMode() {
@@ -1621,29 +1651,54 @@ @@ -1625,29 +1655,54 @@
if (this.#allTabs) { if (this.#allTabs) {
return this.#allTabs; return this.#allTabs;
} }
@ -207,7 +207,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
} }
/** /**
@@ -1698,23 +1753,18 @@ @@ -1702,23 +1757,18 @@
} }
let elementIndex = 0; let elementIndex = 0;
@ -235,7 +235,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
let visibleTabsInGroup = child.tabs.filter(tab => tab.visible); let visibleTabsInGroup = child.tabs.filter(tab => tab.visible);
visibleTabsInGroup.forEach(tab => { visibleTabsInGroup.forEach(tab => {
tab.elementIndex = elementIndex++; tab.elementIndex = elementIndex++;
@@ -1724,10 +1774,7 @@ @@ -1728,10 +1778,7 @@
} }
} }
@ -247,7 +247,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
return this.#focusableItems; return this.#focusableItems;
} }
@@ -1735,6 +1782,7 @@ @@ -1739,6 +1786,7 @@
_invalidateCachedTabs() { _invalidateCachedTabs() {
this.#allTabs = null; this.#allTabs = null;
this._invalidateCachedVisibleTabs(); this._invalidateCachedVisibleTabs();
@ -255,7 +255,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
} }
_invalidateCachedVisibleTabs() { _invalidateCachedVisibleTabs() {
@@ -1749,8 +1797,8 @@ @@ -1753,8 +1801,8 @@
#isContainerVerticalPinnedGrid(tab) { #isContainerVerticalPinnedGrid(tab) {
return ( return (
this.verticalMode && this.verticalMode &&
@ -266,7 +266,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
!this.expandOnHover !this.expandOnHover
); );
} }
@@ -1766,7 +1814,7 @@ @@ -1770,7 +1818,7 @@
if (node == null) { if (node == null) {
// We have a container for non-tab elements at the end of the scrollbox. // We have a container for non-tab elements at the end of the scrollbox.
@ -275,7 +275,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
} }
node.before(tab); node.before(tab);
@@ -1861,7 +1909,7 @@ @@ -1865,7 +1913,7 @@
// There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and // There are separate "new tab" buttons for horizontal tabs toolbar, vertical tabs and
// for when the tab strip is overflowed (which is shared by vertical and horizontal tabs); // for when the tab strip is overflowed (which is shared by vertical and horizontal tabs);
// Attach the long click popup to all of them. // Attach the long click popup to all of them.
@ -284,7 +284,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
const newTab2 = this.newTabButton; const newTab2 = this.newTabButton;
const newTabVertical = document.getElementById( const newTabVertical = document.getElementById(
"vertical-tabs-newtab-button" "vertical-tabs-newtab-button"
@@ -1956,10 +2004,12 @@ @@ -1960,10 +2008,12 @@
_handleTabSelect(aInstant) { _handleTabSelect(aInstant) {
let selectedTab = this.selectedItem; let selectedTab = this.selectedItem;
@ -297,7 +297,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
selectedTab._notselectedsinceload = false; selectedTab._notselectedsinceload = false;
} }
@@ -2132,6 +2182,7 @@ @@ -2136,6 +2186,7 @@
} }
_positionPinnedTabs() { _positionPinnedTabs() {
@ -305,7 +305,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
let tabs = this.visibleTabs; let tabs = this.visibleTabs;
let numPinned = gBrowser.pinnedTabCount; let numPinned = gBrowser.pinnedTabCount;
let absPositionHorizontalTabs = let absPositionHorizontalTabs =
@@ -2206,7 +2257,7 @@ @@ -2210,7 +2261,7 @@
return; return;
} }
@ -314,7 +314,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
let directionX = screenX > dragData.animLastScreenX; let directionX = screenX > dragData.animLastScreenX;
let directionY = screenY > dragData.animLastScreenY; let directionY = screenY > dragData.animLastScreenY;
@@ -2215,6 +2266,8 @@ @@ -2219,6 +2270,8 @@
let { width: tabWidth, height: tabHeight } = let { width: tabWidth, height: tabHeight } =
draggedTab.getBoundingClientRect(); draggedTab.getBoundingClientRect();
@ -323,7 +323,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
let shiftSizeX = tabWidth * movingTabs.length; let shiftSizeX = tabWidth * movingTabs.length;
let shiftSizeY = tabHeight; let shiftSizeY = tabHeight;
dragData.tabWidth = tabWidth; dragData.tabWidth = tabWidth;
@@ -2244,7 +2297,7 @@ @@ -2248,7 +2301,7 @@
let translateX = screenX - dragData.screenX; let translateX = screenX - dragData.screenX;
let translateY = screenY - dragData.screenY; let translateY = screenY - dragData.screenY;
translateY += translateY +=
@ -332,7 +332,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
let firstBoundX = firstTabInRow.screenX - firstMovingTabScreenX; let firstBoundX = firstTabInRow.screenX - firstMovingTabScreenX;
let firstBoundY = firstTabInRow.screenY - firstMovingTabScreenY; let firstBoundY = firstTabInRow.screenY - firstMovingTabScreenY;
let lastBoundX = let lastBoundX =
@@ -2389,12 +2442,16 @@ @@ -2394,12 +2447,16 @@
this.#clearDragOverCreateGroupTimer(); this.#clearDragOverCreateGroupTimer();
@ -353,7 +353,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
if (this.#rtlMode) { if (this.#rtlMode) {
tabs.reverse(); tabs.reverse();
@@ -2408,7 +2465,7 @@ @@ -2413,7 +2470,7 @@
let size = this.verticalMode ? "height" : "width"; let size = this.verticalMode ? "height" : "width";
let translateAxis = this.verticalMode ? "translateY" : "translateX"; let translateAxis = this.verticalMode ? "translateY" : "translateX";
let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft"; let scrollDirection = this.verticalMode ? "scrollTop" : "scrollLeft";
@ -362,7 +362,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
let translateX = event.screenX - dragData.screenX; let translateX = event.screenX - dragData.screenX;
let translateY = event.screenY - dragData.screenY; let translateY = event.screenY - dragData.screenY;
@@ -2422,12 +2479,21 @@ @@ -2427,12 +2484,21 @@
let lastTab = tabs.at(-1); let lastTab = tabs.at(-1);
let lastMovingTab = movingTabs.at(-1); let lastMovingTab = movingTabs.at(-1);
let firstMovingTab = movingTabs[0]; let firstMovingTab = movingTabs[0];
@ -385,7 +385,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
translate += translate +=
this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos; this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos;
} else if (isPinned && this.verticalMode) { } else if (isPinned && this.verticalMode) {
@@ -2446,6 +2512,9 @@ @@ -2451,6 +2517,9 @@
// Shift the `.tab-group-label-container` to shift the label element. // Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement; item = item.parentElement;
} }
@ -395,7 +395,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
item.style.transform = `${translateAxis}(${translate}px)`; item.style.transform = `${translateAxis}(${translate}px)`;
} }
@@ -2583,6 +2652,9 @@ @@ -2588,6 +2657,9 @@
break; break;
} }
let element = tabs[mid]; let element = tabs[mid];
@ -405,18 +405,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
let elementForSize = isTabGroupLabel(element) let elementForSize = isTabGroupLabel(element)
? element.parentElement ? element.parentElement
: element; : element;
@@ -2605,6 +2677,10 @@ @@ -2664,7 +2736,7 @@
if (!dropElement) {
dropElement = this.ariaFocusableItems[oldDropElementIndex];
}
+ if (dropElement?.group?.hasAttribute("split-view-group")) {
+ // We focus the group label element, not the group itself.
+ dropElement = dropElement.group.labelElement;
+ }
let newDropElementIndex = dropElement
? dropElement.elementIndex
: oldDropElementIndex;
@@ -2613,7 +2689,7 @@
let shouldCreateGroupOnDrop; let shouldCreateGroupOnDrop;
let dropBefore; let dropBefore;
if (dropElement) { if (dropElement) {
@ -425,7 +414,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
? dropElement.parentElement ? dropElement.parentElement
: dropElement; : dropElement;
@@ -2675,12 +2751,12 @@ @@ -2726,12 +2798,12 @@
} }
} }
@ -437,10 +426,10 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
// that dropping the tab(s) will create a new tab group. // that dropping the tab(s) will create a new tab group.
- shouldCreateGroupOnDrop = - shouldCreateGroupOnDrop =
+ shouldCreateGroupOnDrop = false && + shouldCreateGroupOnDrop = false &&
dropElement != draggedTab &&
isTab(dropElement) && isTab(dropElement) &&
!dropElement?.group && !dropElement?.group &&
@@ -2720,7 +2796,7 @@ overlapPercent > dragOverGroupingThreshold;
@@ -2773,7 +2845,7 @@
// Dropping right before the tab group. // Dropping right before the tab group.
dropElement = dropElementGroup; dropElement = dropElementGroup;
colorCode = undefined; colorCode = undefined;
@ -449,7 +438,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
// Dropping right after the collapsed tab group. // Dropping right after the collapsed tab group.
dropElement = dropElementGroup; dropElement = dropElementGroup;
colorCode = undefined; colorCode = undefined;
@@ -2750,7 +2826,7 @@ @@ -2803,7 +2875,7 @@
// Shift background tabs to leave a gap where the dragged tab // Shift background tabs to leave a gap where the dragged tab
// would currently be dropped. // would currently be dropped.
for (let item of tabs) { for (let item of tabs) {
@ -458,7 +447,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
continue; continue;
} }
@@ -2759,6 +2835,9 @@ @@ -2812,6 +2884,9 @@
if (isTabGroupLabel(item)) { if (isTabGroupLabel(item)) {
// Shift the `.tab-group-label-container` to shift the label element. // Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement; item = item.parentElement;
@ -468,7 +457,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
} }
item.style.transform = transform; item.style.transform = transform;
} }
@@ -2811,8 +2890,9 @@ @@ -2864,8 +2939,9 @@
); );
} }
@ -480,7 +469,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
return; return;
} }
@@ -2824,6 +2904,12 @@ @@ -2877,6 +2953,12 @@
item = item.parentElement; item = item.parentElement;
} }
item.style.transform = ""; item.style.transform = "";
@ -493,7 +482,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
item.removeAttribute("dragover-createGroup"); item.removeAttribute("dragover-createGroup");
} }
this.removeAttribute("movingtab-createGroup"); this.removeAttribute("movingtab-createGroup");
@@ -2870,7 +2956,7 @@ @@ -2923,7 +3005,7 @@
let postTransitionCleanup = () => { let postTransitionCleanup = () => {
movingTab._moveTogetherSelectedTabsData.animate = false; movingTab._moveTogetherSelectedTabsData.animate = false;
}; };
@ -502,7 +491,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
postTransitionCleanup(); postTransitionCleanup();
} else { } else {
let onTransitionEnd = transitionendEvent => { let onTransitionEnd = transitionendEvent => {
@@ -3043,7 +3129,7 @@ @@ -3096,7 +3178,7 @@
} }
_notifyBackgroundTab(aTab) { _notifyBackgroundTab(aTab) {
@ -511,7 +500,7 @@ index 84d633471c89230b981d8a07babef4e0c76c0338..37ebb0a715629d372fb8054bcd8783ea
return; return;
} }
@@ -3169,6 +3255,9 @@ @@ -3222,6 +3304,9 @@
return null; return null;
} }
} }

View file

@ -1,13 +0,0 @@
diff --git a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
index a325becabddda511204fc5bd2022edc332cdde7c..6bb29b21f1e6c1d6ea3d38d50f01148e0a51f0d7 100644
--- a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
+++ b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs
@@ -52,7 +52,7 @@ const PREFS_BEFORE_SECTIONS = () => [
titleString: "home-prefs-shortcuts-header",
descString: "home-prefs-shortcuts-description",
get nestedPrefs() {
- return Services.prefs.getBoolPref("browser.topsites.useRemoteSetting")
+ return Services.prefs.getBoolPref("browser.topsites.useRemoteSetting") && false
? [
{
name: "showSponsoredTopSites",

View file

@ -1,32 +0,0 @@
# HG changeset patch
# User Julian Descottes <jdescottes@mozilla.com>
# Date 1744201993 0
# Node ID 2e2d932d75c44447af89224be5e4324dc080c447
# Parent 9f134a1b1a884a857c59517ba0e8f3603e4009dd
Bug 1959377 - Include vector in mac/Sandbox.h to fix build on macos 15.4 r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D244870
diff --git a/security/sandbox/mac/Sandbox.h b/security/sandbox/mac/Sandbox.h
--- a/security/sandbox/mac/Sandbox.h
+++ b/security/sandbox/mac/Sandbox.h
@@ -2,16 +2,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_Sandbox_h
#define mozilla_Sandbox_h
#include <string>
+#include <vector>
#include "mozilla/ipc/UtilityProcessSandboxing.h"
enum MacSandboxType {
MacSandboxType_Default = 0,
MacSandboxType_Content,
MacSandboxType_GMP,
MacSandboxType_RDD,
MacSandboxType_Socket,

View file

@ -0,0 +1,73 @@
diff --git a/gfx/wr/swgl/build.rs b/gfx/wr/swgl/build.rs
--- a/gfx/wr/swgl/build.rs
+++ b/gfx/wr/swgl/build.rs
@@ -147,10 +147,11 @@
let shader_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap() + "/../webrender/res";
let shader_flags = ShaderFeatureFlags::GL
| ShaderFeatureFlags::DUAL_SOURCE_BLENDING
| ShaderFeatureFlags::ADVANCED_BLEND_EQUATION
+ | ShaderFeatureFlags::DITHERING
| ShaderFeatureFlags::DEBUG;
let mut shaders: Vec<String> = Vec::new();
for (name, features) in get_shader_features(shader_flags) {
shaders.extend(features.iter().map(|f| {
if f.is_empty() {
diff --git a/gfx/wr/webrender/res/brush_linear_gradient.glsl b/gfx/wr/webrender/res/brush_linear_gradient.glsl
--- a/gfx/wr/webrender/res/brush_linear_gradient.glsl
+++ b/gfx/wr/webrender/res/brush_linear_gradient.glsl
@@ -79,17 +79,23 @@
return Fragment(color);
}
#ifdef SWGL_DRAW_SPAN
+#ifdef WR_FEATURE_DITHERING
+void swgl_drawSpanRGBA8() {
+ return;
+}
+#else
void swgl_drawSpanRGBA8() {
int address = swgl_validateGradient(sGpuBufferF, get_gpu_buffer_uv(v_gradient_address.x), int(GRADIENT_ENTRIES + 2.0));
if (address < 0) {
return;
}
swgl_commitLinearGradientRGBA8(sGpuBufferF, address, GRADIENT_ENTRIES, true, v_gradient_repeat.x != 0.0,
v_pos, v_scale_dir, v_start_offset.x);
}
#endif
+#endif
#endif
diff --git a/gfx/wr/webrender/src/renderer/init.rs b/gfx/wr/webrender/src/renderer/init.rs
--- a/gfx/wr/webrender/src/renderer/init.rs
+++ b/gfx/wr/webrender/src/renderer/init.rs
@@ -222,11 +222,11 @@
fn default() -> Self {
WebRenderOptions {
resource_override_path: None,
use_optimized_shaders: false,
enable_aa: true,
- enable_dithering: false,
+ enable_dithering: true,
debug_flags: DebugFlags::empty(),
max_recorded_profiles: 0,
precache_flags: ShaderPrecacheFlags::empty(),
enable_subpixel_aa: false,
clear_color: ColorF::new(1.0, 1.0, 1.0, 1.0),
--- a/gfx/wr/webrender/build.rs
+++ b/gfx/wr/webrender/build.rs
@@ -150,11 +150,10 @@
) {
flags.remove(ShaderFeatureFlags::TEXTURE_EXTERNAL_ESSL1);
}
// The optimizer cannot handle the required EXT_YUV_target extension
flags.remove(ShaderFeatureFlags::TEXTURE_EXTERNAL_BT709);
- flags.remove(ShaderFeatureFlags::DITHERING);
for (shader_name, configs) in get_shader_features(flags) {
for config in configs {
shaders.push(ShaderOptimizationInput {
shader_name,

View file

@ -1,7 +1,7 @@
diff --git a/security/mac/hardenedruntime/v2/production/firefox.browser.xml b/security/mac/hardenedruntime/v2/production/firefox.browser.xml diff --git a/security/mac/hardenedruntime/production/firefox.browser.xml b/security/mac/hardenedruntime/production/firefox.browser.xml
index abbf33e9d2b3c9d1e0a34bd46e7cd289c435533b..d580b156fed13f4de8eb73e5c29c646a7a22a1d2 100644 index abbf33e9d2b3c9d1e0a34bd46e7cd289c435533b..d580b156fed13f4de8eb73e5c29c646a7a22a1d2 100644
--- a/security/mac/hardenedruntime/v2/production/firefox.browser.xml --- a/security/mac/hardenedruntime/production/firefox.browser.xml
+++ b/security/mac/hardenedruntime/v2/production/firefox.browser.xml +++ b/security/mac/hardenedruntime/production/firefox.browser.xml
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
<!-- Required for com.apple.developer.web-browser.public-key-credential --> <!-- Required for com.apple.developer.web-browser.public-key-credential -->

View file

@ -1,5 +1,5 @@
diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs diff --git a/servo/components/style/gecko/media_features.rs b/servo/components/style/gecko/media_features.rs
index cc24406e22f536733b07a9398580a8719b61e134..214f238b38377a8480711ea2d0ec30e99800bb5c 100644 index c66f1e26b22a6eeb2192d531e365ba34a61e220d..097ffce888ee0e180cc06448ea34860e6a467a2a 100644
--- a/servo/components/style/gecko/media_features.rs --- a/servo/components/style/gecko/media_features.rs
+++ b/servo/components/style/gecko/media_features.rs +++ b/servo/components/style/gecko/media_features.rs
@@ -13,6 +13,9 @@ use crate::values::computed::{CSSPixelLength, Context, Ratio, Resolution}; @@ -13,6 +13,9 @@ use crate::values::computed::{CSSPixelLength, Context, Ratio, Resolution};
@ -12,7 +12,7 @@ index cc24406e22f536733b07a9398580a8719b61e134..214f238b38377a8480711ea2d0ec30e9
fn device_size(device: &Device) -> Size2D<Au> { fn device_size(device: &Device) -> Size2D<Au> {
let mut width = 0; let mut width = 0;
@@ -606,6 +609,13 @@ fn eval_moz_overlay_scrollbars(context: &Context) -> bool { @@ -610,6 +613,13 @@ fn eval_moz_overlay_scrollbars(context: &Context) -> bool {
unsafe { bindings::Gecko_MediaFeatures_UseOverlayScrollbars(context.device().document()) } unsafe { bindings::Gecko_MediaFeatures_UseOverlayScrollbars(context.device().document()) }
} }
@ -26,16 +26,16 @@ index cc24406e22f536733b07a9398580a8719b61e134..214f238b38377a8480711ea2d0ec30e9
fn get_lnf_int(int_id: i32) -> i32 { fn get_lnf_int(int_id: i32) -> i32 {
unsafe { bindings::Gecko_GetLookAndFeelInt(int_id) } unsafe { bindings::Gecko_GetLookAndFeelInt(int_id) }
} }
@@ -653,7 +663,7 @@ macro_rules! lnf_int_feature { @@ -657,7 +667,7 @@ macro_rules! lnf_int_feature {
/// to support new types in these entries and (2) ensuring that either /// to support new types in these entries and (2) ensuring that either
/// nsPresContext::MediaFeatureValuesChanged is called when the value that /// nsPresContext::MediaFeatureValuesChanged is called when the value that
/// would be returned by the evaluator function could change. /// would be returned by the evaluator function could change.
-pub static MEDIA_FEATURES: [QueryFeatureDescription; 61] = [ -pub static MEDIA_FEATURES: [QueryFeatureDescription; 62] = [
+pub static MEDIA_FEATURES: [QueryFeatureDescription; 62] = [ +pub static MEDIA_FEATURES: [QueryFeatureDescription; 63] = [
feature!( feature!(
atom!("width"), atom!("width"),
AllowsRanges::Yes, AllowsRanges::Yes,
@@ -918,6 +928,12 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 61] = [ @@ -928,6 +938,12 @@ pub static MEDIA_FEATURES: [QueryFeatureDescription; 62] = [
Evaluator::BoolInteger(eval_moz_overlay_scrollbars), Evaluator::BoolInteger(eval_moz_overlay_scrollbars),
FeatureFlags::CHROME_AND_UA_ONLY, FeatureFlags::CHROME_AND_UA_ONLY,
), ),

View file

@ -1,18 +0,0 @@
diff --git a/toolkit/content/widgets/browser-custom-element.js b/toolkit/content/widgets/browser-custom-element.js
index a531577a29212cdb9e745b88e17fe4177be76635..ae976ecef71d0d659fa6a1d6fea60f5270073544 100644
--- a/toolkit/content/widgets/browser-custom-element.js
+++ b/toolkit/content/widgets/browser-custom-element.js
@@ -556,11 +556,11 @@
if (!this.browsingContext) {
return;
}
- this.browsingContext.isActive = val;
+ this.browsingContext.isActive = val || this.zenModeActive;
if (this.isRemoteBrowser) {
let remoteTab = this.frameLoader?.remoteTab;
if (remoteTab) {
- remoteTab.renderLayers = val;
+ remoteTab.renderLayers = val || this.zenModeActive;
}
}
}

View file

@ -0,0 +1,18 @@
diff --git a/toolkit/content/widgets/browser-custom-element.mjs b/toolkit/content/widgets/browser-custom-element.mjs
index 8eeea2a403ba2007a1a1e6074bb982b24f40fef5..29bae869dfd8c9df6039b3c9b8b1603092e517ea 100644
--- a/toolkit/content/widgets/browser-custom-element.mjs
+++ b/toolkit/content/widgets/browser-custom-element.mjs
@@ -482,11 +482,11 @@ class MozBrowser extends MozElements.MozElementMixin(XULFrameElement) {
if (!this.browsingContext) {
return;
}
- this.browsingContext.isActive = val;
+ this.browsingContext.isActive = val || this.zenModeActive;
if (this.isRemoteBrowser) {
let remoteTab = this.frameLoader?.remoteTab;
if (remoteTab) {
- remoteTab.renderLayers = val;
+ remoteTab.renderLayers = val || this.zenModeActive;
}
}
}

View file

@ -1,5 +1,5 @@
diff --git a/toolkit/modules/ShortcutUtils.sys.mjs b/toolkit/modules/ShortcutUtils.sys.mjs diff --git a/toolkit/modules/ShortcutUtils.sys.mjs b/toolkit/modules/ShortcutUtils.sys.mjs
index 360a7dbeeae3899af01945e35d5fe3aa0cb3c562..354c0c9e65e443682a2b12113bc618af9e07910f 100644 index 3e796cb6586ad39257a29c2a6da1d0415f4c2676..dd883f81612d9dc892e720b63e2793e43b9686b3 100644
--- a/toolkit/modules/ShortcutUtils.sys.mjs --- a/toolkit/modules/ShortcutUtils.sys.mjs
+++ b/toolkit/modules/ShortcutUtils.sys.mjs +++ b/toolkit/modules/ShortcutUtils.sys.mjs
@@ -140,6 +140,7 @@ export var ShortcutUtils = { @@ -140,6 +140,7 @@ export var ShortcutUtils = {
@ -10,18 +10,3 @@ index 360a7dbeeae3899af01945e35d5fe3aa0cb3c562..354c0c9e65e443682a2b12113bc618af
key = keyAttribute.toUpperCase(); key = keyAttribute.toUpperCase();
} }
@@ -382,12 +383,12 @@ export var ShortcutUtils = {
return ShortcutUtils.MOVE_TAB_FORWARD;
}
break;
- case event.DOM_VK_LEFT:
+ case event.DOM_VK_UP: // For macOS, make sure if this patch needs to be updated
if (accelMetaKey && event.altKey && !event.shiftKey && !event.ctrlKey) {
return ShortcutUtils.PREVIOUS_TAB;
}
break;
- case event.DOM_VK_RIGHT:
+ case event.DOM_VK_DOWN: // For macOS, make sure if this patch needs to be updated
if (accelMetaKey && event.altKey && !event.shiftKey && !event.ctrlKey) {
return ShortcutUtils.NEXT_TAB;
}

View file

@ -0,0 +1,13 @@
diff --git a/toolkit/themes/shared/menulist.css b/toolkit/themes/shared/menulist.css
index e5ac973b1ee2595e8547680465e25d537685a9e7..20f85152d783c81be5e29846353daca9ccd0c67d 100644
--- a/toolkit/themes/shared/menulist.css
+++ b/toolkit/themes/shared/menulist.css
@@ -53,7 +53,7 @@
:host(:not([native])) {
appearance: none;
- background-color: var(--button-background-color);
+ background-color: light-dark(rgba(0,0,0,.1), rgba(255,255,255,.1));
color: var(--button-text-color);
border-radius: 4px;
padding-block: 4px;

View file

@ -1,13 +0,0 @@
diff --git a/toolkit/themes/shared/menulist-shared.css b/toolkit/themes/shared/menulist-shared.css
index 5dd5549674570170a694afbd9ea4526e52e3192a..a24ded413065ce1493e8622c5777c5b5bdac128e 100644
--- a/toolkit/themes/shared/menulist-shared.css
+++ b/toolkit/themes/shared/menulist-shared.css
@@ -14,7 +14,7 @@
:host(:not([native])) {
appearance: none;
- background-color: var(--button-background-color);
+ background-color: light-dark(rgba(0,0,0,.1), rgba(255,255,255,.1));
color: var(--button-text-color);
border-radius: 4px;
padding-block: 4px;

View file

@ -1,20 +1,20 @@
diff --git a/widget/cocoa/VibrancyManager.mm b/widget/cocoa/VibrancyManager.mm diff --git a/widget/cocoa/VibrancyManager.mm b/widget/cocoa/VibrancyManager.mm
index 849b62c9976a7bc5fee35e074e54c8f556ed9c38..a9742c7ff30d417a18f41f9c120259192f33a0fd 100644 index b4c14233c64dd3515518d3167f8ee2877fe41a93..2b91fa3044794765b8e15c6b66b348de4111f29f 100644
--- a/widget/cocoa/VibrancyManager.mm --- a/widget/cocoa/VibrancyManager.mm
+++ b/widget/cocoa/VibrancyManager.mm +++ b/widget/cocoa/VibrancyManager.mm
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
#include "nsChildView.h" #include "nsCocoaWindow.h"
#include "mozilla/StaticPrefs_widget.h" #include "mozilla/StaticPrefs_widget.h"
+#include "mozilla/StaticPrefs_zen.h" +#include "mozilla/StaticPrefs_zen.h"
using namespace mozilla; using namespace mozilla;
@@ -40,7 +41,23 @@ static NSVisualEffectMaterial VisualEffectMaterialForVibrancyType( @@ -38,7 +39,23 @@ static NSVisualEffectMaterial VisualEffectMaterialForVibrancyType(
VibrancyType aType) {
switch (aType) {
case VibrancyType::Sidebar: case VibrancyType::Sidebar:
return NSVisualEffectMaterialSidebar; - return NSVisualEffectMaterialSidebar;
case VibrancyType::Titlebar:
- return NSVisualEffectMaterialTitlebar;
+ switch (StaticPrefs::zen_widget_macos_window_material()) { + switch (StaticPrefs::zen_widget_macos_window_material()) {
+ case 1: + case 1:
+ return NSVisualEffectMaterialHUDWindow; + return NSVisualEffectMaterialHUDWindow;
@ -32,10 +32,10 @@ index 849b62c9976a7bc5fee35e074e54c8f556ed9c38..a9742c7ff30d417a18f41f9c12025919
+ default: + default:
+ return NSVisualEffectMaterialUnderWindowBackground; + return NSVisualEffectMaterialUnderWindowBackground;
+ } + }
case VibrancyType::Titlebar:
return NSVisualEffectMaterialTitlebar;
} }
} @@ -78,6 +95,7 @@ - (NSView*)hitTest:(NSPoint)aPoint {
@@ -78,6 +95,7 @@ static NSVisualEffectBlendingMode VisualEffectBlendingModeForVibrancyType(
- (void)prefChanged { - (void)prefChanged {
self.blendingMode = VisualEffectBlendingModeForVibrancyType(mType); self.blendingMode = VisualEffectBlendingModeForVibrancyType(mType);
@ -50,4 +50,4 @@ index 849b62c9976a7bc5fee35e074e54c8f556ed9c38..a9742c7ff30d417a18f41f9c12025919
+ "zen.widget.macos.window-material"_ns, + "zen.widget.macos.window-material"_ns,
}; };
VibrancyManager::VibrancyManager(const nsChildView& aCoordinateConverter, VibrancyManager::VibrancyManager(const nsCocoaWindow& aCoordinateConverter,

View file

@ -13,7 +13,8 @@ class ZenUIMigration {
PREF_NAME = 'zen.migration.version'; PREF_NAME = 'zen.migration.version';
MIGRATION_VERSION = 5; MIGRATION_VERSION = 5;
init(isNewProfile, win) { init(isNewProfile) {
const win = lazy.BrowserWindowTracker.getTopWindow();
if (!isNewProfile) { if (!isNewProfile) {
try { try {
this._migrate(win); this._migrate(win);

View file

@ -104,7 +104,7 @@
#zen-main-app-wrapper, #zen-main-app-wrapper,
#zen-appcontent-wrapper, #zen-appcontent-wrapper,
#zen-sidebar-splitter { #zen-sidebar-splitter {
appearance: -moz-window-titlebar !important; appearance: -moz-window-sidebar !important;
} }
} }

View file

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
panel[type='arrow'][animate='open'] { panel[type='arrow'][animate='open'] {
@media (-moz-platform: macos) { @media (-moz-platform: macos) and (-moz-panel-animations) {
animation: zen-jello-animation-macos 0.4s ease-out; animation: zen-jello-animation-macos 0.4s ease-out;
&[side='bottom'] { &[side='bottom'] {
/* Animate from the bottom */ /* Animate from the bottom */
@ -20,7 +20,7 @@ panel[type='arrow'][animate='open'] {
} }
} }
} }
@media (-moz-platform: linux) or ((-moz-platform: windows) and (not (-moz-windows-mica-popups))) { @media (-moz-platform: linux) or ((-moz-platform: windows) and (not (-moz-windows-mica-popups))) and (-moz-panel-animations) {
/* Mica popups have a weird background while the animation is running */ /* Mica popups have a weird background while the animation is running */
&::part(content) { &::part(content) {
animation: zen-jello-animation 0.35s ease; animation: zen-jello-animation 0.35s ease;

View file

@ -6,7 +6,7 @@
"version": { "version": {
"product": "firefox", "product": "firefox",
"version": "139.0.4", "version": "139.0.4",
"candidate": "139.0.4" "candidate": "140.0"
}, },
"buildOptions": { "buildOptions": {
"generateBranding": true "generateBranding": true
@ -53,4 +53,4 @@
"licenseType": "MPL-2.0" "licenseType": "MPL-2.0"
}, },
"updateHostname": "updates.zen-browser.app" "updateHostname": "updates.zen-browser.app"
} }