RESOLVED CONFIGURATION CHANGED Bug 14007
Unclosed CSS block causes incorrect handling of rest of stylesheet
https://bugs.webkit.org/show_bug.cgi?id=14007
Summary Unclosed CSS block causes incorrect handling of rest of stylesheet
Elliott Sprehn
Reported 2007-06-05 16:14:06 PDT
If a block is not closed and the rule following it is not a type selector then unclosed block and all rules until the end of the are ignored. Reproducible in Safari 2 and the latest nightly (Mon Jun 4 23:39:30 GMT 2007, 21970).
Attachments
Unclosed block followed by non-type selector. (462 bytes, text/html)
2007-06-05 16:17 PDT, Elliott Sprehn
no flags
Unclosed Block Followed By Type Selector (461 bytes, text/html)
2007-06-05 16:19 PDT, Elliott Sprehn
no flags
Elliott Sprehn
Comment 1 2007-06-05 16:17:52 PDT
Created attachment 14871 [details] Unclosed block followed by non-type selector. The text in the examples should be colored the same as the color for each word.
Elliott Sprehn
Comment 2 2007-06-05 16:19:41 PDT
Created attachment 14872 [details] Unclosed Block Followed By Type Selector Text should be colored the same as word specifies.
Elliott Sprehn
Comment 3 2007-06-05 16:25:47 PDT
Apparently the handling seems to differ based on if there's a type or non-type selector after the unclosed block. Both behaviors are wrong as per the spec and behavior of FireFox and IE. If there's a type selector Webkit ignores the entire rest of the sheet and the rules in the unclosed block. If there's no type selector Webkit closes the block at the next rule, ignores the that rule, but doesn't ignore the rest of the stylesheet or the rule that was missing the close brace. Behavior as per the spec and the what other browsers do is to make the whole rest of the sheet into "invalid rules" and ignore them, but to respect the rules in the unclosed block that happened before the next rule was encountered.
David Kilzer (:ddkilzer)
Comment 4 2007-06-05 17:00:49 PDT
Confirmed with a local debug build of WebKit r21976 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135). Both examples work in Firefox 2.0.0.4 and Opera 9.10.
Sam Weinig
Comment 5 2007-06-06 00:36:59 PDT
Is this the same bug as 12558?
Alexey Proskuryakov
Comment 6 2007-06-06 04:13:48 PDT
I'm not sure if this can be closed as a duplicate - but it's closely related for sure.
Alexey Proskuryakov
Comment 7 2008-11-28 14:01:28 PST
Bug 12558 is fixed now, but this is not.
Brent Fulgham
Comment 8 2022-07-07 12:32:06 PDT
Safari, Chrome, and Firefox produce the same output for both test cases. I don't believe any compatibility issues remain for this bug.
Note You need to log in before you can comment on or make changes to this bug.