RESOLVED INVALID13236
REGRESSION: Parsing of malformed CSS color shorthand properties results in invalid colors
https://bugs.webkit.org/show_bug.cgi?id=13236
Summary REGRESSION: Parsing of malformed CSS color shorthand properties results in in...
Donald C. Kirker
Reported 2007-03-30 15:07:44 PDT
The attribute bgcolor="black''''" (seen in the body tag at http://webkit.wapuniverse.com/example.html) will result in a putrid green-yellow background instead of the black background seen in the release (and all nightlies before and including r13648). Other malformed color attributes (such as bgcolor="black-------") result in "bad" colors too. This also applies to <font color="... and is assumed to apply to all CSS color properties. It is possible that these might be the results of the changes in r13673 (http://trac.webkit.org/projects/webkit/changeset/13673).
Attachments
Darin Adler
Comment 1 2007-03-30 23:59:10 PDT
The code that does this is in StyledElement::addCSSColor.
Darin Adler
Comment 2 2007-03-31 00:01:15 PDT
(In reply to comment #0) > This also applies to <font color="... and is assumed to apply to all CSS color properties. It does not apply to CSS color properties. It only applies to element attributes that are implemented by mapping to CSS color properties.
Alexey Proskuryakov
Comment 3 2007-03-31 00:21:26 PDT
WinIE 6 and 7 give the same result. I suggest closing this as WONTFIX or INVALID. From addCSSColor(): // we're emulating IEs color parser here. It maps transparent to black, otherwise it tries to build a rgb value // out of everyhting you put in. The algorithm is experimentally determined, but seems to work for all test cases I have.
Alexey Proskuryakov
Comment 4 2007-03-31 04:59:45 PDT
Some more experimenting: with "<!DOCTYPE HTML>" or "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">" added to the test, Firefox and Opera give four different results (different shades of green, different parts of the page colorized). WinIE appears to be consistent in all modes, and so does WebKit.
Note You need to log in before you can comment on or make changes to this bug.