RESOLVED FIXED 11939
Quirksmode: Ignores media types in stylesheet PIs
https://bugs.webkit.org/show_bug.cgi?id=11939
Summary Quirksmode: Ignores media types in stylesheet PIs
David Kilzer (:ddkilzer)
Reported Saturday, December 23, 2006 4:46:48 AM UTC
Safari ignores specified media types in stylesheet processing instructions. It loads all stylesheets instead. Reported on 27 September 2006. Test page: http://kennygraham.net/wsg_cssd/safaribug/ [BROKEN] Tested on locally-built debug build of WebKit r18399 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).
Attachments
Test case from Comment #2 (1.68 KB, application/x-gzip)
2007-11-15 08:53 PST, David Kilzer (:ddkilzer)
no flags
Moved from bug 18657 (5.07 KB, patch)
2008-04-27 00:15 PDT, Rob Buis
eric: review+
David Kilzer (:ddkilzer)
Comment 1 Wednesday, November 14, 2007 4:48:41 PM UTC
WebKit supports CSS3 media queries as of r14779. Safari 3 in Mac OS X 10.5 Leopard as well as the Safari 3 Public Beta in 10.4 Tiger both include this support. I believe that fixes this issue. http://trac.webkit.org/projects/webkit/changeset/14779
Philippe Wittenbergh
Comment 2 Thursday, November 15, 2007 12:03:47 PM UTC
No this is _not_ fixed. Here is a test case: http://dev.l-c-n.com/XHTML/test1-multistyle2.xhtml (the original test case is missing). Compare the rendering in WebKit/Safari 304 with what Gecko & Opera 9+ do. WebKit applies all stylesheets, inclucing the media print one. It shouldn't. Please reopen. (and note: WebKit seems to treat this file as being in quirks mode, while it should treat it as standards mode. It is served as application/xhtml+xml)
David Kilzer (:ddkilzer)
Comment 3 Thursday, November 15, 2007 4:47:56 PM UTC
Thanks for the test case, Philippe! Reopening bug.
David Kilzer (:ddkilzer)
Comment 4 Thursday, November 15, 2007 4:53:55 PM UTC
Created attachment 17295 [details] Test case from Comment #2 The bug is that the "alternate" and "media" attributes of <?xsl-stylesheet?> tags in an application/xhtml+xml document are ignored, and all stylesheets are loaded. If every stylesheet listed defines the same selectors, you get into a "last one loaded wins" situation (which is the case in this test case--try reordering the <?xsl-stylesheet?> tags). Here is another web site that demonstrates the same issue: http://www.reiermeister.de/
Maciej Stachowiak
Comment 5 Saturday, April 26, 2008 11:03:38 PM UTC
Might this be a duplicate of < https://bugs.webkit.org/show_bug.cgi?id=18657>?
Rob Buis
Comment 6 Sunday, April 27, 2008 8:13:05 AM UTC
*** Bug 18657 has been marked as a duplicate of this bug. ***
Rob Buis
Comment 7 Sunday, April 27, 2008 8:15:31 AM UTC
Created attachment 20847 [details] Moved from bug 18657 This patch is moved from bug 18657, that is clearly a duplicate and this one is older:) It fixes the attached testcase to this one, unfortunately the original bug testcase in quirksmode site seems gone. Cheers, Rob.
Eric Seidel (no email)
Comment 8 Tuesday, April 29, 2008 7:14:51 AM UTC
Comment on attachment 20847 [details] Moved from bug 18657 Great! r=me. However, I would prefer that you fix setMedia to take a PassRefPtr while you're in that code. It takes a raw ptr, but does take ownership of it (so your code doesn't leak) but at first glance it looks like it does. setMedia pre-dates PassRefPtr I think.
Rob Buis
Comment 9 Wednesday, April 30, 2008 7:21:44 AM UTC
Landed in r32719, including the PassRefPtr tweak.
Note You need to log in before you can comment on or make changes to this bug.