Bug 1449200: Return icon URL for all sizes when processing an icon string. r?Gijs
The CSS for page action icons doesn't handle fallback when only one variable
is defined, so for widgets that don't define their icons using CSS, we always
need to provide both.
MozReview-Commit-ID: 7UgMSVS3W6K
--- a/browser/modules/PageActions.jsm
+++ b/browser/modules/PageActions.jsm
@@ -687,19 +687,20 @@ Action.prototype = {
"--pageAction-image-16px": escapeCSSURL(this._iconURLForSize(urls, 16)),
"--pageAction-image-32px": escapeCSSURL(this._iconURLForSize(urls, 32)),
});
this._iconProperties.set(urls, props);
}
return props;
}
+ let cssURL = urls ? escapeCSSURL(urls) : null;
return Object.freeze({
- "--pageAction-image-16px": null,
- "--pageAction-image-32px": urls ? escapeCSSURL(urls) : null,
+ "--pageAction-image-16px": cssURL,
+ "--pageAction-image-32px": cssURL,
});
},
/**
* The action's title (string)
*/
getTitle(browserWindow = null) {
return this._getProperties(browserWindow).title;