RESOLVED FIXED 15640
REGRESSION (r17701): Favicons should be viewable as image documents
https://bugs.webkit.org/show_bug.cgi?id=15640
Summary REGRESSION (r17701): Favicons should be viewable as image documents
David Kilzer (:ddkilzer)
Reported 2007-10-23 04:49:57 PDT
* SUMMARY Viewing a favicon in WebKit (Safari) always causes the image to be downloaded. * STEPS TO REPRODUCE 1. Launch Safari/WebKit. 2. Open a URL to a favicon: http://webkit.org/favicon.ico * EXPECTED RESULTS The favicon should be rendered as an image document in the browser. * ACTUAL RESULTS The favicon is downloaded. * REGRESSION This is a regression from Safari 2.0.4 (419.3) with original WebKit on Mac OS X 10.4.10 (8R218). Tested with a local debug build of WebKit r26851 with Safari 3 Public Beta v. 3.0.3 (522.12.1) on Mac OS X 10.4.10 (8R218). * NOTES The official IANA-registered MIME type for these icons is image/vnd.microsoft.icon according to Wikipedia: http://en.wikipedia.org/wiki/ICO_(icon_image_file_format) The historical MIME type used was image/x-icon. We should probably support both.
Attachments
Patch v1 (19.99 KB, patch)
2007-10-28 21:11 PDT, David Kilzer (:ddkilzer)
darin: review+
David Kilzer (:ddkilzer)
Comment 1 2007-10-23 05:23:39 PDT
The bisect-builds script says: Works: r17700 Fails: r17701 I'm guessing that CoreGraphics (CG) on Tiger doesn't automatically include image/x-icon in its list of supported MIME types in initialiseSupportedImageMIMETypes() in WebCore/platform/MIMETypeRegistry.cpp.
David Kilzer (:ddkilzer)
Comment 2 2007-10-23 05:43:11 PDT
Can't view favicons in Safari for Windows either. Have not tested Leopard yet.
David Kilzer (:ddkilzer)
Comment 3 2007-10-28 06:28:50 PDT
Mac OS X 10.5 (9A581) adds these MIME types in WebCore::initialiseSupportedImageMIMETypes(): >>> Adding CG MIME Type: image/png >>> Adding CG MIME Type: image/jpeg >>> Adding CG MIME Type: image/gif >>> Adding CG MIME Type: image/jp2 >>> Adding CG MIME Type: image/tiff >>> Adding CG MIME Type: image/x-canon-crw >>> Adding CG MIME Type: image/vnd.adobe.photoshop >>> Adding CG MIME Type: application/pdf >>> Adding CG MIME Type: image/x-xbitmap >>> Adding CG MIME Type: image/pict >>> Adding CG MIME Type: image/targa >>> Adding CG MIME Type: image/sgi >>> Adding CG MIME Type: image/x-quicktime >>> Adding CG MIME Type: image/fpx
David Kilzer (:ddkilzer)
Comment 4 2007-10-28 10:40:50 PDT
Mac OS X 10.4.10 (8R218) adds these MIME types in WebCore::initialiseSupportedImageMIMETypes(): >>> Adding CG MIME Type: image/jpeg >>> Adding CG MIME Type: image/gif >>> Adding CG MIME Type: image/png >>> Adding CG MIME Type: image/jp2 >>> Adding CG MIME Type: image/tiff >>> Adding CG MIME Type: image/photoshop >>> Adding CG MIME Type: application/pdf >>> Adding CG MIME Type: image/targa >>> Adding CG MIME Type: image/sgi >>> Adding CG MIME Type: image/x-quicktime >>> Adding CG MIME Type: image/pict >>> Adding CG MIME Type: image/fpx >>> Adding CG MIME Type: image/x-quicktime
David Kilzer (:ddkilzer)
Comment 5 2007-10-28 21:11:02 PDT
Created attachment 16930 [details] Patch v1 Patch with ChangeLog and layout test. (In reply to comment #0) > * NOTES > The official IANA-registered MIME type for these icons is > image/vnd.microsoft.icon according to Wikipedia: > > http://en.wikipedia.org/wiki/ICO_(icon_image_file_format) > > The historical MIME type used was image/x-icon. We should probably support > both. Until we have evidence of real web sites returning favicon.ico files with a MIME type of image/vnd.microsoft.icon, I don't think it's necessary to add this type. $ curl --head http://www.microsoft.com/favicon.ico HTTP/1.1 200 OK Content-Length: 3638 Content-Type: image/x-icon Last-Modified: Wed, 11 Oct 2006 22:18:37 GMT Accept-Ranges: bytes ETag: "3a71c93283edc61:0" Server: Microsoft-IIS/7.0 P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI" X-Powered-By: ASP.NET Date: Mon, 29 Oct 2007 04:10:34 GMT
David Kilzer (:ddkilzer)
Comment 6 2007-10-28 21:12:06 PDT
Hixie, do you have any numbers on how many web sites return favicons with MIME type image/vnd.microsoft.icon?
Darin Adler
Comment 7 2007-10-28 22:48:30 PDT
Comment on attachment 16930 [details] Patch v1 r=me
David Kilzer (:ddkilzer)
Comment 8 2007-10-29 03:45:09 PDT
Committed r27223
Ian 'Hixie' Hickson
Comment 9 2007-10-29 13:18:39 PDT
I don't have any data, but, HTML5 suggests treating all image/* types as equivalent and using magic bytes to distinguish them.
Note You need to log in before you can comment on or make changes to this bug.