[Webkit-unassigned] [Bug 125637] New: Broken error recovery in @media at-rule

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 12 06:14:45 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=125637

           Summary: Broken error recovery in @media at-rule
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
               URL: www.wordpress.com
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: hodovanmartin at gmail.com


The @media rule is dropped if an opening curly bracket '{' is missing from any of its inner rules.
E.g. the background image of www.wordpress.com does not display, because of a malformed rule inside of the @media rule.

The minimized problem is:
@media {
.pic-d{background-image:url(http://wordpress.com/home.logged-out/images/pic-d.jpg?1)}
span background-image:url(http://wordpress.com/home.logged-out/images/automattic-white.png);}
}

The first subrule sets the background picture correctly, but since the opening '{' is missing from the second subrule, the whole line is considered to be a selector and the last two '}' brackets will be swallowed as well. And since the @media rule loses its closing '}', it will be dropped and ignored completely.
This error recovery got broken 3 months ago (r155536). The changeset contains a seemingly consistent restructuring by removing the selector_with_trailing_whitespace production and using its definition instead. However, it ruins the error recovery: instead of removing the whole selector_with_trailing_whitespace, it removes the last WHITESPACE only and keeps trying to find a selector.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list