Bug 32114 - Multitouch DOM event
Summary: Multitouch DOM event
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 32485
  Show dependency treegraph
 
Reported: 2009-12-03 04:04 PST by Jonni Rainisto
Modified: 2009-12-27 19:25 PST (History)
19 users (show)

See Also:


Attachments
Platform touch event (4.12 KB, patch)
2009-12-03 04:04 PST, Jonni Rainisto
no flags Details | Formatted Diff | Diff
touch12-touch-dom-event (15.28 KB, patch)
2009-12-03 04:05 PST, Jonni Rainisto
no flags Details | Formatted Diff | Diff
touch13-qtimplementation (14.50 KB, patch)
2009-12-03 04:06 PST, Jonni Rainisto
no flags Details | Formatted Diff | Diff
touch12-touch-dom-event (32.44 KB, patch)
2009-12-03 05:50 PST, Jonni Rainisto
no flags Details | Formatted Diff | Diff
Added interfaces for touch event support in JavaScript. (42.58 KB, patch)
2009-12-09 14:55 PST, Simon Hausmann
no flags Details | Formatted Diff | Diff
https://bugs.webkit.org/show_bug.cgi?id=32114 (23.99 KB, patch)
2009-12-09 14:55 PST, Simon Hausmann
no flags Details | Formatted Diff | Diff
https://bugs.webkit.org/show_bug.cgi?id=32114 (23.99 KB, patch)
2009-12-09 14:57 PST, Simon Hausmann
koivisto: review+
Details | Formatted Diff | Diff
Patch (11.68 KB, patch)
2009-12-11 04:58 PST, Simon Hausmann
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonni Rainisto 2009-12-03 04:04:01 PST
Created attachment 44226 [details]
Platform touch event

Platform independent touch events with refence implementation to Qt4.6 backend. Documentation to IDL file can be found here http://www.starlight-webkit.org/documentation/multitouch

Working pre-compiled binaries for testing the multitouch dom events with supported Windows 7 hardware can be found here: http://www.opensource.nokia.com/Starlight

Layout test, manipulate and gesture engine patches will be added soon to this bug or followup bug report.

Patches have been divided in smaller chunks, so they can be reviewed better. Patches need to be applied in right order, 1 + 12 + 13.
Comment 1 Jonni Rainisto 2009-12-03 04:05:18 PST
Created attachment 44227 [details]
touch12-touch-dom-event
Comment 2 Jonni Rainisto 2009-12-03 04:06:37 PST
Created attachment 44228 [details]
touch13-qtimplementation
Comment 3 WebKit Review Bot 2009-12-03 04:08:32 PST
style-queue ran check-webkit-style on attachment 44226 [details] without any errors.
Comment 4 WebKit Review Bot 2009-12-03 04:08:51 PST
style-queue ran check-webkit-style on attachment 44228 [details] without any errors.
Comment 5 WebKit Review Bot 2009-12-03 04:09:10 PST
style-queue ran check-webkit-style on attachment 44227 [details] without any errors.
Comment 6 Kenneth Rohde Christiansen 2009-12-03 04:49:12 PST
Comment on attachment 44226 [details]
Platform touch event


> +    bool areStates(PlatformTouchState state) const

I found this method a bit strange. areStates? I guess it is meant for knowing whether all points are in the same state?

What about something more descriptive like allTouchPointsAreInState() or allHasState()?

> +    bool hasState(PlatformTouchState state) const

someHasState()?

Maybe combine the two methods and use an enum to separate them?

> +    PlatformTouchMoved,
> +    PlatformTouchStationary

Stationary means that it didn't change ? or ?


> +    float pressure() const;

is this in percentage?

> +    IntRect rect() const;

is this the boundingRect?
Comment 7 Kenneth Rohde Christiansen 2009-12-03 04:53:22 PST
Comment on attachment 44228 [details]
touch13-qtimplementation


> +#if PLATFORM(QT)
> +    // Qt implementation of touch point
> +    QTouchEvent::TouchPoint m_touchPoint;
> +#endif

That is a kind of useless comment :-)

Btw, you miss an implementation for QGraphicsWebView it seems.
Comment 8 Jonni Rainisto 2009-12-03 05:50:20 PST
Created attachment 44234 [details]
touch12-touch-dom-event

fix to original patch which was missing some files.
Comment 9 WebKit Review Bot 2009-12-03 05:52:26 PST
style-queue ran check-webkit-style on attachment 44234 [details] without any errors.
Comment 10 Simon Hausmann 2009-12-03 07:25:38 PST
From what I can see, there are three versions of WebKit out there on devices today that support handling touch events with Javascript: The version of WebKit that comes with the iPhone, the version that comes with Android (2.0/eclair in particular) and the version that Palm ships in WebOS.

As far as I can see they are basically compatible with each other, but neither implementation is upstream here on webkit.org.

However there is web content out there today that relies on these interfaces, and given the popularity of these platforms I'm inclined to say that these interfaces have become a de-facto standard.

I believe touch interfaces for inclusion in webkit.org should be compatible (identical?) to this "standard".
Comment 11 Simon Hausmann 2009-12-03 07:27:11 PST
A slightly more Qt implementation specific comment: The touch event interface in Qt (QTouchEvent) is based on the concept that one event provides information of all the touch points.

It appears that the aforementioned existing JS interface for touch interaction use the same model, therefore making the mapping from QTouchEvent to the JS interface a really simple translation of data structures.
Comment 12 Simon Hausmann 2009-12-09 14:55:18 PST
Created attachment 44570 [details]
Added interfaces for touch event support in JavaScript.
Comment 15 WebKit Review Bot 2009-12-09 14:59:10 PST
style-queue ran check-webkit-style on attachment 44570 [details] without any errors.
Comment 16 Antti Koivisto 2009-12-11 02:25:16 PST
Comment on attachment 44570 [details]
Added interfaces for touch event support in JavaScript.

Looks good, r=me
Comment 17 Simon Hausmann 2009-12-11 04:58:10 PST
Created attachment 44676 [details]
Patch
Comment 18 Simon Hausmann 2009-12-11 04:58:51 PST
Comment on attachment 44572 [details]
https://bugs.webkit.org/show_bug.cgi?id=32114

Obsoleted by new patch that has a merge conflict with the mac/Skipped file fixed
Comment 19 WebKit Review Bot 2009-12-11 05:01:04 PST
style-queue ran check-webkit-style on attachment 44676 [details] without any errors.
Comment 20 WebKit Commit Bot 2009-12-11 06:08:05 PST
Comment on attachment 44570 [details]
Added interfaces for touch event support in JavaScript.

Clearing flags on attachment: 44570

Committed r51981: <http://trac.webkit.org/changeset/51981>
Comment 21 WebKit Commit Bot 2009-12-11 06:15:53 PST
Comment on attachment 44676 [details]
Patch

Clearing flags on attachment: 44676

Committed r51982: <http://trac.webkit.org/changeset/51982>
Comment 22 WebKit Commit Bot 2009-12-11 06:16:04 PST
All reviewed patches have been landed.  Closing bug.