RESOLVED FIXED 32445
REGRESSION: http://www.mcafee.com/japan/ displays unstyled
https://bugs.webkit.org/show_bug.cgi?id=32445
Summary REGRESSION: http://www.mcafee.com/japan/ displays unstyled
Alexey Proskuryakov
Reported 2009-12-11 13:34:42 PST
http://www.mcafee.com/japan/ stylesheets are served with two Content-Type headers, which confuses WebKit: $ curl -I http://www.mcafee.com/japan/css2009/masthead.css HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Content-Type: text/html; charset=Shift_jis X-Powered-By: ASP.NET Date: Mon, 20 Jul 2009 00:54:00 GMT Content-Type: text/css Accept-Ranges: bytes Last-Modified: Tue, 03 Mar 2009 05:54:10 GMT ETag: "1bb93179c49bc91:e79" Content-Length: 1079 WebKit sees Content-Type as "text/html; charset=Shift_jis, text/css", which is not a proper CSS MIME type, so the stylesheet gets ignored in strict mode. Handling of HTTP headers is performed by closed source Apple libraries, but we can work around the issue for now.
Attachments
proposed fix (3.83 KB, patch)
2009-12-11 13:38 PST, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 2009-12-11 13:38:10 PST
Created attachment 44706 [details] proposed fix
Alexey Proskuryakov
Comment 2 2009-12-11 13:38:28 PST
WebKit Review Bot
Comment 3 2009-12-11 13:43:00 PST
style-queue ran check-webkit-style on attachment 44706 [details] without any errors.
David Levin
Comment 4 2009-12-11 13:56:30 PST
The brace on line 274 in WebCore/html/HTMLLinkElement.cpp should be inside the ifdef.
Darin Adler
Comment 5 2009-12-11 13:57:27 PST
Comment on attachment 44706 [details] proposed fix > + bool needsSiteSpecificQuirks = parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks(); The old code had the nice property that it would evaluate this only when strict mode was on. > + bool needsSiteSpecificQuirks = document()->page() && document()->page()->settings()->needsSiteSpecificQuirks(); Same here. Could we structure things so that is still true? r=me
Darin Adler
Comment 6 2009-12-11 13:58:01 PST
Comment on attachment 44706 [details] proposed fix > + if (url.contains("mcafee.com/japan/", false)) It's a little strange to do this as a substring check. But I can't think of anything better.
Alexey Proskuryakov
Comment 7 2009-12-11 14:12:30 PST
> The old code had the nice property that it would evaluate this only when strict > mode was on. I noticed that it was lost, but couldn't come up with a better idea. One constraint was that I wanted the new code to be easily removable once it's no longer needed. Also, I doubt that this is such hot code. Not landing this right away, maybe a fresh look will help. (In reply to comment #4) > The brace on line 274 in WebCore/html/HTMLLinkElement.cpp should be inside the > ifdef. Oops, thanks!
Alexey Proskuryakov
Comment 8 2009-12-11 17:12:39 PST
Committed <http://trac.webkit.org/changeset/52032> without re-arranging the code. I added a comment about the reason we use such a strange URL check to both places where we do now.
Note You need to log in before you can comment on or make changes to this bug.