Re: Feedback on TouchEvent and DocumentTouch

On 09/21/2011 02:25 PM, Anne van Kesteren wrote:
>> In our telcon this week, we decided to keep the initTouchEvent method
>> in the v1 spec. In the v2 spec we will remove initTouchEvent and add a
>> DOM4-style constructor to replace it.
>>
>> Our reason for keeping this method in version 1 is that it is already
>> interoperably implemented, and we expect to need it in tests. Removing
>> it would not allow us to finalize Touch Events v1 as a Recommendation
>> with a full test suite as quickly as we want to.
>
> 1) In your earlier email you indicated it was not implemented consistently.

That's correct. The method is implemented one way in WebKit (which does 
not match the spec) and one way in Gecko (which does match the spec). 
I'm not sure of its status in IE or Opera.  They might implement it the 
same as WebKit.

This WebKit bug has a patch to change WebKit to match the W3C spec.  If 
the patch is not accepted, then we could instead change the spec to 
match WebKit instead (and Gecko will follow suit):
https://bugs.webkit.org/show_bug.cgi?id=60612

> 2) It seems rather hard to remove if you have a test suite that requires
> it.

Yes, if we go this route then the test suite for v2 would need to be 
updated along with the spec to use constructors instead.  But since all 
user-agents would need to implement initTouchEvent anyway to conform 
with the v1 spec and its tests, it would be hard to remove in practice.

> 3) Having a feature just for a test suite is a *very* poor reason for
> having the feature. Also, you can test non-synthetic touch events
> perfectly fine without initTouchEvent().

I agree with this, and argued this point in our latest call.  In that 
call we made a new proposal:

* Remove initTouchEvent from the v1 spec.  This means that the v1 spec 
will not include any way for content to initialize touch events, and it 
will not be possible to write fully-automated tests for it.  (Manual 
tests like the ones we have now will still work.)

* Add a touch event constructor to the v2 spec.  This will make it 
possible for content to initialize touch events and will make it 
possible to write automated tests.

The rationale for the proposal includes Anne's points in this thread, as 
well as resolution of ISSUE-19 and ISSUE-20 previously raised in this 
group.  If we adopt it, we'll need to go back to Last Call and publish a 
new LCWD.

Does anyone on the list have any objections to this proposal?

Received on Wednesday, 28 September 2011 23:17:08 UTC