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: Wed, 25 Sep 2013 09:36:37 +1200
Message-ID: <CAOp6jLaVa2r3SCH32HBbSem27Cws67+4g5C3beZUDRsrcjTMow@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Simon Fraser <smfr@me.com>, Dirk Schulze <dschulze@adobe.com>, www-style list <www-style@w3.org>
On Wed, Sep 25, 2013 at 3:06 AM, Simon Pieters <simonp@opera.com> wrote:

> If we want the members of DOMRect to be mutable but only if it's not
> associated with a DOMQuad's .bounds, that can be specced by having those
> members check for the association and throw on setting in that case.
>

We can do that. That's how SVG animated value objects work. I'm not a great
fan of it, since it means DOMRect's attributes can all throw, which is
confusing in the situations where you have a mutable DOMRect. But it's OK I
guess.

If we're making DOMRect mutable we have to decide what happens when its
members are modified, since there are options. For example, when "width" is
modified one of "left" and "right" must also change, and we have to specify
which one, or else specify that "width" is actually readonly.

I think the simplest thing to specify is that "right" and "bottom" are
readonly and the other attributes are mutable and mutating them affects
"right"/"bottom".

Is it sane to allow modification of a DOMRect that was returned by e.g.
> getBoundingClientRect()?


Yes.

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 Tuesday, 24 September 2013 21:37:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:34 UTC