Closed Bug 66190 Opened 24 years ago Closed 24 years ago

External style sheet with unrecognized charset is ignored

Categories

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

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: kazhik, Assigned: pierre)

References

Details

(Keywords: css2, Whiteboard: [fix in hand])

Attachments

(1 file)

If an external style sheet has an illegal charset setting, the rest of the file is ignored. Testcase: http://sites.netscape.net/ikazhik/bugzilla/test/20010122a.html Build: 2001012008/Win98
Netscape's standard compliance QA team reorganised itself once again, so taking remaining non-tables style bugs. Sorry about the spam. I tried to get this done directly at the database level, but apparently that is "not easy because of the shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
CSS2 Specification says "A CSS user agent that encounters an unrecognized at-rule must ignore the whole of the at-rule and continue parsing after it". http://www.w3.org/TR/REC-CSS2/syndata.html#at-rules
Keywords: css2
OS: Windows 98 → All
Hardware: PC → All
Marc, Daniel: please review
Severity: normal → major
Status: NEW → ASSIGNED
Keywords: review
Priority: -- → P2
Whiteboard: [fix in hand]
Target Milestone: --- → mozilla0.9.1
Attached patch patch (deleted) — Splinter Review
r=glazman, tested on win2k with provided testcase, but there is now a useless level of {..} nesting that should be removed at least for readability.
This fix should be checked in together with the patch that I'm going to attach to bug 63502.
Depends on: 63502
Do you really want to ignore ALL erroes from SetCharset? If so, please put a comment explaining why - Thanks. sr=attinasi
I considered the cases where the returned code would be something else than "charset not found", like "out of memory" or "i18n library not loaded", but the only purpose of SetCharset() is to initialize a member variable (nsString mCharset) to something else than "ISO-8859-1". The spec says that if the charset is not supported, we should continue the parsing with "ISO-8859-1". I interpreted the notion of "charset not supported" in its fullest extent.
Perfect - please put that comment in the code where the call is made and the return ignored so others will understand why.
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Summary: External style sheet is ignored → External style sheet with unrecognized charset is ignored
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: