[cssom] Serializing non-opaque colors, background-position keywords

Hello!

Josh Matthews contributed some CSSOM serialization tests for  
web-platform-tests which uncovered some issues:

https://critic.hoppipolla.co.uk/r/3307
http://w3c-test.org/submissions/1427/cssom/serialize-values.html (remove  
submissions/1427/ if this 404s)

The CSSOM spec needs work in general around serialization, so these aren't  
questions of "what does the spec say now?" but rather "what do we want the  
spec to say?".

== Non-opaque colors ==

How should color: rgba(5, 7, 10, 0.9) be serialized? Gecko round-trips  
alpha as 0.9 but Blink makes it 0.901961. I think Gecko faithfully  
round-trips two decimals for colors. Should we specify Gecko's behavior of  
rounding to a "nicer" number?

Similarly for 'opacity' (although that is represented with higher  
precision I think).

== background-position keywords ==

How should background-position: 0% top be serialized? For element.style,  
Gecko round-trips keywords, Blink converts to percentages. For  
getComputedStyle, both convert to percentages. I think the spec for  
background-position says keywords compute to percentages.

-- 
Simon Pieters
Opera Software

Received on Wednesday, 28 January 2015 10:10:41 UTC