Skip to content

Commit d800c20

Browse files
committed
fix: Fixed some issues before release, b=(no-bug), c=common, compact-mode, workspaces
1 parent 8a72d25 commit d800c20

File tree

6 files changed

+73
-42
lines changed

6 files changed

+73
-42
lines changed

src/browser/components/tabbrowser/content/tabbrowser-js.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
2-
index 6dece2b9d0462d90a28e75350ce983d87816ef73..a285c5cbc23eaeebc8248b950c0275645f8a5cd3 100644
2+
index 6dece2b9d0462d90a28e75350ce983d87816ef73..4cc07f008d99138a76c8e9813c857c352b425006 100644
33
--- a/browser/components/tabbrowser/content/tabbrowser.js
44
+++ b/browser/components/tabbrowser/content/tabbrowser.js
55
@@ -415,11 +415,58 @@
@@ -543,14 +543,14 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..a285c5cbc23eaeebc8248b950c027564
543543
if (unloadBlocked) {
544544
return;
545545
}
546-
@@ -5247,6 +5409,7 @@
547-
aExcludeTabs.push(FirefoxViewHandler.tab);
546+
@@ -5248,6 +5410,7 @@
548547
}
549548

550-
+ aExcludeTabs.push(...ZenWorkspaces.getTabsToExclude(aTab));
551549
let excludeTabs = new Set(aExcludeTabs);
550+
+ ZenWorkspaces.getTabsToExclude(aTab).forEach(tab => excludeTabs.add(tab));
552551

553552
// If this tab has a successor, it should be selectable, since
553+
// hiding or closing a tab removes that tab as a successor.
554554
@@ -5260,13 +5423,13 @@
555555
!excludeTabs.has(aTab.owner) &&
556556
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")

src/browser/components/urlbar/UrlbarInput-sys-mjs.patch

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
2-
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a87a77c58 100644
2+
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8d1a80e97fa711352d4b725f2d299a073dbae4db 100644
33
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
44
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
55
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
@@ -16,19 +16,24 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
1616
const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
1717
const SEARCH_BUTTON_CLASS = "urlbar-search-button";
1818

19-
@@ -349,7 +356,11 @@ export class UrlbarInput {
19+
@@ -349,7 +356,16 @@ export class UrlbarInput {
2020
// See _on_select(). HTMLInputElement.select() dispatches a "select"
2121
// event but does not set the primary selection.
2222
this._suppressPrimaryAdjustment = true;
23-
+ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", !this.document.getElementById("navigator-toolbox").hasAttribute("zen-has-hover"));
23+
+ const zenToolbox = this.document.getElementById("navigator-toolbox");
24+
+ zenToolbox.setAttribute("supress-primary-adjustment", !(
25+
+ zenToolbox.hasAttribute("zen-has-hover") ||
26+
+ zenToolbox.hasAttribute("zen-has-empty-tab") ||
27+
+ zenToolbox.hasAttribute("zen-user-show")
28+
+ ));
2429
this.inputField.select();
2530
+ this.document.ownerGlobal.setTimeout(() => {
26-
+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment");
31+
+ zenToolbox.removeAttribute("supress-primary-adjustment");
2732
+ }, 1000);
2833
this._suppressPrimaryAdjustment = false;
2934
}
3035

31-
@@ -425,6 +436,10 @@ export class UrlbarInput {
36+
@@ -425,6 +441,10 @@ export class UrlbarInput {
3237
hideSearchTerms = false,
3338
isSameDocument = false
3439
) {
@@ -39,20 +44,25 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
3944
// We only need to update the searchModeUI on tab switch conditionally
4045
// as we only persist searchMode with ScotchBonnet enabled.
4146
if (
42-
@@ -698,8 +713,11 @@ export class UrlbarInput {
47+
@@ -698,8 +718,16 @@ export class UrlbarInput {
4348
return;
4449
}
4550
}
4651
-
47-
+ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", !this.document.getElementById("navigator-toolbox").hasAttribute("zen-has-hover"));
52+
+ const zenToolbox = this.document.getElementById("navigator-toolbox");
53+
+ zenToolbox.setAttribute("supress-primary-adjustment", !(
54+
+ zenToolbox.hasAttribute("zen-has-hover") ||
55+
+ zenToolbox.hasAttribute("zen-has-empty-tab") ||
56+
+ zenToolbox.hasAttribute("zen-user-show")
57+
+ ));
4858
this.handleNavigation({ event });
4959
+ this.document.ownerGlobal.setTimeout(() => {
50-
+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment");
51-
+ }, 200);
60+
+ zenToolbox.removeAttribute("supress-primary-adjustment");
61+
+ }, 1000);
5262
}
5363

5464
/**
55-
@@ -1093,7 +1111,11 @@ export class UrlbarInput {
65+
@@ -1093,7 +1121,11 @@ export class UrlbarInput {
5666
}
5767

5868
if (!this.#providesSearchMode(result)) {
@@ -65,7 +75,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
6575
}
6676

6777
this.controller.recordSelectedResult(event, result);
68-
@@ -2125,6 +2147,10 @@ export class UrlbarInput {
78+
@@ -2125,6 +2157,10 @@ export class UrlbarInput {
6979
await this.#updateLayoutBreakoutDimensions();
7080
}
7181

@@ -76,7 +86,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
7686
startLayoutExtend() {
7787
if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
7888
// Do not expand if the Urlbar does not support being expanded or it is
79-
@@ -2147,6 +2173,13 @@ export class UrlbarInput {
89+
@@ -2147,6 +2183,13 @@ export class UrlbarInput {
8090

8191
this.setAttribute("breakout-extend", "true");
8292

@@ -90,7 +100,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
90100
// Enable the animation only after the first extend call to ensure it
91101
// doesn't run when opening a new window.
92102
if (!this.hasAttribute("breakout-extend-animate")) {
93-
@@ -2166,6 +2199,19 @@ export class UrlbarInput {
103+
@@ -2166,6 +2209,24 @@ export class UrlbarInput {
94104
return;
95105
}
96106

@@ -99,18 +109,23 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
99109
+ }
100110
+
101111
+ // Arc like URLbar: Blur the input on exit
102-
+ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", !this.document.getElementById("navigator-toolbox").hasAttribute("zen-has-hover"));
112+
+ const zenToolbox = this.document.getElementById("navigator-toolbox");
113+
+ zenToolbox.setAttribute("supress-primary-adjustment", !(
114+
+ zenToolbox.hasAttribute("zen-has-hover") ||
115+
+ zenToolbox.hasAttribute("zen-has-empty-tab") ||
116+
+ zenToolbox.hasAttribute("zen-user-show")
117+
+ ));
103118
+ this.window.gBrowser.selectedBrowser.focus();
104-
+ this.window.setTimeout(() => {
105-
+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment");
106-
+ }, 100);
119+
+ this.document.ownerGlobal.setTimeout(() => {
120+
+ zenToolbox.removeAttribute("supress-primary-adjustment");
121+
+ }, 1000);
107122
+
108123
+ this.removeAttribute("zen-floating-urlbar");
109124
+
110125
this.removeAttribute("breakout-extend");
111126
this.#updateTextboxPosition();
112127
}
113-
@@ -2485,7 +2531,7 @@ export class UrlbarInput {
128+
@@ -2485,7 +2546,7 @@ export class UrlbarInput {
114129

115130
this.textbox.parentNode.style.setProperty(
116131
"--urlbar-container-height",
@@ -119,7 +134,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
119134
);
120135
this.textbox.style.setProperty(
121136
"--urlbar-height",
122-
@@ -2998,7 +3044,7 @@ export class UrlbarInput {
137+
@@ -2998,7 +3059,7 @@ export class UrlbarInput {
123138
*/
124139
_trimValue(val) {
125140
let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
@@ -128,7 +143,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
128143
: val;
129144
// Only trim value if the directionality doesn't change to RTL and we're not
130145
// showing a strikeout https protocol.
131-
@@ -3368,6 +3414,10 @@ export class UrlbarInput {
146+
@@ -3368,6 +3429,10 @@ export class UrlbarInput {
132147
}
133148
reuseEmpty = true;
134149
}
@@ -139,7 +154,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
139154
if (
140155
where == "tab" &&
141156
reuseEmpty &&
142-
@@ -3375,6 +3425,9 @@ export class UrlbarInput {
157+
@@ -3375,6 +3440,9 @@ export class UrlbarInput {
143158
) {
144159
where = "current";
145160
}
@@ -149,23 +164,23 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
149164
return where;
150165
}
151166

152-
@@ -3632,6 +3685,7 @@ export class UrlbarInput {
167+
@@ -3632,6 +3700,7 @@ export class UrlbarInput {
153168
this.setResultForCurrentValue(null);
154169
this.handleCommand();
155170
this.controller.clearLastQueryContextCache();
156171
+ this.view.close();
157172

158173
this._suppressStartQuery = false;
159174
});
160-
@@ -3639,7 +3693,6 @@ export class UrlbarInput {
175+
@@ -3639,7 +3708,6 @@ export class UrlbarInput {
161176
contextMenu.addEventListener("popupshowing", () => {
162177
// Close the results pane when the input field contextual menu is open,
163178
// because paste and go doesn't want a result selection.
164179
- this.view.close();
165180

166181
let controller =
167182
this.document.commandDispatcher.getControllerForCommand("cmd_paste");
168-
@@ -4053,6 +4106,11 @@ export class UrlbarInput {
183+
@@ -4053,6 +4121,11 @@ export class UrlbarInput {
169184
}
170185

171186
_on_click(event) {
@@ -177,7 +192,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
177192
if (
178193
event.target == this.inputField ||
179194
event.target == this._inputContainer ||
180-
@@ -4124,7 +4182,7 @@ export class UrlbarInput {
195+
@@ -4124,7 +4197,7 @@ export class UrlbarInput {
181196
}
182197
}
183198

@@ -186,7 +201,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
186201
this.view.autoOpen({ event });
187202
} else {
188203
if (this._untrimOnFocusAfterKeydown) {
189-
@@ -4164,9 +4222,12 @@ export class UrlbarInput {
204+
@@ -4164,9 +4237,12 @@ export class UrlbarInput {
190205
}
191206

192207
_on_mousedown(event) {
@@ -200,7 +215,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
200215

201216
if (
202217
event.target != this.inputField &&
203-
@@ -4176,8 +4237,8 @@ export class UrlbarInput {
218+
@@ -4176,8 +4252,8 @@ export class UrlbarInput {
204219
break;
205220
}
206221

@@ -211,7 +226,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a
211226

212227
// Keep the focus status, since the attribute may be changed
213228
// upon calling this.focus().
214-
@@ -4218,7 +4279,7 @@ export class UrlbarInput {
229+
@@ -4218,7 +4294,7 @@ export class UrlbarInput {
215230
}
216231
// Don't close the view when clicking on a tab; we may want to keep the
217232
// view open on tab switch, and the TabSelect event arrived earlier.

src/zen/common/ZenUIManager.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,8 @@ var gZenUIManager = {
341341
}
342342

343343
gURLBar.handleRevert();
344+
} else if (onElementPicked && onSwitch) {
345+
this.clearUrlbarData();
344346
}
345347

346348
if (gURLBar.focused) {

src/zen/common/styles/zen-urlbar.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,10 @@ button.popup-notification-dropmarker {
461461
#urlbar-container:has(&) {
462462
border-radius: 10px;
463463
background: var(--toolbarbutton-hover-background);
464+
:root:not([zen-single-toolbar='true']) & {
465+
max-height: 32px !important;
466+
min-height: unset;
467+
}
464468
}
465469
}
466470

@@ -526,7 +530,7 @@ button.popup-notification-dropmarker {
526530
margin-right: 0 !important;
527531
}
528532

529-
.urlbarView:not([action-override='true']) .urlbarView-row[type='switchtab'] .urlbarView-no-wrap {
533+
.urlbarView:not([action-override='true']) .urlbarView-row:is([type='switchtab'], [type='clipboard']) .urlbarView-no-wrap {
530534
width: 100%;
531535
}
532536

src/zen/compact-mode/ZenCompactMode.mjs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,22 +245,31 @@ var gZenCompactModeManager = {
245245
}
246246
)
247247
.then(() => {
248+
if (gZenUIManager._hasSetSingleToolbar) {
249+
gURLBar.textbox.style.visibility = 'visible';
250+
}
248251
this.sidebar.style.transition = 'none';
249-
this.sidebar.style.opacity = 0;
250-
setTimeout(() => {
251-
this.sidebar.removeAttribute('animate');
252-
document.documentElement.removeAttribute('zen-compact-animating');
252+
const titlebar = document.getElementById('titlebar');
253+
titlebar.style.visibility = 'hidden';
254+
titlebar.style.transition = 'none';
255+
this.sidebar.removeAttribute('animate');
256+
document.documentElement.removeAttribute('zen-compact-animating');
253257

254-
this.getAndApplySidebarWidth({});
255-
this._ignoreNextResize = true;
258+
this.getAndApplySidebarWidth({});
259+
this._ignoreNextResize = true;
256260

261+
setTimeout(() => {
257262
this.sidebar.style.removeProperty('margin-right');
258263
this.sidebar.style.removeProperty('margin-left');
259-
this.sidebar.style.removeProperty('opacity');
260264
this.sidebar.style.removeProperty('transition');
265+
this.sidebar.style.removeProperty('transform');
266+
267+
titlebar.style.removeProperty('visibility');
268+
titlebar.style.removeProperty('transition');
261269

270+
gURLBar.textbox.style.removeProperty('visibility');
262271
resolve();
263-
}, 0);
272+
});
264273
});
265274
} else if (canHideSidebar && !isCompactMode) {
266275
document.getElementById('browser').style.overflow = 'clip';

src/zen/workspaces/ZenWorkspaces.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2775,7 +2775,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
27752775
(tab) =>
27762776
tab.getAttribute('zen-workspace-id') !== tabWorkspaceId &&
27772777
!tab.hasAttribute('zen-essential') &&
2778-
!(this.containerSpecificEssentials && tab.getAttribute('container') !== aTab.getAttribute('container'))
2778+
!(this.containerSpecificEssentials && tab.getAttribute('container') !== aTab.getAttribute('container')) &&
2779+
!tab.hasAttribute('zen-empty-tab')
27792780
);
27802781
}
27812782

0 commit comments

Comments
 (0)