Bug 148835
| Summary: | [XHTML] Style written inside HTML comment should not be not applied | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | dino, koivisto, rniwa, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Chris Dumez
Style written inside HTML comment should not be not applied:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="match" href="html_style_in_comment-ref.html"/>
<style type="text/css">
h4 {color: green}
<!--
h4 {color: red}
-->
</style>
</head>
<body>
<p> This page tests that Style written inside HTML comment is not applied</p>
This test passes if the text below is <b>Green. NOT Red.</b>
<h4>
This is some text.
</h4>
</body>
</html>
This causes the following newly imported W3C ref-test to fail:
http/tests/w3c/html/semantics/document-metadata/the-style-element/html_style_in_comment.html
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/22585912>
Chris Dumez
https://wiki.whatwg.org/wiki/HTML_vs._XHTML#Element-specific_parsing has some information about this.
Chris Dumez
The problem simply was the the file extension should have been .xhtml, not .html.