[Bug 12824] This doesn't say how to serialize non-zero alpha values: how many digits should be used? The correct answer is the minimum number necessary so that the resulting string evaluates to the same floating-point number as you started with.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12824

--- Comment #4 from Boris Zbarsky <bzbarsky@mit.edu> 2011-05-31 15:58:36 UTC ---
> setting and then reading back strokeStyle or fillStyle will give you a
> different number of digits in different UAs for the alpha, depending on how
> much internal precision they have.

Yep.  And if you required the same number of digits, then you could still
detect the limited internal precision.

If you're asking whether the fact that alpha is stored as an integer in the
range 0-255 should be standardized, the answer is "maybe".  Right now the way
floats are converted to such integers is not the same across UAs either, last I
checked...  Standardizing makes some sense, but we need to be careful to not
overconstrain future implementations that may want to allow a wider range of
alpha values, assuming anyone would want that.  Worth a mailing list thread.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 31 May 2011 15:58:46 UTC