summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/handling
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:11:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:11:27 +0000
commitf3bcaf9f88aad2c423ebcd61121562f9834187d4 (patch)
treef22238c29b57707b645a350940e3e9bdf3ce1f5d /toolkit/mozapps/handling
parentAdding debian version 115.7.0esr-1~deb12u1. (diff)
downloadfirefox-esr-f3bcaf9f88aad2c423ebcd61121562f9834187d4.tar.xz
firefox-esr-f3bcaf9f88aad2c423ebcd61121562f9834187d4.zip
Merging upstream version 115.8.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/mozapps/handling')
-rw-r--r--toolkit/mozapps/handling/content/appChooser.js14
-rw-r--r--toolkit/mozapps/handling/content/handler.css4
2 files changed, 7 insertions, 11 deletions
diff --git a/toolkit/mozapps/handling/content/appChooser.js b/toolkit/mozapps/handling/content/appChooser.js
index f12ec333a2..2958ad68b4 100644
--- a/toolkit/mozapps/handling/content/appChooser.js
+++ b/toolkit/mozapps/handling/content/appChooser.js
@@ -13,7 +13,7 @@ class MozHandler extends window.MozElements.MozRichlistitem {
static get markup() {
return `
<vbox pack="center">
- <html:img height="32" width="32"/>
+ <html:img alt="" height="32" width="32" loading="lazy" />
</vbox>
<vbox flex="1">
<label class="name"/>
@@ -49,10 +49,6 @@ window.addEventListener("DOMContentLoaded", () => dialog.initialize(), {
once: true,
});
-let loadPromise = new Promise(resolve => {
- window.addEventListener("load", resolve, { once: true });
-});
-
let dialog = {
/**
* This function initializes the content of the dialog.
@@ -131,9 +127,7 @@ let dialog = {
if (app instanceof Ci.nsILocalHandlerApp) {
// See if we have an nsILocalHandlerApp and set the icon
let uri = Services.io.newFileURI(app.executable);
- loadPromise.then(() => {
- elm.setAttribute("image", "moz-icon://" + uri.spec + "?size=32");
- });
+ elm.setAttribute("image", "moz-icon://" + uri.spec + "?size=32");
} else if (app instanceof Ci.nsIWebHandlerApp) {
let uri = Services.io.newURI(app.uriTemplate);
if (/^https?$/.test(uri.scheme)) {
@@ -143,9 +137,7 @@ let dialog = {
// and users won't visit the handler's URL template, they'll only
// visit URLs derived from that template (i.e. with %s in the template
// replaced by the URL of the content being handled).
- loadPromise.then(() => {
- elm.setAttribute("image", uri.prePath + "/favicon.ico");
- });
+ elm.setAttribute("image", uri.prePath + "/favicon.ico");
}
elm.setAttribute("description", uri.prePath);
diff --git a/toolkit/mozapps/handling/content/handler.css b/toolkit/mozapps/handling/content/handler.css
index d465ffa97d..2e60b1b41f 100644
--- a/toolkit/mozapps/handling/content/handler.css
+++ b/toolkit/mozapps/handling/content/handler.css
@@ -32,6 +32,10 @@ label, description {
margin: 0 4px 16px;
}
+#chooser img:is(:-moz-broken, :not([src])) {
+ visibility: hidden;
+}
+
/* avoid double inline margins when #description is nested: */
#description-box > #description {
margin-inline: 0;