[Webkit-unassigned] [Bug 98905] New: CSS Error Handling does not handle malformed statement properly.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 10 07:56:38 PDT 2012


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

           Summary: CSS Error Handling  does not handle malformed
                    statement properly.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: pravind.2k4 at gmail.com


According to 
http://www.w3.org/TR/CSS21/syndata.html#parsing-errors
Spec: Malformed statements. User agents must handle unexpected tokens encountered while parsing a statement by reading until the end of the statement, while observing the rules for matching pairs of (), [], {}, "", and '', and correctly handling escapes.

And 

http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#parsed-as-a-css-color-value
Spec: user agents are required to close all open constructs upon finding the end of a style sheet unexpectedly. Thus, when parsing the string "rgb(0,0,0" (with a missing close-parenthesis) for a color value, the close parenthesis is implied by this error handling rule, and a value is obtained (the color 'black'). However, the similar construct "rgb(0,0," (with both a missing parenthesis and a missing "blue" value) cannot be parsed, as closing the open construct does not result in a viable value.

On Webkit

<style>
p {
    background-color:rgb(255,0,0
};
</style>
<p>
This space must have RED background color.
</p>

When the style for <p> is examined using inspector,
the <p>'s style is changed to

background-color: rgb(255,0,0 };

However the css error handling code must have 1st matched/closed the "()" and then  "{}".

-- 
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