fix(build): disable LTO temporarily and enable PGO based on release settings

refactor(ui): remove unnecessary DOMContentLoaded listener from toolbar registration
fix(ui): trigger window resize event on closing watermark to recalculate layout
refactor(ui): improve animation structure for tab content in vertical tabs manager
This commit is contained in:
mr. M
2025-03-15 19:36:13 +01:00
parent 9406515f91
commit b6477b17d8
6 changed files with 51 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb0bee29ea 100644
index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..79b9161544633d319d7e550dd95334b62e85eed4 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
@@ -52,7 +52,18 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
}
/**
@@ -1098,7 +1116,11 @@ export class UrlbarInput {
@@ -943,6 +961,10 @@ export class UrlbarInput {
// Nullify search mode before setURI so it won't try to restore it.
this.searchMode = null;
this.setURI(null, true, false, true);
+ if (this.hasAttribute("zen-floating-urlbar")) {
+ this.window.gBrowser.selectedBrowser.focus();
+ return;
+ }
if (this.value && this.focused) {
this.select();
}
@@ -1098,7 +1120,11 @@ export class UrlbarInput {
}
if (!this.#providesSearchMode(result)) {
@@ -65,7 +76,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
}
this.controller.recordSelectedResult(event, result);
@@ -2157,6 +2179,11 @@ export class UrlbarInput {
@@ -2157,6 +2183,11 @@ export class UrlbarInput {
this.setAttribute("breakout-extend", "true");
@@ -77,7 +88,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
// Enable the animation only after the first extend call to ensure it
// doesn't run when opening a new window.
if (!this.hasAttribute("breakout-extend-animate")) {
@@ -2176,6 +2203,11 @@ export class UrlbarInput {
@@ -2176,6 +2207,11 @@ export class UrlbarInput {
return;
}
@@ -89,7 +100,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
this.removeAttribute("breakout-extend");
this.#updateTextboxPosition();
}
@@ -2998,7 +3030,7 @@ export class UrlbarInput {
@@ -2998,7 +3034,7 @@ export class UrlbarInput {
*/
_trimValue(val) {
let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
@@ -98,7 +109,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
: val;
// Only trim value if the directionality doesn't change to RTL and we're not
// showing a strikeout https protocol.
@@ -3365,7 +3397,7 @@ export class UrlbarInput {
@@ -3365,7 +3401,7 @@ export class UrlbarInput {
} else {
where = lazy.BrowserUtils.whereToOpenLink(event, false, false);
}
@@ -107,7 +118,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
if (where == "current") {
where = "tab";
} else if (where == "tab") {
@@ -3380,6 +3412,9 @@ export class UrlbarInput {
@@ -3380,6 +3416,9 @@ export class UrlbarInput {
) {
where = "current";
}
@@ -117,7 +128,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
return where;
}
@@ -3921,6 +3956,11 @@ export class UrlbarInput {
@@ -3921,6 +3960,11 @@ export class UrlbarInput {
}
_on_click(event) {
@@ -129,7 +140,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
if (
event.target == this.inputField ||
event.target == this._inputContainer ||
@@ -3992,7 +4032,7 @@ export class UrlbarInput {
@@ -3992,7 +4036,7 @@ export class UrlbarInput {
}
}
@@ -138,7 +149,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
this.view.autoOpen({ event });
} else {
if (this._untrimOnFocusAfterKeydown) {
@@ -4032,9 +4072,12 @@ export class UrlbarInput {
@@ -4032,9 +4076,12 @@ export class UrlbarInput {
}
_on_mousedown(event) {
@@ -152,7 +163,7 @@ index 02c328f0d0724b0cf95c820fe49a43e94a97b3c2..30387bf4f128fdc1d687ee4f6c5a51eb
if (
event.target != this.inputField &&
@@ -4044,8 +4087,8 @@ export class UrlbarInput {
@@ -4044,8 +4091,8 @@ export class UrlbarInput {
break;
}