[Webkit-unassigned] [Bug 99725] image-set doesn't round-trip properly with cssText

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 19 09:20:55 PDT 2012


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





--- Comment #5 from Glenn Adams <glenn at skynav.com>  2012-10-19 09:21:51 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> Note also the extra ',' between the url and scale factor which makes the string not parse at all.

it looks like there is an error in the current syntax definition in css4-images:

<image-set> = image-set( [ <image-set-decl>, ]* [ <image-set-decl> | <color>] )
<image-set-decl> = [ <image> | <string> ] <resolution>

i suspect this should read

<image-set-decl> = ( <image> | <string> ) <resolution>

otherwise, an entry in an image set could be simply a resolution and nothing else

or if the spec intends that a resolution by itself is legal, e.g., as a shorthand for repeating the previous image-set-decl that does contain an <image>|<string> but with a different resolution, then it should say so (it doesn't)

if a bare <resolution> is permitted, then the output

url(foo), 1dppx, url(bar), 2dppx

wouldn't be illegal syntax, but certainly not what is expected given an input of

url(foo) 1dppx, url(bar) 2dppx

or its 'x' equivalent

> I assume that at a minimum, we can agree that it's always a bug whenever a string that comes out of cssText causes a parse error (i.e. is ignored) when written back to cssText.

that was previously my position as well; however, some recent input i have on different browser behavior in regards to the retention of original (but at least partially bad) input text in the case of specified (inline) styles has me wondering, and in need of some tests to convince myself that is the consensus among implementers

in any case, i concur that an input of

url(foo) 1dppx, url(bar) 2dppx

or

url(foo) 1x, url(bar) 2x (if this variant unit is supported)

should serialize as

url(foo) 1dppx, url(bar) 2dppx

[i prefer the standard unit to be used for serialization purposes]

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