[cssom-view][matrix] Unrestricted doubles for DOMMatrix, DOMPoint, DOMQuad (was Re: [cssom-view] More getBoxQuads/convert*FromNode issues)

This is merging a discussion about the same topic on a different thread.

On Sep 20, 2013, at 11:58 AM, Simon Pieters <simonp@opera.com> wrote:

> On Fri, 20 Sep 2013 08:54:33 +0200, Dirk Schulze <dschulze@adobe.com>  
> wrote:
>>> Smaller issues: Should DOMPoint/DOMRect/DOMQuad constructors/attributes  
>>> allow unrestricted doubles? I think probably not.
>> To support unrestricted double was an explicit request for DOMMatrix  
>> from some implementers.
> Can you elaborate on this? Why was it requested?

The argumentation on public-fx for Matrix at the time was that you can get NaN values for the matrix items anyway by certain operations. The solution was to avoid operations that could result in NaN, but this is neither what browsers do, nor was their positive feedback. You would need to fail silently or throw an exception. Both was not acceptable for people on the discussion.

To DOMPoint. You can have transformations on DOMPoint. If DOMMatrix has a NaN item, then the DOMPoint as a result of a transformation is not valid either. So even if you do not permit unrestricted values, you may not be able to guarantee that generated DOMPoints are valid. Unless you do one of the silent fails or throw exceptions.


>> I don't really like it, but don't we want to be consistent across all  
>> geometric objects?
> -- 
> Simon Pieters
> Opera Software

Received on Friday, 20 September 2013 19:43:16 UTC