We would like to extend user gestures for clients of asynchronous APIs to give them a chance to make requests before the user gesture is considered over. Create a new class in WebKit, WebUserGestureIndicator, that wraps WebCore::UserGestureIndicator.
Created attachment 109377 [details]
I still need to verify that this will be useful.
Comment on attachment 109377 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=109377&action=review
can you say more about how you will use this?
> +#define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, webcore_name) \
nit: we usually just put these in AssertMatchingEnums.cpp so that we only have to define this helper macro once. it also keeps the code here a bit cleaner.
Normally, the user gesture is processed while an input event is being reported through the callbacks. With our asynchronous APIs, a client's request won't be received until WebKit considers the user gesture to be over. We plan to use an ACK message to determine if the client made the request within the original user gesture. When such a request is then received, we use this wrapper to fake the user gesture so that WebKit will allow the request. It checks for a user gesture, for example, when there is a request for full screen on an element.
In short, this wrapper simply allows us to create a user gesture out of WebCore.
Created attachment 109421 [details]
*** This bug has been marked as a duplicate of bug 77690 ***
Comment on attachment 109421 [details]
Cleared review? from attachment 109421 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).