Closed Bug 2775 Opened 26 years ago Closed 26 years ago

The CSS @import construct really is incorrectly parsed.

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ian, Assigned: peterl-retired)

References

()

Details

Quoted uri is an @import test suite from the import test (test, ah, 52). NGLayout fails all tests except the control, which is odd. However, I cannot find anything wrong with the test (although, I'll admit, that is no guarentee that it is correct!).
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Actually, we parsed the @import just fine. There was an assignment operator bug in nsAutoString that was mangling the sheet URLs on this page. Go figure.
Status: RESOLVED → REOPENED
Priority: P2 → P3
Hardware: Other → PC
Summary: CSS @import construct incorrectly parsed. → The CSS @import construct really is incorrectly parsed.
Actually, you are still getting errors on this page. The first is that you are not ignoring the ivalid @import rule: @import url(..) ,screen; ...which is invalid because the first "medium" is missing and it is required by CSS2 grammar, and so entire rule is invalid, and so the rule should be ignored. The should also result in the following being ignored totally: @import url(..) screen,,all; ...since in the middle there you have a missing medium again, which is invalid. See CSS2 Grammar (section D). The second problem is that you are cutting off after the first whitespace character and comparing that -- while that is correct for HTML, it is not for CSS. The following: @import url(..) all and tv; ...is invalid because the medium (all) is followed by two additional IDENTs, which the grammar does not expect (they should be separated by commas ",", and whitespace cannot appear in an identifier). So once again, the entire rule (from "@IDENT" to ";") should be ignored.
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
Oops. Premature resolution (I hate when that happens). It's really fixed now.
Status: RESOLVED → VERIFIED
It sure is. Ok, all that remains now is @media, and you've passed the ImportTest! Again! :-)
You need to log in before you can comment on or make changes to this bug.