Bug 17532 - HTML5 spec violation: Webkit imports styles from <link> element which doesn't have rel=stylesheet defined
Summary: HTML5 spec violation: Webkit imports styles from <link> element which doesn't...
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.filmweb.pl/Bracia+Coen+zwy...
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2008-02-25 04:33 PST by Robert Blaut
Modified: 2008-03-02 22:19 PST (History)
0 users

See Also:


Attachments
minimal test case (474 bytes, text/html)
2008-02-25 04:34 PST, Robert Blaut
no flags Details
test case for all of combination rel="stylesheet" vs. text/css (867 bytes, text/html)
2008-02-25 06:37 PST, Robert Blaut
no flags Details
proposed patch (4.29 KB, patch)
2008-02-25 15:28 PST, Robert Blaut
hyatt: review-
Details | Formatted Diff | Diff
updated patch (5.78 KB, patch)
2008-02-25 16:32 PST, Robert Blaut
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Blaut 2008-02-25 04:33:14 PST
HTML5 spec says: "The type of link indicated (the relationship) is given by the value of the rel attribute, which must be present, and must have a value that is a set of space-separated tokens. [...] If the rel attribute is absent, or if the value used is not allowed according to the definitions in this specification, then the element does not define a link." [http://www.whatwg.org/specs/web-apps/current-work/#link]

Webkit doesn't honor this regulation and imports styles from such defined links:

<link type="text/css" href="style.css" /> This violation causes broken rendering of a one of the top Polish sites fimweb.pl.

Test case attached.
Comment 1 Robert Blaut 2008-02-25 04:34:20 PST
Created attachment 19343 [details]
minimal test case
Comment 2 Robert Blaut 2008-02-25 04:36:03 PST
Gecko and Presto engines honor above mentioned regulation.
Comment 3 Robert Blaut 2008-02-25 04:57:11 PST
<rdar://problem/5762891>
Comment 4 Robert Blaut 2008-02-25 06:37:30 PST
Created attachment 19347 [details]
test case for all of combination rel="stylesheet" vs. text/css
Comment 5 Robert Blaut 2008-02-25 15:28:08 PST
Created attachment 19359 [details]
proposed patch

This patch matches Webkit behavior to Firefox and Opera.

These two existing tests should be updated to match the new re=stylesheet requirements:

fast/media/mq-simple-query-02.html
fast/media/mq-width-absolute-02.html
Comment 6 Dave Hyatt 2008-02-25 15:32:28 PST
Comment on attachment 19359 [details]
proposed patch

I need to see how you changed the existing tests.  Just want to make sure you are patching them to still load the same set of stylesheets they did before.
Comment 7 Robert Blaut 2008-02-25 15:39:49 PST
(In reply to comment #6)
> (From update of attachment 19359 [details] [edit])
> I need to see how you changed the existing tests.  Just want to make sure you
> are patching them to still load the same set of stylesheets they did before.
> 

Dave, I only informed that these two tests should be updated. The proposed patch only  contains the new layout test. These two tests updates are omitted in the patch.
Comment 8 Robert Blaut 2008-02-25 16:32:23 PST
Created attachment 19362 [details]
updated patch

Updated patch to reflect David's expectations.
Comment 9 Darin Adler 2008-02-29 10:09:07 PST
Comment on attachment 19362 [details]
updated patch

+</html>
\ No newline at end of file

New tests should have newlines at the end of the file.

r=me
Comment 10 Mark Rowe (bdash) 2008-02-29 14:11:44 PST
Landed in r30673.