Re: [cssom] draft of color serialization rules

On 10/2/12 12:02 PM, Glenn Adams wrote:
>     It would be interesting to know what current implementations do.  As
>     a start, Gecko parses into an internal representation (for colors,
>     an RGBA 32-bit integer or a string color name (canonicalized?) for
>     named colors) and completely forgets the original string.
> agreed; i'll prepare some tests for this

Note that the question I asked may not be black-box testible.

For example, the following implementation strategies cannot be 
differentiated based on black-box testing:

1)  Always store the string, have no other internal representation
     at all.
2)  Always store the string, eagerly parse to internal representation
     alongside the string.
3)  Always store the string, lazily parse to internal representation
     alongside the string when used internally.
4)  As #3 but discard the internal representation when it's not used
     for a while.

and neither are these two:

I)  Eagerly parse to internal representation, discard string.
II) Lazily parse to internal representation when used internally
     or specified style is queried.  Discard string when parsing.


Received on Tuesday, 2 October 2012 16:11:20 UTC