Open Bug 907471 Opened 10 years ago Updated 1 year ago
Favicon Service should support querying what favicon sizes are available
UX designs for the windows team have taken advantage of that fact that many sites ship multiple favicons in different sizes to morph layout based on favicon size. The larger ones are often make for richer and more appealing user experience. Unfortunately for developers, it appears that it currently impossible to query the favicon service for what sizes are available.
The goal here is: if lovely large image is available use this presentation of the content with the favicon image at (say) 24x24 else use this other presentation with the smaller 16x16 favicon placed in a 24x24 box The media-fragment gets us the nice image when available, but no way to know which we have to make these kind of layout/presentation decisions.
nsIFaviconService is mostly deprecated, that said, as of now there's no point in this kind of API cause we only store 16x16 icons. We need bug 492172 first.
Depends on: PlacesHiresFavicons
No longer blocks: fxdesktopbacklog
I'm not sure if this requirements is still valid, it's currently possible to ask the favicons service for a specific size, and get back an icon and its width in the callback. Or directly use the page-icon protocol. This looks like sort-of what you wanted. In future it may be possible to enfore the service to give back an icon, and if it's smaller fill up the missing part with a dominant color, it's all possible with some additional work.
You need to log in before you can comment on or make changes to this bug.