Re: [Touch events] createTouchList should probably take a sequence, not an IDL array

I support changing the V1 spec to TouchList createTouchList (Touch touch,
...);
This matches the current WebKit implementation.

I didn't realize that the other form was missing from the other
implementations as well.  I've had
https://bugs.webkit.org/show_bug.cgi?id=97418 assigned to me to implement
the array from in WebKit, but like you say V1 is supposed to document the
pre-existing implementations.

We could change this in the V2 spec though, since it was probably really
the intention, right?  Since it will still be published as a note, fixing
spec bugs like this seems to make sense to me.

Rick

On Wed, Nov 28, 2012 at 9:36 PM, Sangwhan Moon <smoon@opera.com> wrote:

>
> On Nov 29, 2012, at 2:04 AM, Boris Zbarsky wrote:
>
> > On 11/28/12 11:03 AM, Arthur Barstow wrote:
> >> v1 is a CR now and we will soon start the interop testing to exit CR and
> >> move to PR.
> >
> > Yes.  I'm providing implementor feedback on the spec, like I'm supposed
> to in CR...
> >
> >> It seems like the proposed API change would affect implementations
> >
> > Actually, apart from black-box performance testing, it does not,
> precisely because the callee does not hold on to the list by reference.  It
> also doesn't affect them because there is nowhere to actually get a
> Touch[], so in practice callers will pass in a JS array, which will first
> get converted as if it were a sequence<Touch> anyway, then lead to creating
> an internal object to wrap the sequence, then will throw away that object
> at the end of the call.
> >
> > Specifically, see http://dev.w3.org/2006/webapi/WebIDL/#es-array the
> "An ECMAScript value V is converted to an IDL array value of type T[] as
> follows:" bit and note that the first bullet point is always skipped in
> current implementations.
>
> Thanks for pointing this out. Actually, in the scope of V1 it should have
> been:
>
> TouchList createTouchList (Touch touch, ...);
>
> ...as the goal for V1 is to aim for interoperability. Both Touch[] and
> sequence<Touch>
> are not interoperable, but your points make sense and if V2 was something
> that would
> have been published we would have went for that. (Sadly, that's not the
> case.)
>
> I'll need the group/chair to agree to the changes as it's a bit late in
> the stage though.
>
> --
> Sangwhan Moon, Opera Software ASA
>
>
>

Received on Friday, 30 November 2012 01:57:17 UTC