Enable consumable user gestures for WebKit2 ports
Created attachment 197398 [details] Patch
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 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
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
Created attachment 197627 [details] Patch
I guess we should ask on webkit-dev whether the other ports want this enabled or have the new tests skipped.
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.
(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.
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.