Lower quality icon is shown (scaled from 19 to 16) when "browser_action" lists both "16" and "19"
Categories
(WebExtensions :: Frontend, defect, P1)
Tracking
(firefox-esr102 unaffected, firefox109 wontfix, firefox110 wontfix, firefox111 verified)
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox109 | --- | wontfix |
firefox110 | --- | wontfix |
firefox111 | --- | verified |
People
(Reporter: extophf, Assigned: willdurand)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [addons-jira])
Attachments
(6 files)
Steps to reproduce:
- install an extension that specifies both "16" and "19" icons in its "browser_action"
- pin its icon using the Unified extensions UI
Actual results:
The icon is smudged because the image for 19px was scaled down to 16px.
Expected results:
The icon is clear and crisp when the image for 16px is used.
Regressed in 108: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=650b8a7c958514f3357acfb4a7342a5d14f58537&tochange=963d3b67f5243687fcb5bc122a22a536caa9a9fd
As to why this is a problem, it's because extension authors want to specify both "16" and "19" (as well as "32" and "38") to support various browser modifications that may use different icon sizes in their UI. Some browsers may even make it configurable by the user.
Comment 4•2 years ago
|
||
Hello,
I reproduced the issue on the latest Nightly (111.0a1/20230119163652), Beta (110.0b3/20230119185824) and Release (109.0/20230112150232) under Windows 10 x64 and Ubuntu 16.04 LTS.
Once the extension is pinned to the toolbar, the icon is indeed smudged. For further details, see the attached screenshot.
Comment 5•2 years ago
|
||
BTW the problem is not limited to just "19", but "32" is also problematic. It looks like Firefox now chooses the biggest icon regardless of the display's dpi. If you rename "19" to "32" in the attached extension's manifest.json you'll see Firefox incorrectly shows the "32" icon, whereas on a single-density display the correct choice is "16", just as it was previously.
Comment 7•2 years ago
•
|
||
I'm unable to reproduce this on my end. Could you run mozregression to see when this started happening?
Edit: Nevermind, I see the problem now.
Comment 9•2 years ago
|
||
Last good revision: f9bb8bffa11e11c730bcefc548ee3a374902f838
First bad revision: 31f51c0e8a5c8b320c02cd9772c51419e9474a2c
Reporter | ||
Comment 10•2 years ago
|
||
The old code was using 16/32/16/32,
but the new code uses 16/32/32/64:
- if (gUnifiedExtensionsEnabled) {
-
return `
-
${getStyle("menupanel-image", icon16)}
-
${getStyle("menupanel-image-2x", icon32)}
-
${getStyle("toolbar-image", icon32)}
-
${getStyle("toolbar-image-2x", icon64)}
-
`;
- }
- return
${getStyle("menupanel-image", icon16)} ${getStyle("menupanel-image-2x", icon32)} ${getStyle("toolbar-image", icon16)} ${getStyle("toolbar-image-2x", icon32)}
;
Comment 11•2 years ago
|
||
Set release status flags based on info from the regressing bug 1798324
:willdurand, since you are the author of the regressor, bug 1798324, could you take a look? Also, could you set the severity field?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 12•2 years ago
|
||
According to searchfox, we use 32/64px icons for both the toolbar and the menupanel. This is because we need "bigger" icons in the extensions panel.
Reporter | ||
Comment 13•2 years ago
|
||
Maybe srcset
attribute could help. Regardless of the method, for a N-pixel single-density image the proper solution is to use a N-pixel source icon.
Comment 14•2 years ago
•
|
||
You can work around the issue by using SVG.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/icons#svg
Assignee | ||
Comment 15•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Updated•2 years ago
|
Comment 17•2 years ago
|
||
bugherder |
Comment 18•2 years ago
|
||
Verified as Fixed on the latest Nightly (111.0a1/20230130214413). Tested on Windows 10 x64 and Ubuntu 16.04 LTS.
The pinned to toolbar icon is no longer smudged and looks sharper. For further details, see the attached screenshot depicting the icon before the fix (upper part of the image) and the icon after the fix (lower part of the image).
Comment 19•2 years ago
|
||
Comment 20•2 years ago
|
||
The patch landed in nightly and beta is affected.
:willdurand, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox110
towontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Description
•