Closed Bug 766418 Opened 13 years ago Closed 12 years ago

cbo should use a 32x32px favicon instead of a 16x16px favicon (site icon)

Categories

(Camino Graveyard :: Product Site, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: phiw2, Assigned: ss)

Details

Attachments

(6 files)

This is fine by me, but I won't have time to make any web changes for at least a week. If Smokey gets to it, a=me. If not, I'll grab it as soon as I can.
(In reply to philippe from comment #0) > For the benefit of HiDPI devices (that is what e.g. apple does: > http://apple/com/favicon.ico) That URL is 404; http://www.apple.com/favicon.ico is 16x16 for me, though. > two test files: > http://dev.l-c-n.com/camino/favicon/test1.html > http://dev.l-c-n.com/camino/favicon/test2.html > > screenshot (seen on 10.6) > http://dev.l-c-n.com/camino/favicon/faviconscreenshot.png These both seem a lot thinner/lighter than our existing icon, such that they start to disappear into the tabs/location bar. Note also bug 310630, which might explain that rendering, and which makes me somewhat reluctant to switch. (This certainly explains the new, different-color daringfireball.net site icon I noticed in bug 530249 comment 9 earlier this month.)
Attached image screenshot on HiDPI
(In reply to Smokey Ardisson (not following bugs - do not email) from comment #2) > (In reply to philippe from comment #0) > > For the benefit of HiDPI devices (that is what e.g. apple does: > > http://apple/com/favicon.ico) > > That URL is 404; http://www.apple.com/favicon.ico is 16x16 for me, though. Er sorry about the typo. On 10.6/10.7 I 'see' a scaled 32px image. The favicon.ico actually contains 4 images (32x32 and 16x16 by two) > These both seem a lot thinner/lighter than our existing icon, such that they > start to disappear into the tabs/location bar. Note also bug 310630, which > might explain that rendering, and which makes me somewhat reluctant to > switch. Hmm, is not sure what is meant by thinner/lighter… Is it possible that the scaling works differently on 10.5 than 10.6 & 10.7 ? test 2 works pretty well here, and on the (attached) screenshot provided by skered on irc. Maybe I need to study how to create a multifile favicon.ico. Obviously providing multiple png files won't fly, given all the problems in bug 530249.
(In reply to philippe from comment #4) > Maybe I need to study how to create a multifile favicon.ico. Eh, Icon Composer can do it: http://dev.l-c-n.com/camino/favicon/test3.html (contains a slightly improved 32x32px image and the original 16x16px image)
(In reply to philippe from comment #4) > Er sorry about the typo. On 10.6/10.7 I 'see' a scaled 32px image. The > favicon.ico actually contains 4 images (32x32 and 16x16 by two) Ah, yeah, I forgot that Gecko only displays one random member. > Hmm, is not sure what is meant by thinner/lighter… FWIW, this is what I mean: http://www.ardisson.org/smokey/moz/cbo-siteicon/favicon-view-1.png http://www.ardisson.org/smokey/moz/cbo-siteicon/favicon-view-2.png > Is it possible that the scaling works differently on 10.5 than 10.6 & 10.7 ? Yeah, certainly possible. (In reply to philippe from comment #5) > Eh, Icon Composer can do it: > http://dev.l-c-n.com/camino/favicon/test3.html > (contains a slightly improved 32x32px image and the original 16x16px image) Assuming test3 looks good on HiDPI (meaning NSImage makes our selection code from bug 463725 do the right thing), then I'm ok with using the icon from test3.
Summary: Use a 32x32px favicon instead of a 16x16px favicon → cbo should use a 32x32px favicon instead of a 16x16px favicon (site icon)
Sadly, test3 doesn't look that good on HiDPI :-( (it looks great in Safari, though). I'll need to investigate further on how to make a multi-image favicon that looks good in Camino and Safari.
I'd be curious to see the output on apple.com, cnn.com (and perhaps test3, since it seems like the results are different from apple.com) in HiDPI mode; this is what we get from apple.com in normal mode: > Site icon rep info for http://www.apple.com/favicon.ico > initial bestRep: 0 NSBitmapImageRep 0x18d9ea10 Size={32, 32} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=32x32 Alpha=YES Planar=NO Format=2 > current rep: 1 NSBitmapImageRep 0x118ef150 Size={16, 16} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=16x16 Alpha=YES Planar=NO Format=2 > current bestRep: 1 NSBitmapImageRep 0x118ef150 Size={16, 16} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=16x16 Alpha=YES Planar=NO Format=2 > current rep: 2 NSBitmapImageRep 0x18d749b0 Size={32, 32} ColorSpace=NSCalibratedWhiteColorSpace BPS=8 BPP=16 Pixels=32x32 Alpha=YES Planar=NO Format=2 > current rep: 3 NSBitmapImageRep 0x18d9b930 Size={16, 16} ColorSpace=NSCalibratedWhiteColorSpace BPS=8 BPP=16 Pixels=16x16 Alpha=YES Planar=NO Format=2 > final bestRep: 1 NSBitmapImageRep 0x118ef150 Size={16, 16} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=32 Pixels=16x16 Alpha=YES Planar=NO Format=2 In this case, we end up using the second member (index 1), the 32-bit 16x16 
Attached file favicon logging
Logging for cnn.com, apple.com and dev.l-c-n.com/camino/favicon/test3.html High DPI mode on 10.7.4
So according to that logging, we should be seeing the (fuzzy/upscaled) 16x16 member for apple.com in HiDPI mode, and the logging is therefore claiming that our seeing the right thing … [02:23am] phiw2: When I put the apple icon on the bm bar, there is faint white edge, indicating that the 8bit icon is being used (??) We've only removed the two 32x32 members from the NSImage, so we've left both the 32-bit and 8-bit 16x16 members. NSImage should choose the one with the best bit depth, but it's possible that for some reason it's being indeterminate? Also, per bug 310630 comment 8, bug 310630 comment 9, bug 310630 comment 13, and bug 530249 comment 7, it looks like we're using different things to draw different places (History, Tabs, Location Bar, etc.) and they're clearly not all grabbing the same representation we're setting up in SiteIconProvider. Sadly, the fix for bug 463725 prevents us from having NSImage just do the right thing in HiDPI mode (which it would normally do in most cases); there's more analysis in bug 463725 comment 21, including an Apple-suggested simpler fix that does not really/completely work, but which, if it did, would let us dispense with hendy's code and let NSImage "just work" in HiDPI mode. Ugh, it's really, really late :-(
So, the right thing to do here is to land the "test3" site icon (which is the current 16x16 icon and a new 32x32 version that philippe has made), and fix Camino problems in Camino. There's no change in current behavior in Camino, but any other browser will now be able to take advantage of the 32x32 version where required, and then it'll start working correctly in Camino automatically when we fix Camino.
Attached patch cbo diffSplinter Review
Here are the changes to cbo (besides uploading the icon); they're live.
Attached patch cpo diffSplinter Review
Here are the cpo changes (also live; *should* be visible on next site rebuild).
Sam, I can't figure out where favicon.ico lives in cbo-wiki (it has a theoretical path of /favicon.ico, but that's behind both rewrites and MediaWiki's general setup, so I have no idea where the root of the wiki subdomain might be (it's not cbo-wiki!). find . -name *favico* doesn't find it, so really no clue. If you don't know where the wiki's web root might be, we can set $wgFavicon in LocalSettings[1] and put the new icon somewhere we know about (/images/, perhaps, alongside the logo image). [1] http://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_change_the_icon_in_the_browser.27s_address_line_.28favicon.29.3F So, this is done, except for the wiki.
(In reply to Smokey Ardisson (not following bugs - do not email) from comment #11) > Created attachment 636025 [details] > test3 site icon from philippe > > So, the right thing to do here is to land the "test3" site icon (which is > the current 16x16 icon and a new 32x32 version that philippe has made), and > fix Camino problems in Camino. I was planning to experiment further with that .ico file to have it display correctly in Camino (if Apple's work fine, there is no reason why Camino's shouldn't work), but I haven't gotten to that yet. But go ahead and put the that one above as a first step.
Success! The Gimp to the rescue. http://dev.l-c-n.com/camino/favicon/test4.html http://dev.l-c-n.com/camino/favicon/crispy-t4.png Favicon.ico with 4 images, 2x2 set. It is not yet perfect. On the BM bar, tab, and in the BM manager, the white matte is a bit jaggy in HiDPI mode. I want to see if I can improve the white matte by generating one myself instead of relying on Photoshop to create it. But everywhere the icon looks crisp. (or maybe the Gimp messed it up slightly, I haven't used it for a long while). For the record: http://egressive.com/tutorial/creating-a-multi-resolution-favicon-including-transparency-with-the-gimp
That's bizarre; I can't imagine what The Gimp can possibly be doing that makes it work, given the code in place in Camino. Hrm, actually, it doesn't work at all; the test4 icon is completely blank (all 4 members!) and shows nothing in the location bar, nor does Gecko show anything in the content area.
(GraphicConverter also reports that the favicon-t4.ico is broken, the format is unknown, or it is not a graphics file.)
::sigh:: It obviously works quite well on 10.7 and I checked on 10.6 and the favicon is there as it should. In both cases, Preview opens the .ico file and shows all 4 members. Photoshop (with the appropriate plugin) opens the individual members ok. FirefoxAurora sees it, but Opera 11.6x & 12 fails… (both on 10.7). Hmm, Transmit3 just hangs when trying to preview that favicon :-(. And Graphic Converter (8.1) doesn't like it indeed. Does http://dev.l-c-n.com/camino/favicon/test5.html work for you? That is basically the same favicon .ico file re-saved using Preview (ballooning file size - from 3.3kb to 11kb). Can Graphic Converter (re-)save a multi-image file as one file ? If yes, I didn't find it…
(In reply to philippe from comment #19) > Does http://dev.l-c-n.com/camino/favicon/test5.html work for you? Yes. > That is basically the same favicon .ico file re-saved using Preview > (ballooning file size - from 3.3kb to 11kb). Heh. > Can Graphic Converter (re-)save > a multi-image file as one file ? If yes, I didn't find it… No; I had to use ICOBundle to create the multi-member icons for the BBC bug test suite, and when I changed the one member to greyscale to test the greyscale theory, saving from GKON popped out three individual files. --- So I guess it's having the 8-bit members in the file (in addition to the 32-bit ones) is what is somehow making this "work" in HiDPI, despite our stripping out the >16px members?
(In reply to comment #20) > So I guess it's having the 8-bit members in the file (in addition to the > 32-bit ones) is what is somehow making this "work" in HiDPI, despite our > stripping out the >16px members? Given what we now know about the BBC site icon (bug 463725 comment 21 / bug 767661 comment 0), it doesn't surprise me that the 8-bit members are causing unexpected things to happen ;-) FWIW, gruber has recently written about how he made his site icon: http://daringfireball.net/2013/01/retina_favicons It's kind-of moot, though, until we fix bug 767661.
Given the current state of the Camino project, we won't be fixing these website bugs. Mass changing our Product Site bugs (search on "camino-website-bugs"). RESOLVED -> WONTFIX.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: