diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:11:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:11:26 +0000 |
commit | fcea19dfd2c426bac0456da850e7c12258e4b9eb (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /toolkit/mozapps/handling/content | |
parent | Adding upstream version 115.7.0esr. (diff) | |
download | firefox-esr-upstream/115.8.0esr.tar.xz firefox-esr-upstream/115.8.0esr.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/mozapps/handling/content')
-rw-r--r-- | toolkit/mozapps/handling/content/appChooser.js | 14 | ||||
-rw-r--r-- | toolkit/mozapps/handling/content/handler.css | 4 |
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; |