summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/handling/content
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps/handling/content')
-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;