Bug 17081

Summary: Safari should be more forgiving with CSS syntax errors.
Product: WebKit Reporter: Anantha Keesara <anantha>
Component: EvangelismAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Trivial CC: jensimmons, webkit
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://galerie.3suisses.fr/voyages/week_end.php
Attachments:
Description Flags
screenshot
none
Reduction
none
Reduction none

Description Anantha Keesara 2008-01-29 15:05:02 PST
I. Steps:
1. Go to: http://galerie.3suisses.fr/voyages/week_end.php

II. Issue:
Notice that the "weekend" menu on left has an extra "weekend" text overlapped.

III. Expected:
Overlapped text should not be there. 

IV. Other browsers:
Only IE doesn't display overlapped text. All other browsers have this issue.

V. Nightly tested: r29807
Comment 1 Anantha Keesara 2008-01-29 15:06:47 PST
Created attachment 18777 [details]
screenshot
Comment 2 Anantha Keesara 2008-01-29 15:58:18 PST
Created attachment 18778 [details]
Reduction
Comment 3 Anantha Keesara 2008-01-29 15:58:18 PST
Created attachment 18779 [details]
Reduction
Comment 4 Darin Adler 2008-05-24 22:28:43 PDT
It's not obvious that we should change our CSS parsing to match IE rather than the specification and the other browsers. It's not uncommon to find a site that depends on an IE bug, and we don't *always* choose to match IE.
Comment 5 Robert Blaut 2008-06-11 06:21:10 PDT
The described behavior is absolutely correct in other than IE browsers according to CSS 2.1 spec: 

"The selector (see also the section on selectors) consists of everything up to (but not including) the first left curly brace ({). A selector always goes together with a declaration block. When a user agent can't parse the selector (i.e., it is not valid CSS 2.1), it must ignore the declaration block as well.

CSS 2.1 gives a special meaning to the comma (,) in selectors. However, since it is not known if the comma may acquire other meanings in future updates of CSS, the whole statement should be ignored if there is an error anywhere in the selector, even though the rest of the selector may look reasonable in CSS 2.1." [http://www.w3.org/TR/CSS21/syndata.html#rule-sets]

So the described issue is an evangelism bug. Additionally it's worth to say tha IE8 renders attached test case like Safari, Firefox.