W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: [CSS21] url() parsing

From: Alan Gresley <alan@css-class.com>
Date: Sat, 23 Apr 2011 21:44:59 +1000
Message-ID: <4DB2BBBB.4020903@css-class.com>
To: fantasai <fantasai.lists@inkedblade.net>
CC: "www-style@w3.org" <www-style@w3.org>
On 23/04/2011 5:03 PM, Alan Gresley wrote:
> On 23/04/2011 7:18 AM, fantasai wrote:
>> I believe this testcase
>> http://test.csswg.org/suites/css2.1/20110323/html4/uri-015.htm
>>
>> background: red U\r\4c ("support/swatch-green.png");
>>
>> is wrong according to the core grammar. But I'm not 100% sure...
>> Also, we have three passes on the testcase. Do we want the testcase
>> or the grammar to be right? (I think the grammar should be right
>> in this case, making this pass probably does more harm than good.)
>>
>> ~fantasai
>
>
> The pass condition is wrong, since there are no comma. WebKit drops the
> whole declaration for two reasons. First it does not allow escapes in
> 'url' and secondly it does not allow whitespace between the url and
> opening parenthesis 'url ('.
>
> I believe that it should fail because having a keyword 'url' with an
> optional whitespace before matching parenthesis does allow less value of
> such decelerations (possible additions to CSS).
>
> Something like this fails 'rgb (0,127,0)' but this parses 'rg\42
> (0,127,0)'.


http://css-class.com/test/css21testsuite/rgb-colors-escaped-030.htm

http://css-class.com/test/css21testsuite/rgb-colors-escaped-030.xht


The parsing rules are so loose an up for questioning that IE8 shows 
green lines for the first three test with rgb() but IE9 and IE10 preview 
shows red lines for all test. All other browsers show green lines. I 
have not tested nightlies.


I see no reason for IE9 and IE10 to pass your test but fail others that 
involves other keyword().


-- 
Alan Gresley
http://css-3d.org/
http://css-class.com/
Received on Saturday, 23 April 2011 11:45:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:39 GMT