Summary: | Strict DTD should always trigger strict mode, also when there is an internal subset | ||
---|---|---|---|
Product: | WebKit | Reporter: | Leif Halvard Silli <xn--mlform-iua> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | abarth, ahmad.saleem792, ap, bfulgham, cdumez, rniwa |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://www.xn--mlform-iua.no.no/html4-or-html5/ |
Description
Leif Halvard Silli
2010-02-17 10:25:10 PST
If we diverge from other browsers, then this is something to fix in WebKit. There is no indication that there are any actual Web pages affected, so downgrading priority. It's also not clear if there is any use for internal DTD subsets in HTML, other than fooling validity checkers into accepting invalid content. I don't understand why you refer to "validation" as "fooling". DIVERGING: I'll just make it clear that it is not only about "other browsers", but also about HTML5. HTML5 requires Standards Mode when there is a system identifier in the DOCTYPE. While Safari doesn't make any difference - regardless. PAGES AFFECTED versus the issue of Quirks/Standards mode: That QuirksMode is triggerd when it shouldn't, should have high priority: Suggest priority 2. There are indeed not that many affected pages, compared to the whole Web. And the effect of QuirksMode isn't easy to spot always, either, I think. HOWEVER, the very issue of Quirks/Standards triggering via the DOCTYPE is important. It is the only function that doctyps have in the HTML5 world. I assume that the current behaviour in Safari/Webkit is a result of adapting to HTML5 and thus that internal subsets did not trigger QuirksMode in Safari 3. Adapting to HTML5 should at least not lead to more doctypes than those HTML5 specify becoming Quirks triggers. USE OF INTERNAL DTD SUBSETS: According to Jukka Korpela internal DTD subests is a very useful approach - see after the last quotation in this message: http://www.w3.org/mid/AF25D023B0B34E1C97D8F44ABDE365F3@JukanPC It is not very fruitful to assume that private DTDs and internal DTD subsets can only be used to add useless, invalid stuff. An internal DTD subset can e.g. also be used to add a HTML5 feature - such as the time element - to a HTML4 document. I don't see how it would be meaningful to label such an effort as "fooling validity checkers into accepting invalid content". The HTML5 spec says that user agents should behave the same, regardless of possible doctypes/versioning. The exception being QuirksMode, for which HTML5 keeps a list of QuirksMode triggers. Nevertheless, whether internal DTD subsets are useful is not within the scope of HTML5, as HTML5 only defines what triggers QuirksMode and what triggers StandardsMode. But in the HTML4 world and in the XHTML worlds, internal subsets are by definition useful if one wants to use DTD based validation. Our behavior here now matches the HTML5 spec. We can add tests and close this bug. (In reply to comment #4) > Our behavior here now matches the HTML5 spec. We can add tests and close this bug. I agree that this bug is fixed. Should I make it "resolved"? Ideally we'd add some tests first. (In reply to comment #6) > Ideally we'd add some tests first. As in 'attach some files to this bug"? As in writing a LayoutTest: http://www.webkit.org/quality/testwriting.html WPT do have coverage of DOCTYPE: https://wpt.fyi/results/?label=master&label=experimental&aligned&view=subtest&q=doctype Do we need any more test? Or we can mark this as "RESOLVED LATER" or "RESOLVED WONTFIX" since WPT ensure compliance to web-standards and for DOCTYPE, all browsers pass all tests. Thanks! Yes, I think we can just rely on WPT to confirm proper behavior here. |