WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
96295
window.Touch and TouchList should exist when touch events are enabled
https://bugs.webkit.org/show_bug.cgi?id=96295
Summary
window.Touch and TouchList should exist when touch events are enabled
Rick Byers
Reported
2012-09-10 11:23:18 PDT
W3C TouchEvent spec conformance tests (
http://w3c-test.org/webevents/tests/touch-events-v1/submissions/Mozilla/single-touch.html
) fail with: Interface names are correct. TouchList is not defined I.e., 'e instanceof TouchList' throws, even when e is in fact an instance of a TouchList. Maybe something wrong with the bindings here. Tested on ChromeOS and Android. I've also hear this fails on Nokia devices (qt port?)
Attachments
Patch
(1.62 KB, patch)
2012-11-21 20:49 PST
,
Rick Byers
no flags
Details
Formatted Diff
Diff
Patch
(7.66 KB, patch)
2012-11-22 12:57 PST
,
Rick Byers
no flags
Details
Formatted Diff
Diff
Diff against ToT for testing
(10.60 KB, patch)
2013-01-03 19:54 PST
,
Rick Byers
no flags
Details
Formatted Diff
Diff
Diff against bug 106071 for review
(14.29 KB, patch)
2013-01-03 19:56 PST
,
Rick Byers
no flags
Details
Formatted Diff
Diff
Patch for landing
(14.16 KB, patch)
2013-01-04 11:49 PST
,
Rick Byers
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Rick Byers
Comment 1
2012-11-21 20:49:45 PST
Created
attachment 175578
[details]
Patch
Adam Barth
Comment 2
2012-11-21 22:54:48 PST
Comment on
attachment 175578
[details]
Patch Looks fine, but we need a test. It should be very easy to test.
Rick Byers
Comment 3
2012-11-22 11:45:14 PST
(In reply to
comment #2
)
> (From update of
attachment 175578
[details]
) > Looks fine, but we need a test. It should be very easy to test.
Thanks! I intentionally didn't set r? yet because I still needed a test (just trying to find out which pattern to follow for this sort of test - was a little confused by the existing window property tests, wanted to see what failed in EWS due to the new member - apparently nothing!). I should have included 'no for review' in the patch description.
Rick Byers
Comment 4
2012-11-22 12:44:57 PST
Touch is also missing. TouchEvent exists.
Rick Byers
Comment 5
2012-11-22 12:57:52 PST
Created
attachment 175705
[details]
Patch
WebKit Review Bot
Comment 6
2012-11-22 23:45:26 PST
Comment on
attachment 175705
[details]
Patch Clearing flags on attachment: 175705 Committed
r135562
: <
http://trac.webkit.org/changeset/135562
>
WebKit Review Bot
Comment 7
2012-11-22 23:45:32 PST
All reviewed patches have been landed. Closing bug.
Rick Byers
Comment 8
2013-01-03 18:33:59 PST
I'm reverting this version (in
bug 106071
) as it broke a poorly written website's mobile device detection logic. Instead I think we should add these properties dynamically to temporarily mitigate the compat issue, exactly as we do for window.ontouchstart, etc.
Rick Byers
Comment 9
2013-01-03 19:54:27 PST
Created
attachment 181270
[details]
Diff against ToT for testing
Rick Byers
Comment 10
2013-01-03 19:56:05 PST
Created
attachment 181271
[details]
Diff against
bug 106071
for review
Rick Byers
Comment 11
2013-01-03 20:00:48 PST
This mostly just re-lands the original patch, except that I also mark all 3 touch event constructors (the 2 new ones, as well as window.TouchEvent) as V8EnabledAtRuntime. Rather than add 2 new runtime-enabled feature APIs, I consolodated them all under the single 'enableTouch' API. I tried to write a test that validates all these APIs are undefined when the runtime feature has been disabled, but it's not clear to me how to do it. Doing it in a LayoutTest via InternalSettings is too late - V8 has already created the window object, etc. I couldn't find any other example where this is tested (checked a few other V8EnabledAtRuntime features), and given the simplicity of the code I figure it's fine not to explicitly test that. Let me know if this is really worth trying to test explicitly.
Kentaro Hara
Comment 12
2013-01-04 09:44:33 PST
Comment on
attachment 181271
[details]
Diff against
bug 106071
for review LGTM
Rick Byers
Comment 13
2013-01-04 11:49:19 PST
Created
attachment 181351
[details]
Patch for landing
Rick Byers
Comment 14
2013-01-04 11:55:03 PST
Thanks!
WebKit Review Bot
Comment 15
2013-01-04 13:14:17 PST
Comment on
attachment 181351
[details]
Patch for landing Clearing flags on attachment: 181351 Committed
r138843
: <
http://trac.webkit.org/changeset/138843
>
WebKit Review Bot
Comment 16
2013-01-04 13:14:23 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug