Distinguish "rich" icons in the favicons service and when asking for a small sized icon prefer the classic ones
Categories
(Firefox :: Bookmarks & History, defect, P3)
Tracking
()
People
(Reporter: rickmastfan67, Assigned: yazan)
References
(Blocks 1 open bug)
Details
(Whiteboard: [favicons-2024][sng])
User Story
Let's add a "flags" integer field to the moz_icons table, the first flag will be ICON_RICH (more flags could be added in the future, for excample for mask-icon or dark/light). The info will be missing for already existing icons. we'll then use this info in bug 1494016 (see bug 1494016 comment 7 there for some code hints).
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Steps to reproduce:
- Loaded the following page: https://www.nhl.com/penguins
- Notice in the 'tab', that the favicon is the Pittsburgh Penguins logo.
- Now, attempt to bookmark the website.
- Notice that you can see in the initial bookmark creation window, that it shows the Penguins logo.
- Save the bookmark (doesn't matter where, but save it in the Bookmark toolbar for easy access).
Actual results:
Once the bookmark is saved, the 'favicon' is that of the NHL's main website.
Expected results:
Once the bookmark is saved, the 'favicon' should be the Pittsburgh Penguins logo, as you can see in the tab for the website.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Bookmarks & History' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Reproducible on Firefox 101 through Firefox 103.0a1 on Windows 10 and MacOS 11 as well.
Thank you for reporting!
Updated•3 years ago
|
Comment 3•3 years ago
|
||
The site is doing something particular here.
The icon shortcut points to the Penguins icon, that is a 256x256 png
Then it also provides apple-touch-icons in 57x57, 72x72, 114x114, 144x144 sizes, but those are generic nhl icons, not specific.
The tab just ignores apple-touch-icon entries, but the favicon service doesn't, it wants all the plausible icon sources, to do a better job at upscaling/downscaling. After all the service may have to provide an icon for the New Tab page or other similar UIs.
When we ask to the favicon service a 32px icon, it will try to find one close to the requested size, and it will return the 57x57 apple-touch-icon.
Now, this could be fixed on the site itself by providing a multi-resolution ico file or an svg in "shortcut icon", that would better adapt to multiple resolutions.
On our side, probably a solution would be to store whether an icon is "rich" or "classic", and when asking for common sized icons (16 to 64px) give priority to the classic ones, only use rich ones as fallback.
This issue is reported many times.
The tab just ignores apple-touch-icon entries, but the favicon service doesn't
They should use the same icon, not do something different.
When we ask to the favicon service a 32px icon, it will try to find one close to the requested size, and it will return the 57x57 apple-touch-icon.
That is not a reasonable strategy. Suppose that a 36px icon is closest; resizing that one will probably give a lousy result. It would be better to use an icon that is a multiple of the requested one (64px, 128px) or an SVG icon.
Personally I would prefer the SVG always, if present, because it may contain a style sheet that adapts to dark mode, for instance. And, important, store the SVG and not a converted bitmap version, otherwise switching between light and dark mode still does not work.
Comment 10•1 year ago
|
||
(In reply to Ben from comment #9)
This issue is reported many times.
I'm not so sure if this bug will ever be fixed.
Again, the reason using apple-touch-icon as the first preference is a bad idea is that it's not even supposed to be used inside a browser. It's the icon when you drag a webpage to an Apple device's homepage. For example, when you drag mozilla.org to your iPhone homepage, it appears next to icons like "Settings" and "App Store". If you've ever used an Apple device, you would notice that such icons have a specific shape (they don't have corners). In fact, they also have specific colour requirements (Apple devices will autofill any apple-touch-icon transparency with black), that's why it's not supposed to be used anywhere else.
Updated•8 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Assignee | ||
Updated•7 months ago
|
Assignee | ||
Comment 11•7 months ago
|
||
Assignee | ||
Comment 12•7 months ago
|
||
Assignee | ||
Comment 13•7 months ago
|
||
Comment 14•5 months ago
|
||
Assignee | ||
Updated•5 months ago
|
Comment 15•5 months ago
|
||
bugherder |
Updated•5 months ago
|
Updated•5 months ago
|
Description
•