[Webkit-unassigned] [Bug 8132] New: CSS parser sometimes accepts real number as integer

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Sat Apr 1 19:06:04 PST 2006


           Summary: CSS parser sometimes accepts real number as integer
           Product: WebKit
           Version: 416.x
          Platform: Macintosh
               URL: http://www.gtalbot.org/BrowserBugsSection/Opera9Bugs/RGB
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: browserbugs at gtalbot.org

rgb(int, int, float) is accepted by the CSS parser when it should trigger an
error and subsequent error condition.


"The format of an RGB value in the functional notation is 'rgb(' followed by a
comma-separated list of three numerical values (either three *_integer_* values
or three percentage values) followed by ')'." 
CSS 2.1, Section 4.3.6 Colors

"An <integer> consists of one or more digits "0" to "9". A <number> can either
be an <integer>, or it can be zero or more digits followed by a dot (.)
followed by one or more digits." 
CSS 2.1, Section 4.3.1 Integers and real numbers

"illegal values, or values with illegal parts, are treated as if the
declaration weren't there at all" 
CSS1 Forward compatibility

So, an integer, according to CSS 2.1, clearly excludes the presence of a dot
(.), therefore 
selector {color: rgb(0, 0, 128.0);}
should trigger a CSS parsing error and the whole declaration should be dropped,
ignored. This is what the testcase at provided URL tests.

Safari 2.02 (41613) fails the second line of the testcase at provided URL: the
2nd line is blue and not green.

Another good testpage is:

I searched for a duplicate and couldn't find one.

Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list