This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7495 - Invalid CSS Level 1 constructs are reported as syntax errors instead of warnings
Summary: Invalid CSS Level 1 constructs are reported as syntax errors instead of warnings
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: fd
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 08:27 UTC by fd
Modified: 2009-09-04 09:51 UTC (History)
0 users

See Also:


Attachments

Description fd 2009-09-04 08:27:26 UTC
The CSS Level 1 does not allow CSS selectors such as:
 E + F
 E > F

... but the forward-compatible parsing guidelines should be supported:
 http://www.w3.org/TR/REC-CSS1/#forward-compatible-parsing

... and these constructs should thus be ignored:
 [[ The selector-string consists of everything up to (but not including) the first left curly brace ({). A ruleset that starts with a selector-string that is not valid CSS1 is skipped. ]]

These syntax errors should rather be returned as warnings within the moki document and should not trigger CONTENT_FORMAT_SUPPORT-11:
 [[ If the Internet media type is "text/css" and the content is not valid CSS (see 2.4.9 Validity), FAIL ]]

This bug was introduced when the CSS validator was switched to its latest version (see bug 7203).
Comment 1 fd 2009-09-04 09:51:18 UTC
The latest version of the CSS parser returns such errors as InvalidParamException.

New code added to ignore these in CSSUtils.extractCSSErrors. They are now caught in CSSUtils.extractCSSWarnings and generate warnings in the moki document, as before.