This should not change the behavior of user gestures unless a platform chooses to use the new feature. The basic concept would be to introduce a count of consumable gestures which is incremented each time a gesture indicator is created and decremented when it falls out of scope. Currently, once a gesture is in scope any number of actions which require a gesture can be performed. With consumable gestures a platform could choose to consume a gesture for certain actions (navigations in new windows being a notable example).
Created attachment 160274 [details] Patch
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment on attachment 160274 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=160274&action=review > Source/WebCore/ChangeLog:12 > + Adds a static counter of the number of consumable gestures. This is decremented either when > + a gestures falls out of scope or is consumed via a call to consumeUserGesture(). > + > + No new tests as this should not change behavior. The platform must implement consumable > + gestures for this to do anything. Can you add more information about what you plan to use this for? > Source/WebCore/bindings/v8/ScriptController.cpp:197 > +bool ScriptController::consumeUserGesture() > +{ > + return UserGestureIndicator::consumeUserGesture(); > +} We can probably skip this function. It's not really adding any value. I want to get rid of ScriptController::processingUserGesture at some point too.
Created attachment 160287 [details] Patch
Comment on attachment 160274 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=160274&action=review >> Source/WebCore/ChangeLog:12 >> + gestures for this to do anything. > > Can you add more information about what you plan to use this for? Added planned usage >> Source/WebCore/bindings/v8/ScriptController.cpp:197 >> +} > > We can probably skip this function. It's not really adding any value. I want to get rid of ScriptController::processingUserGesture at some point too. I agree. I was copying the convention set by processingUserGesture()
Comment on attachment 160287 [details] Patch This seems worth experimenting with.
Comment on attachment 160287 [details] Patch Rejecting attachment 160287 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: Kit/chromium/third_party/yasm/source/patched-yasm --revision 134927 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' 50>At revision 134927. ________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' ________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' Updating webkit projects from gyp files... Full output: http://queues.webkit.org/results/13594028
The following ChangeLog files contain OOPS: trunk/Source/WebKit/chromium/ChangeLog Please don't ever say "OOPS" in a ChangeLog file.
Created attachment 160459 [details] Patch
Comment on attachment 160459 [details] Patch Clearing flags on attachment: 160459 Committed r126609: <http://trac.webkit.org/changeset/126609>
All reviewed patches have been landed. Closing bug.