W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2014

Re: [geometry] DOMRectList with legacy

From: Cameron McCormack <cam@mcc.id.au>
Date: Thu, 17 Jul 2014 22:57:19 +1000
Message-ID: <53C7C82F.5020305@mcc.id.au>
To: Dirk Schulze <dschulze@adobe.com>, Anne van Kesteren <annevk@annevk.nl>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, FX <public-fx@w3.org>, Boris Zbarsky <bzbarsky@MIT.EDU>
On 17/07/14 21:06, Dirk Schulze wrote:
>> On Thu, Jul 17, 2014 at 8:07 AM, Dirk Schulze <dschulze@adobe.com> wrote:
>>> I go with [ArrayClass] and will add the change to the spec soon. We can rename it to LegacyDOMRectList. A note about itís legacy state should definitely be added though.
>>
>> I'm still not convinced [ArrayClass] is a good idea if long term we
>> only want subclassing. Adding [ArrayClass] to a few legacy classes
>> does not help much. They should all have iterator support though. Not
>> exposing the interface still seems like a good idea as well as
>> renaming it to Legacy*.

What do we want for interfaces that expose lists of things -- both 
legacy interfaces, and new ones?  Is just the iterator enough?

I also thought we should try to get rid of [ArrayClass] on DOMRectList, 
but Boris seemed to want to keep it.  I'm not sure if that was motivated 
only by wanting the object to be iterable (which inheriting from 
Array.prototype will give you), or something else.

> As WebIDL, I suppose you mean
>
> [NoInterfaceObject]
> interface DOMRectList : Array {
>      getter DOMRect item(unsigned long index);
> };

If all we need is the iterator, then:

   [NoInterfaceObject]
   interface DOMRectList {
     getter DOMRect item(unsigned long index);
     iterator;
   };

and then some prose to define the iterator behaviour (which is harder 
than it should be currently -- 
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26183).

If we want a real subclassed Array, then some Web IDL changes are 
needed.  But I agree we probably don't want to bother for a legacy 
interface like this.
Received on Thursday, 17 July 2014 12:57:40 UTC

This archive was generated by hypermail 2.3.1 : Monday, 22 June 2015 03:33:52 UTC