chore: Sync upstream Firefox to version 147.0, p=#11822

* chore: Sync upstream to `Firefox 147.0`

* chore: Continued migration, b=no-bug, c=tests

* chore: Finish migration without testing, b=no-bug, c=scripts, tabs, media, common, split-view

* feat: Finish migration, b=no-bug, c=common, compact-mode, split-view, workspaces

* feat: Finish basic migration, b=no-bug, c=kbs, common, folders

* feat: Update surfer, b=no-bug, c=scripts
This commit is contained in:
mr. m
2026-01-08 18:06:05 +01:00
committed by GitHub
parent ae93efef57
commit 7e7d860c9e
113 changed files with 788 additions and 800 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionFile.sys.mjs b/browser/components/sessionstore/SessionFile.sys.mjs
index 31140cb8be3b529a0952ca8dc55165690b0e2120..605c9e0aa84da0a2d3171a0573e8cd95e27bd0c4 100644
index 5580838acd72bf0e1189d367984859529d89f5b4..e5fa6076a9cc6ada016ccc4e129cad455010a522 100644
--- a/browser/components/sessionstore/SessionFile.sys.mjs
+++ b/browser/components/sessionstore/SessionFile.sys.mjs
@@ -22,6 +22,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -10,7 +10,7 @@ index 31140cb8be3b529a0952ca8dc55165690b0e2120..605c9e0aa84da0a2d3171a0573e8cd95
});
const PREF_UPGRADE_BACKUP = "browser.sessionstore.upgradeBackup.latestBuildID";
@@ -380,7 +381,7 @@ var SessionFileInternal = {
@@ -381,7 +382,7 @@ var SessionFileInternal = {
this._readOrigin = result.origin;
result.noFilesFound = noFilesFound;

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStartup.sys.mjs b/browser/components/sessionstore/SessionStartup.sys.mjs
index be23213ae9ec7e59358a17276c6c3764d38d9996..229bb1346f9349892acb1e9e05109b28f5a5b45f 100644
index 86600ffb5178599ab23270a964064ca657a3283f..ffb22990e7d9e1b79f276fe5c1eb38f2b869a57b 100644
--- a/browser/components/sessionstore/SessionStartup.sys.mjs
+++ b/browser/components/sessionstore/SessionStartup.sys.mjs
@@ -40,6 +40,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -28,7 +28,7 @@ index be23213ae9ec7e59358a17276c6c3764d38d9996..229bb1346f9349892acb1e9e05109b28
if (this._initialState == null) {
// No valid session found.
this._sessionType = this.NO_SESSION;
@@ -335,12 +338,7 @@ export var SessionStartup = {
@@ -336,12 +339,7 @@ export var SessionStartup = {
isAutomaticRestoreEnabled() {
if (this._resumeSessionEnabled === null) {
this._resumeSessionEnabled =

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a6376050311377 100644
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..959e73ab86bdb78203e3aed0c939c1b9acbe4897 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -127,6 +127,9 @@ const TAB_EVENTS = [
@@ -20,7 +20,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
});
ChromeUtils.defineLazyGetter(lazy, "blankURI", () => {
@@ -1238,10 +1242,7 @@ var SessionStoreInternal = {
@@ -1261,10 +1265,7 @@ var SessionStoreInternal = {
*/
get willAutoRestore() {
return (
@@ -32,7 +32,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
);
},
@@ -1911,6 +1912,9 @@ var SessionStoreInternal = {
@@ -1934,6 +1935,9 @@ var SessionStoreInternal = {
case "TabPinned":
case "TabUnpinned":
case "SwapDocShells":
@@ -42,7 +42,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
this.saveStateDelayed(win);
break;
case "TabGroupCreate":
@@ -2020,6 +2024,10 @@ var SessionStoreInternal = {
@@ -2044,6 +2048,10 @@ var SessionStoreInternal = {
this._windows[aWindow.__SSi].isTaskbarTab = true;
}
@@ -53,7 +53,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
let tabbrowser = aWindow.gBrowser;
// add tab change listeners to all already existing tabs
@@ -2107,6 +2115,7 @@ var SessionStoreInternal = {
@@ -2131,6 +2139,7 @@ var SessionStoreInternal = {
null,
"sessionstore-one-or-no-tab-restored"
);
@@ -61,7 +61,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
this._deferredAllWindowsRestored.resolve();
}
// this window was opened by _openWindowWithState
@@ -2151,7 +2160,6 @@ var SessionStoreInternal = {
@@ -2175,7 +2184,6 @@ var SessionStoreInternal = {
if (closedWindowState) {
let newWindowState;
if (
@@ -69,7 +69,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
!lazy.SessionStartup.willRestore()
) {
// We want to split the window up into pinned tabs and unpinned tabs.
@@ -2215,6 +2223,15 @@ var SessionStoreInternal = {
@@ -2239,6 +2247,15 @@ var SessionStoreInternal = {
});
this._shouldRestoreLastSession = false;
}
@@ -85,7 +85,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
if (this._restoreLastWindow && aWindow.toolbar.visible) {
// always reset (if not a popup window)
@@ -2465,7 +2482,7 @@ var SessionStoreInternal = {
@@ -2491,7 +2508,7 @@ var SessionStoreInternal = {
// 2) Flush the window.
// 3) When the flush is complete, revisit our decision to store the window
// in _closedWindows, and add/remove as necessary.
@@ -94,7 +94,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
this.maybeSaveClosedWindow(winData, isLastWindow);
}
@@ -2486,7 +2503,7 @@ var SessionStoreInternal = {
@@ -2512,7 +2529,7 @@ var SessionStoreInternal = {
// Save non-private windows if they have at
// least one saveable tab or are the last window.
@@ -103,7 +103,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
this.maybeSaveClosedWindow(winData, isLastWindow);
if (!isLastWindow && winData.closedId > -1) {
@@ -2582,6 +2599,7 @@ var SessionStoreInternal = {
@@ -2608,6 +2625,7 @@ var SessionStoreInternal = {
let alreadyStored = winIndex != -1;
// If sidebar command is truthy, i.e. sidebar is open, store sidebar settings
let shouldStore = hasSaveableTabs || isLastWindow;
@@ -111,7 +111,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
if (shouldStore && !alreadyStored) {
let index = this._closedWindows.findIndex(win => {
@@ -3373,7 +3391,7 @@ var SessionStoreInternal = {
@@ -3408,7 +3426,7 @@ var SessionStoreInternal = {
if (!isPrivateWindow && tabState.isPrivate) {
return;
}
@@ -120,7 +120,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
return;
}
@@ -4089,6 +4107,12 @@ var SessionStoreInternal = {
@@ -4129,6 +4147,12 @@ var SessionStoreInternal = {
Math.min(tabState.index, tabState.entries.length)
);
tabState.pinned = false;
@@ -133,7 +133,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
if (inBackground === false) {
aWindow.gBrowser.selectedTab = newTab;
@@ -4525,6 +4549,7 @@ var SessionStoreInternal = {
@@ -4565,6 +4589,7 @@ var SessionStoreInternal = {
// Append the tab if we're opening into a different window,
tabIndex: aSource == aTargetWindow ? pos : Infinity,
pinned: state.pinned,
@@ -141,7 +141,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
userContextId: state.userContextId,
skipLoad: true,
preferredRemoteType,
@@ -5374,7 +5399,7 @@ var SessionStoreInternal = {
@@ -5414,7 +5439,7 @@ var SessionStoreInternal = {
for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
let tab = tabbrowser.tabs[i];
@@ -150,7 +150,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
removableTabs.push(tab);
}
}
@@ -5483,7 +5508,7 @@ var SessionStoreInternal = {
@@ -5525,7 +5550,7 @@ var SessionStoreInternal = {
// collect the data for all windows
for (ix in this._windows) {
@@ -159,7 +159,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
// window data is still in _statesToRestore
continue;
}
@@ -5625,11 +5650,12 @@ var SessionStoreInternal = {
@@ -5668,11 +5693,12 @@ var SessionStoreInternal = {
}
let tabbrowser = aWindow.gBrowser;
@@ -173,7 +173,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
// update the internal state data for this window
for (let tab of tabs) {
if (tab == aWindow.FirefoxViewHandler.tab) {
@@ -5640,6 +5666,9 @@ var SessionStoreInternal = {
@@ -5683,6 +5709,9 @@ var SessionStoreInternal = {
tabsData.push(tabData);
}
@@ -183,7 +183,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
// update tab group state for this window
winData.groups = [];
for (let tabGroup of aWindow.gBrowser.tabGroups) {
@@ -5652,7 +5681,7 @@ var SessionStoreInternal = {
@@ -5695,7 +5724,7 @@ var SessionStoreInternal = {
// 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).
if (aWindow.FirefoxViewHandler.tab?.selected) {
@@ -192,7 +192,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
winData.title = tabbrowser.tabs[0].label;
}
winData.selected = selectedIndex;
@@ -5765,8 +5794,8 @@ var SessionStoreInternal = {
@@ -5810,8 +5839,8 @@ var SessionStoreInternal = {
// selectTab represents.
let selectTab = 0;
if (overwriteTabs) {
@@ -203,7 +203,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
selectTab = Math.min(selectTab, winData.tabs.length);
}
@@ -5788,6 +5817,7 @@ var SessionStoreInternal = {
@@ -5833,6 +5862,7 @@ var SessionStoreInternal = {
if (overwriteTabs) {
for (let i = tabbrowser.browsers.length - 1; i >= 0; i--) {
if (!tabbrowser.tabs[i].selected) {
@@ -211,7 +211,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
tabbrowser.removeTab(tabbrowser.tabs[i]);
}
}
@@ -5821,6 +5851,12 @@ var SessionStoreInternal = {
@@ -5866,6 +5896,12 @@ var SessionStoreInternal = {
savedTabGroup => !openTabGroupIdsInWindow.has(savedTabGroup.id)
);
}
@@ -224,7 +224,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
// Move the originally open tabs to the end.
if (initialTabs) {
@@ -6372,6 +6408,25 @@ var SessionStoreInternal = {
@@ -6419,6 +6455,25 @@ var SessionStoreInternal = {
// Most of tabData has been restored, now continue with restoring
// attributes that may trigger external events.
@@ -250,7 +250,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
if (tabData.pinned) {
tabbrowser.pinTab(tab);
@@ -7290,7 +7345,7 @@ var SessionStoreInternal = {
@@ -7343,7 +7398,7 @@ var SessionStoreInternal = {
let groupsToSave = new Map();
for (let tIndex = 0; tIndex < window.tabs.length; ) {
@@ -259,7 +259,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..429a26849cec23836f5bff3bd1a63760
// Adjust window.selected
if (tIndex + 1 < window.selected) {
window.selected -= 1;
@@ -7305,7 +7360,7 @@ var SessionStoreInternal = {
@@ -7358,7 +7413,7 @@ var SessionStoreInternal = {
);
// We don't want to increment tIndex here.
continue;