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

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.

https://dvcs.w3.org/hg/csswg/rev/3c529183812b

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