Bug 148835 - [XHTML] Style written inside HTML comment should not be not applied
Summary: [XHTML] Style written inside HTML comment should not be not applied
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-09-04 15:35 PDT by Chris Dumez
Modified: 2015-09-07 21:37 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-09-04 15:35:19 PDT
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
Comment 1 Radar WebKit Bug Importer 2015-09-04 15:35:57 PDT
<rdar://problem/22585912>
Comment 2 Chris Dumez 2015-09-04 16:04:00 PDT
https://wiki.whatwg.org/wiki/HTML_vs._XHTML#Element-specific_parsing has some information about this.
Comment 3 Chris Dumez 2015-09-07 21:37:19 PDT
The problem simply was the the file extension should have been .xhtml, not .html.