W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

Re: [matrix][cssom-view] DOMPoint, DOMPointLiteral definitions

From: Simon Pieters <simonp@opera.com>
Date: Tue, 01 Oct 2013 21:11:52 +0200
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: www-style <www-style@w3.org>, "Boris Zbarsky" <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <op.w4ah92rzidj3kv@simons-macbook-pro.local>
On Tue, 01 Oct 2013 13:43:25 +0200, Simon Pieters <simonp@opera.com> wrote:

> On Mon, 30 Sep 2013 19:56:23 +0200, Robert O'Callahan  
> <robert@ocallahan.org> wrote:
>> On Tue, Oct 1, 2013 at 4:02 AM, Simon Pieters <simonp@opera.com> wrote:
>>> Do we need to differentiate between live/read-only and immutable at  
>>> all?
>> In theory it could be useful for some clients to know when an object is
>> immutable, because it means they can avoid copying it.
>> Currently we don't need DOMRectImmutable because AFAIK we don't have
>> anything that would return an immutable rect. So we can avoid  
>> specifying it
>> for now, and just specify DOMRect and DOMRectMutable.
> That's what the spec has right now, but it calls them DOMRectReadOnly  
> and DOMRect (since the mutable one has a constructor, it's nicer for it  
> to have a short name).
> The two interfaces now have their top/right/bottom/left attributes  
> identical. We could move them to a common interface, like DOMRectBase or  
> AbstractDOMRect.

I have moved them to a common interface annotated with [NoInterfaceObject]  
and let DOMRect and DOMRectReadOnly implement it.


This approach is used by the DOM spec in similar situations.

In the JS binding, this is equivalent to what the spec had before.

Simon Pieters
Opera Software
Received on Tuesday, 1 October 2013 19:12:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC