Bug 33894 - Touch Events are not sent to iframes
Summary: Touch Events are not sent to iframes
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ben Murdoch
Depends on:
Blocks: 32485
  Show dependency treegraph
Reported: 2010-01-20 04:18 PST by Ben Murdoch
Modified: 2010-01-20 20:23 PST (History)
3 users (show)

See Also:

Proposed patch and test case. (5.61 KB, patch)
2010-01-20 06:01 PST, Ben Murdoch
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Murdoch 2010-01-20 04:18:54 PST
Touch events dispatched from the platform layer are sent to the main frame's event handler. However if the main frame does not use touch events but an embedded iframe does, the event is not propagated to the iframe. This is because we bail out early in EventHandler::handleTouchEvent if the frame's document has not registered for touch events. As it is the document inside the iframe and not the document on the main frame that has registered for the events, we bail out. We should instead check if the document that the target element belongs to has registered for touch events after the hit detection has taken place, as the hit detection descends into iframes.

Patch and test case to follow.
Comment 1 Ben Murdoch 2010-01-20 06:01:33 PST
Created attachment 47014 [details]
Proposed patch and test case.
Comment 2 WebKit Commit Bot 2010-01-20 20:23:17 PST
Comment on attachment 47014 [details]
Proposed patch and test case.

Clearing flags on attachment: 47014

Committed r53597: <http://trac.webkit.org/changeset/53597>
Comment 3 WebKit Commit Bot 2010-01-20 20:23:22 PST
All reviewed patches have been landed.  Closing bug.