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

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

From: Simon Pieters <simonp@opera.com>
Date: Wed, 25 Sep 2013 14:00:07 +0200
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "Simon Fraser" <smfr@me.com>, "Dirk Schulze" <dschulze@adobe.com>, "www-style list" <www-style@w3.org>
Message-ID: <op.w3yuahy8idj3kv@simons-macbook-pro.local>
On Tue, 24 Sep 2013 23:41:46 +0200, Simon Pieters <simonp@opera.com> wrote:

> On Tue, 24 Sep 2013 23:36:37 +0200, Robert O'Callahan  
> <robert@ocallahan.org> wrote:
>
>> 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".
>
> The simplest thing is to keep all readonly. :-)
>
> If we're making things mutable for convenience, I think it's reasonable  
> to allow width/height to be set too, and just have them update bottom  
> and right.

Done.

https://dvcs.w3.org/hg/csswg/rev/1787351b91d0

The details here might change based on what comes out of  
http://lists.w3.org/Archives/Public/www-style/2013Sep/0616.html


On Wed, 25 Sep 2013 00:14:37 +0200, Henrik Andersson  
<henke@henke37.cjb.net> wrote:

> If left and right are mutable then the width must change if either is
> changed.
>
> I say that if left change then right remains the same and the same
> flipped. It is the width that changes.

That's what I've specced.

> If you want to set the left position without editing the width (the
> right position changes instead) then use a property called x.

On Wed, 25 Sep 2013 01:35:08 +0200, Robert O'Callahan  
<robert@ocallahan.org> wrote:

> I don't think we should have "left" and "x" properties that behave
> differently! That is very confusing!

On Mon, 23 Sep 2013 20:34:04 +0200, Dirk Schulze <dschulze@adobe.com>  
wrote:

>> I think it should be easy for authors to move a DOMRect by assigning to  
>> its origin, for example.
>
> You mean setting the origin? Yes, it probably should be. (As long CSOM  
> allows them to be mutable.)

What's the use case for moving a DOMRect?

Currently if you want to move a DOMRect you have to set both left/right or  
left/width, and similarly in the other axis.

-- 
Simon Pieters
Opera Software
Received on Wednesday, 25 September 2013 12:00:43 UTC

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