W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [cssom] draft of color serialization rules

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 02 Oct 2012 12:10:45 -0400
Message-ID: <506B1205.4040000@mit.edu>
To: Glenn Adams <glenn@skynav.com>
CC: www-style@w3.org
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.

-Boris
Received on Tuesday, 2 October 2012 16:11:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT