W3C home > Mailing lists > Public > www-style@w3.org > September 2013

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

From: Dirk Schulze <dschulze@adobe.com>
Date: Fri, 20 Sep 2013 12:42:35 -0700
To: Simon Pieters <simonp@opera.com>
CC: "robert@ocallahan.org" <robert@ocallahan.org>, www-style <www-style@w3.org>
Message-ID: <773CA010-8B01-49B3-91AC-41EECC7B0571@adobe.com>
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.

Greetings,
Dirk


> 
>> 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

This archive was generated by hypermail 2.3.1 : Friday, 20 September 2013 19:43:16 UTC