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

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

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 28 Sep 2013 04:18:42 -0700
To: "robert@ocallahan.org" <robert@ocallahan.org>
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>
Message-ID: <231A45B5-EFF9-40E9-AC9A-84A8D38807A4@adobe.com>

On Sep 28, 2013, at 12:53 PM, "Robert O'Callahan" <robert@ocallahan.org<mailto:robert@ocallahan.org>> wrote:

On Sat, Sep 28, 2013 at 5:31 PM, Dirk Schulze <dschulze@adobe.com<mailto: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.

In SVG we would have a need for all of the interfaces to be mutable or immutable: DOMMatrix, DOMPoint, DOMRect - just not DOMQuad yet. Probably SVG will never have one for the latter since we try not to extend the SVG DOM. But fixing SVG DOM where possible is still a good use case.


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 11:19:37 UTC

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