[webkit-dev] Question on standards mode vs. site compatibility
Chris Evans
cevans at chromium.org
Mon Nov 2 23:19:46 PST 2009
Hi,
Whilst mining a large list of URLs, I came across some sites that render
incorrectly in WebKit but fine in IE.
It turns out there exist some sites which declare themselves standards
complaint in their HTML via their DTD. These sites then proceed to try and
load CSS resources with the incorrect MIME type. This promptly fails due to
standards mode.
e.g.
http://web.pcc.gov.tw/ uses application/x-pointplus
http://www.emart.co.kr/index.jsp uses application/css
http://www.fotocolombo.it/shop/index.php uses text-css (note the hyphen in
place of a slash)
application/octet stream also appears to be a favourite.
I saw this code in HTMLLinkElement::setCSSStyleSheet
// Check to see if we should enforce the MIME type of the CSS resource
in strict mode.
// Running in iWeb 2 is one example of where we don't want to -
<rdar://problem/6099748>
if (enforceMIMEType && document()->page() &&
!document()->page()->settings()->enforceCSSMIMETypeInStrictMode())
enforceMIMEType = false;
What is "enforceCSSMIMETypeInStrictMode()"? Is it a global setting or is
there some per-page metadata somewhere?
We can relax the MIME type list we enforce for "strict mode" without
breaking ACID3, although I'm not even sure that's desirable? Is it worth me
worrying about this at all or is the correct solution that these sites are
just broken and need to fix themselves at some stage? (Pragmatically, I
worry that these sites will never fix themselves so users of WebKit-based
browsers are SOL).
Cheers
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20091102/78f8bb83/attachment.html>
More information about the webkit-dev
mailing list