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: Tue, 24 Sep 2013 17:06:29 +0200
To: "Robert O'Callahan" <robert@ocallahan.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Simon Fraser" <smfr@me.com>, "Dirk Schulze" <dschulze@adobe.com>, "www-style list" <www-style@w3.org>
Message-ID: <op.w3w783k1idj3kv@simons-macbook-pro.local>
On Tue, 24 Sep 2013 01:14:53 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> On Mon, Sep 23, 2013 at 3:45 PM, Robert O'Callahan  
> <robert@ocallahan.org> wrote:
>> On Tue, Sep 24, 2013 at 10:30 AM, Simon Fraser <smfr@me.com> wrote:
>>> On Sep 23, 2013, at 3:24 PM, Robert O'Callahan <robert@ocallahan.org>
>>> wrote:
>>>
>>> On Tue, Sep 24, 2013 at 6:34 AM, Dirk Schulze <dschulze@adobe.com>  
>>> wrote:
>>>>
>>>> On Sep 23, 2013, at 8:28 PM, Simon Fraser <smfr@me.com> wrote:
>>>> > Also, why are the members of DOMPoint (and DOMRect/DOMQuad)  
>>>> readonly?
>>>> > Do they have to be?
>>>>
>>>> They are not. (As long as I am not missing something.)
>>>
>>>
>>> Hmm. This creates a problem: what does it mean to set
>>> top/left/bottom/right of DOMQuad.bounds?
>>>
>>>
>>> The bounds property itself should be readonly.
>>
>>
>> That doesn't help.
>
> Yeah, that just means you can't replace the .bounds property with
> another object.
>
> WebIDL makes it remarkably fiddly to create an interface that should
> be readonly in some circumstances and mutable in others.

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.

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

-- 
Simon Pieters
Opera Software
Received on Tuesday, 24 September 2013 15:07:04 UTC

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