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

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.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*

Received on Friday, 27 September 2013 22:09:03 UTC