fix: Fixed essentials content not loading, b=(closes #8039), c=common, tabs

This commit is contained in:
Mr. M
2025-05-05 20:10:48 +02:00
parent 9d7c33228f
commit def0ed7a52
4 changed files with 30 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec4864aad73f5 100644
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..a05dfd9b28c0c082579a5b53386de9ffbfc5e737 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
@@ -86,19 +86,20 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
startLayoutExtend() {
if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
// Do not expand if the Urlbar does not support being expanded or it is
@@ -2147,6 +2183,11 @@ export class UrlbarInput {
@@ -2147,6 +2183,12 @@ export class UrlbarInput {
this.setAttribute("breakout-extend", "true");
+ if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) {
+ this.setAttribute("zen-floating-urlbar", "true");
+ this.window.gZenUIManager.onFloatingURLBarOpen();
+ } else {
+ this.removeAttribute("zen-floating-urlbar");
+ }
// 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")) {
@@ -2166,6 +2207,24 @@ export class UrlbarInput {
@@ -2166,6 +2208,24 @@ export class UrlbarInput {
return;
}
@@ -123,7 +124,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
this.removeAttribute("breakout-extend");
this.#updateTextboxPosition();
}
@@ -2485,7 +2544,7 @@ export class UrlbarInput {
@@ -2485,7 +2545,7 @@ export class UrlbarInput {
this.textbox.parentNode.style.setProperty(
"--urlbar-container-height",
@@ -132,7 +133,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
);
this.textbox.style.setProperty(
"--urlbar-height",
@@ -2998,7 +3057,7 @@ export class UrlbarInput {
@@ -2998,7 +3058,7 @@ export class UrlbarInput {
*/
_trimValue(val) {
let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
@@ -141,7 +142,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
: val;
// Only trim value if the directionality doesn't change to RTL and we're not
// showing a strikeout https protocol.
@@ -3368,6 +3427,10 @@ export class UrlbarInput {
@@ -3368,6 +3428,10 @@ export class UrlbarInput {
}
reuseEmpty = true;
}
@@ -152,7 +153,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
if (
where == "tab" &&
reuseEmpty &&
@@ -3375,6 +3438,9 @@ export class UrlbarInput {
@@ -3375,6 +3439,9 @@ export class UrlbarInput {
) {
where = "current";
}
@@ -162,7 +163,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
return where;
}
@@ -3632,6 +3698,7 @@ export class UrlbarInput {
@@ -3632,6 +3699,7 @@ export class UrlbarInput {
this.setResultForCurrentValue(null);
this.handleCommand();
this.controller.clearLastQueryContextCache();
@@ -170,7 +171,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
this._suppressStartQuery = false;
});
@@ -3639,7 +3706,6 @@ export class UrlbarInput {
@@ -3639,7 +3707,6 @@ export class UrlbarInput {
contextMenu.addEventListener("popupshowing", () => {
// Close the results pane when the input field contextual menu is open,
// because paste and go doesn't want a result selection.
@@ -178,7 +179,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
let controller =
this.document.commandDispatcher.getControllerForCommand("cmd_paste");
@@ -4053,6 +4119,11 @@ export class UrlbarInput {
@@ -4053,6 +4120,11 @@ export class UrlbarInput {
}
_on_click(event) {
@@ -190,7 +191,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
if (
event.target == this.inputField ||
event.target == this._inputContainer ||
@@ -4124,7 +4195,7 @@ export class UrlbarInput {
@@ -4124,7 +4196,7 @@ export class UrlbarInput {
}
}
@@ -199,7 +200,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
this.view.autoOpen({ event });
} else {
if (this._untrimOnFocusAfterKeydown) {
@@ -4164,9 +4235,12 @@ export class UrlbarInput {
@@ -4164,9 +4236,12 @@ export class UrlbarInput {
}
_on_mousedown(event) {
@@ -213,7 +214,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
if (
event.target != this.inputField &&
@@ -4176,8 +4250,8 @@ export class UrlbarInput {
@@ -4176,8 +4251,8 @@ export class UrlbarInput {
break;
}
@@ -224,7 +225,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..461bae1f8f4d208bc4048fb9494ec486
// Keep the focus status, since the attribute may be changed
// upon calling this.focus().
@@ -4218,7 +4292,7 @@ export class UrlbarInput {
@@ -4218,7 +4293,7 @@ export class UrlbarInput {
}
// Don't close the view when clicking on a tab; we may want to keep the
// view open on tab switch, and the TabSelect event arrived earlier.