Bug 64164 - [WK2] Do not forward touch events to the web process when it does not need them
Summary: [WK2] Do not forward touch events to the web process when it does not need them
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-07-08 05:54 PDT by Benjamin Poulain
Modified: 2011-11-26 11:51 PST (History)
1 user (show)

See Also:


Attachments
Patch (10.05 KB, patch)
2011-07-08 06:33 PDT, Benjamin Poulain
kenneth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2011-07-08 05:54:25 PDT
WebCore already tell to the ChromeClient if touch events are needed or not through ChromeClient::needTouchEvent.

This is useful for skipping the event delivery entierely for better responsivness (the event being used directly for gesture without waiting for the webprocess to send them back).
We should use that in WebKit 2 as well..
Comment 1 Benjamin Poulain 2011-07-08 06:33:10 PDT
Created attachment 100113 [details]
Patch
Comment 2 Benjamin Poulain 2011-07-08 06:39:01 PDT
For reviewers:

I could have just queued a Vector<NativeWebTouchEvent>, and the first element of the vector would implicitely be the forwardedEvent.

I prefered to create a new structure instead to make the event handling more explicit. The memory space is not a big concern here given the size of the queue.
Comment 3 Kenneth Rohde Christiansen 2011-07-08 07:24:14 PDT
Comment on attachment 100113 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=100113&action=review

> Source/WebKit2/UIProcess/WebPageProxy.h:139
> +        :forwardedEvent(event)

missing space :-)
Comment 4 Benjamin Poulain 2011-07-08 07:43:36 PDT
Committed r90629: <http://trac.webkit.org/changeset/90629>