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

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Sat, 28 Sep 2013 22:53:14 +1200
Message-ID: <CAOp6jLbpLC5eSHxmkJ7xvPpyX2_DtkFbFC6L-xZG9rZFTwKqJQ@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: Simon Pieters <simonp@opera.com>, www-style <www-style@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Sat, Sep 28, 2013 at 5:31 PM, Dirk Schulze <dschulze@adobe.com> wrote:

> You could also just introduce DOMRectImmutable and DOMRectMutable and a
> typedef (DOMRectMutable or DOMRectImmutable) DOMRect;

That's probably more work than what I proposed. Also, DOMQuad.bounds can't
be this kind of DOMRect; the rect returned by DOMQuad.bounds is not
immutable (it can be changed by modifying the points of DOMQuad), but it's
also not a DOMRectMutable (since Web authors can't be allowed to set its
members). So this approach is inadequate.

To be honest I still wish we could avoid duplicating every interface. So
> far we have DOMPoint, DOMRect, DOMQuad, DOMMatrix and ever single interface
> needs to have a mutable and immutable interface. Each new proposed
> interface will always actually introduce two. I wish we could move more of
> magic into WebIDL. Sounds like we can't for this kind of magic.

We only need to introduce mutable vs not mutable versions of interfaces
where there are clear needs. Right now we only have a clear need in the
case of DOMRect.

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 Saturday, 28 September 2013 10:53:45 UTC

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