1
1
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
2
- index 8c6047e1ada5a22e57e1e665965237c9e22641d7..ccd2779d66eda9d034ca51cc3200d81447514e2c 100644
2
+ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..8d0585e738a5a758ebbddfa0787c71d634dadd4d 100644
3
3
--- a/browser/components/sessionstore/SessionStore.sys.mjs
4
4
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
5
5
@@ -2088,7 +2088,6 @@ var SessionStoreInternal = {
@@ -31,17 +31,19 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..ccd2779d66eda9d034ca51cc3200d814
31
31
return;
32
32
}
33
33
34
- @@ -3925,6 +3922,9 @@ var SessionStoreInternal = {
34
+ @@ -3925,6 +3922,11 @@ var SessionStoreInternal = {
35
35
Math.min(tabState.index, tabState.entries.length)
36
36
);
37
37
tabState.pinned = false;
38
38
+ tabState.zenEssential = false;
39
39
+ tabState.zenPinnedId = null;
40
+ + tabState.zenIsGlance = false;
41
+ + tabState.zenGlanceId = null;
40
42
+ tabState.zenHasStaticLabel = false;
41
43
42
44
if (inBackground === false) {
43
45
aWindow.gBrowser.selectedTab = newTab;
44
- @@ -5239,7 +5239 ,7 @@ var SessionStoreInternal = {
46
+ @@ -5239,7 +5241 ,7 @@ var SessionStoreInternal = {
45
47
}
46
48
47
49
let workspaceID = aWindow.getWorkspaceID();
@@ -50,7 +52,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..ccd2779d66eda9d034ca51cc3200d814
50
52
winData.workspaceID = workspaceID;
51
53
}
52
54
},
53
- @@ -5430,14 +5430 ,15 @@ var SessionStoreInternal = {
55
+ @@ -5430,14 +5432 ,15 @@ var SessionStoreInternal = {
54
56
}
55
57
56
58
let tabbrowser = aWindow.gBrowser;
@@ -68,7 +70,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..ccd2779d66eda9d034ca51cc3200d814
68
70
continue;
69
71
}
70
72
let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab));
71
- @@ -5456,8 +5457 ,8 @@ var SessionStoreInternal = {
73
+ @@ -5456,8 +5459 ,8 @@ var SessionStoreInternal = {
72
74
// We don't store the Firefox View tab in Session Store, so if it was the last selected "tab" when
73
75
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
74
76
// since it's only inserted into the tab strip after it's selected).
@@ -79,7 +81,7 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..ccd2779d66eda9d034ca51cc3200d814
79
81
winData.title = tabbrowser.tabs[0].label;
80
82
}
81
83
winData.selected = selectedIndex;
82
- @@ -5569,8 +5570 ,8 @@ var SessionStoreInternal = {
84
+ @@ -5569,8 +5572 ,8 @@ var SessionStoreInternal = {
83
85
// selectTab represents.
84
86
let selectTab = 0;
85
87
if (overwriteTabs) {
@@ -90,20 +92,21 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..ccd2779d66eda9d034ca51cc3200d814
90
92
selectTab = Math.min(selectTab, winData.tabs.length);
91
93
}
92
94
93
- @@ -5613,6 +5614 ,7 @@ var SessionStoreInternal = {
95
+ @@ -5613,6 +5616 ,7 @@ var SessionStoreInternal = {
94
96
winData.tabs,
95
97
winData.groups ?? []
96
98
);
97
99
+ aWindow.gZenViewSplitter?.restoreDataFromSessionStore(winData.splitViewData);
98
100
this._log.debug(
99
101
`restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs`
100
102
);
101
- @@ -6162,8 +6164,23 @@ var SessionStoreInternal = {
103
+ @@ -6162,6 +6166,22 @@ var SessionStoreInternal = {
102
104
103
105
// Most of tabData has been restored, now continue with restoring
104
106
// attributes that may trigger external events.
105
107
+ if (tabData.zenEssential) {
106
108
+ tab.setAttribute("zen-essential", "true");
109
+ + tabData.pinned = true; // Essential tabs are always pinned.
107
110
+ }
108
111
+ if (tabData.zenIsEmpty) {
109
112
+ tab.setAttribute("zen-empty-tab", "true");
@@ -118,8 +121,5 @@ index 8c6047e1ada5a22e57e1e665965237c9e22641d7..ccd2779d66eda9d034ca51cc3200d814
118
121
+ tab.setAttribute("zenDefaultUserContextId", true);
119
122
+ }
120
123
121
- - if (tabData.pinned) {
122
- + if (tabData.pinned || tabData.zenEssential) {
124
+ if (tabData.pinned) {
123
125
tabbrowser.pinTab(tab);
124
- } else {
125
- tabbrowser.unpinTab(tab);
0 commit comments