Bug 114379 - Enable consumable user gestures for WebKit2 and Mac/Win ports
Summary: Enable consumable user gestures for WebKit2 and Mac/Win ports
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: jochen
URL:
Keywords:
Depends on: 118247
Blocks: 114021
  Show dependency treegraph
 
Reported: 2013-04-10 13:42 PDT by jochen
Modified: 2013-07-01 13:00 PDT (History)
3 users (show)

See Also:


Attachments
Patch (17.47 KB, patch)
2013-04-10 13:44 PDT, jochen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion (680.24 KB, application/zip)
2013-04-10 21:53 PDT, Build Bot
no flags Details
Patch (20.72 KB, patch)
2013-04-11 09:38 PDT, jochen
beidson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jochen 2013-04-10 13:42:42 PDT
Enable consumable user gestures for WebKit2 ports
Comment 1 jochen 2013-04-10 13:44:50 PDT
Created attachment 197398 [details]
Patch
Comment 2 jochen 2013-04-10 13:46:27 PDT
I guess this will fail to compile on all but mac-wk2, but I first need to symbol names to add UserGestureIndicator::consumeUserGesture to all the export lists
Comment 3 Build Bot 2013-04-10 21:53:13 PDT
Comment on attachment 197398 [details]
Patch

Attachment 197398 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17590107

New failing tests:
fast/events/popup-forwarded-gesture-blocked.html
fast/events/popup-allowed-from-gesture-only-once-iframes.html
fast/events/popup-allowed-from-gesture-only-once-two-events.html
fast/events/popup-allowed-from-gesture-only-once.html
Comment 4 Build Bot 2013-04-10 21:53:14 PDT
Created attachment 197503 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.2
Comment 5 jochen 2013-04-11 09:38:31 PDT
Created attachment 197627 [details]
Patch
Comment 6 jochen 2013-04-11 09:39:56 PDT
I guess we should ask on webkit-dev whether the other ports want this enabled or have the new tests skipped.
Comment 7 Brady Eidson 2013-04-12 13:42:26 PDT
Comment on attachment 197627 [details]
Patch

From the email thread on webkit-dev:

"There are some gotchas: e.g. if your port is using out of process plugins, and the plugin wants to react to a user gesture, you're probably storing whether WebKit is processing a user gesture before calling out to the plugin, and restore a UserGestureIndicator once the plugin replies. To make sure a plugin cannot use this to generate additional user gestures (after the original user gesture was already consumed), you should store the UserGestureIndicator::currentToken() and use that to create the UserGestureIndicator (it's basically a ref-counted integer of how many gestures are left to consume)."

If this patch is known to break out-of-process plugins, then this patch is known to break "must not break" ports.
Comment 8 jochen 2013-04-12 13:59:54 PDT
(In reply to comment #7)
> (From update of attachment 197627 [details])
> From the email thread on webkit-dev:
> 
> "There are some gotchas: e.g. if your port is using out of process plugins, and the plugin wants to react to a user gesture, you're probably storing whether WebKit is processing a user gesture before calling out to the plugin, and restore a UserGestureIndicator once the plugin replies. To make sure a plugin cannot use this to generate additional user gestures (after the original user gesture was already consumed), you should store the UserGestureIndicator::currentToken() and use that to create the UserGestureIndicator (it's basically a ref-counted integer of how many gestures are left to consume)."
> 
> If this patch is known to break out-of-process plugins, then this patch is known to break "must not break" ports.

I guess that paragraph was unclear: it does not break the port, it just doesn't fix all the ways a website could work around the check.
Comment 9 jochen 2013-07-01 13:00:34 PDT
As discussed on IRC, the concept of consumable user gestures doesn't quite match what seems desirable for current ports, so I'm closing this bug.