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

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

From: Simon Pieters <simonp@opera.com>
Date: Mon, 30 Sep 2013 17:02:29 +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
Message-ID: <op.w38b2f2hidj3kv@simons-macbook-pro.local>
On Sat, 28 Sep 2013 00:08:35 +0200, Robert O'Callahan  
<robert@ocallahan.org> wrote:

> On Sat, Sep 28, 2013 at 10:07 AM, Robert O'Callahan  
> <robert@ocallahan.org>wrote:
>> -- DOMRect is the base interface for both immutable and mutable rects.  
>> It
>> defines "current x/y/width/height" state and can expose methods that use
>> that state. Other APIs can take DOMRects and be defined in terms of the
>> current state. It allows read-only access to the current state and does  
>> not
>> offer any mutation APIs.
>> -- DOMRectImmutable extends DOMRect and adds the invariant that the  
>> state
>> never changes. It probably doesn't need to add any new API. (However,  
>> being
>> immutable is potentially meaningful to clients, because it allows them  
>> to
>> avoid copying, so testing whether a rect is immutable could have value.)
>> -- DOMRectMutable extends DOMRect and adds APIs to mutate the rect.
> BTW if we take this approach then a "live rect" that's not immutable but
> can't be changed by the client is exactly DOMRect.

Do we need to differentiate between live/read-only and immutable at all?

Simon Pieters
Opera Software
Received on Monday, 30 September 2013 15:03:05 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC