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


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.

Greetings
Dirk

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 Saturday, 28 September 2013 11:19:37 UTC