RESOLVED FIXED 18355
rgb() or rgba() values should be only accepted when all integers or all percentages.
https://bugs.webkit.org/show_bug.cgi?id=18355
Summary rgb() or rgba() values should be only accepted when all integers or all perce...
Robert Blaut
Reported 2008-04-07 23:44:20 PDT
CSS3 Color Module specification says: "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 ')'." and "The format of an RGBA value in the functional notation is 'rgba(' followed by a comma-separated list of three numerical values (either three integer values or three percentage values), followed by an <alphavalue>, followed by ')'." Mixing of integers with percentages is disallowed. Two tests from css3-color Conformance Test Suite: http://www.w3.org/Style/CSS/Test/CSS3/Color/20070927/ check these cases: http://www.w3.org/Style/CSS/Test/CSS3/Color/20070927/html4/t040202-rgba-func-no-mixed-f.htm http://www.w3.org/Style/CSS/Test/CSS3/Color/20070927/html4/t040201-rgb-func-no-mixed-f.htm
Attachments
no mixed rgb() values (923 bytes, text/html)
2008-04-07 23:45 PDT, Robert Blaut
no flags
no mixed rgba() values (974 bytes, text/html)
2008-04-07 23:46 PDT, Robert Blaut
no flags
patch (37.55 KB, patch)
2008-04-29 08:47 PDT, Anatoli Papirovski
darin: review+
patch for svg test case (1.65 KB, patch)
2008-04-29 15:03 PDT, Anatoli Papirovski
mitz: review+
Robert Blaut
Comment 1 2008-04-07 23:45:39 PDT
Created attachment 20398 [details] no mixed rgb() values
Robert Blaut
Comment 2 2008-04-07 23:46:04 PDT
Created attachment 20399 [details] no mixed rgba() values
Anatoli Papirovski
Comment 3 2008-04-29 08:47:19 PDT
Created attachment 20889 [details] patch This is valid both per css 2.1 and css 3 spec, as far as I can tell. Also, this is a duplicate of bug 18588.
Anatoli Papirovski
Comment 4 2008-04-29 08:48:20 PDT
Actually, meant to say that 18588 is a duplicate of this one.
Darin Adler
Comment 5 2008-04-29 09:19:15 PDT
Comment on attachment 20889 [details] patch Looks good to me. r=me
Darin Adler
Comment 6 2008-04-29 09:19:27 PDT
*** Bug 18588 has been marked as a duplicate of this bug. ***
mitz
Comment 7 2008-04-29 09:56:07 PDT
Anatoli Papirovski
Comment 8 2008-04-29 15:03:16 PDT
Created attachment 20893 [details] patch for svg test case Forgot to modify one of the test cases and its results...
mitz
Comment 9 2008-04-29 16:00:25 PDT
Comment on attachment 20893 [details] patch for svg test case I should have caught this before landing. r=me
Note You need to log in before you can comment on or make changes to this bug.