Bug 147509

Summary: [iOS] use a media-specific user gesture check
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: fred.wang
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186593
Attachments:
Description Flags
Proposed patch. jer.noble: review+

Eric Carlson
Reported 2015-07-31 15:02:23 PDT
ScriptController::processingUserGesture now only returns true for an event handler triggered by a touch end. This is correct in most contexts, and we should have probably done this from the beginning, but it breaks some existing scripts that try to trigger media loading or playback in a touch start handler, so add a media-specific method that allows touch start or touch end events.
Attachments
Proposed patch. (5.11 KB, patch)
2015-07-31 15:31 PDT, Eric Carlson
jer.noble: review+
Eric Carlson
Comment 1 2015-07-31 15:03:02 PDT
Eric Carlson
Comment 2 2015-07-31 15:31:40 PDT
Created attachment 257969 [details] Proposed patch.
Eric Carlson
Comment 3 2015-07-31 16:00:05 PDT
Eric Carlson
Comment 4 2015-07-31 17:09:55 PDT
Frédéric Wang (:fredw)
Comment 5 2018-06-18 03:19:08 PDT
Where is ProcessingPotentialUserGesture actually used? For someone just reading WebKit's code, it's not obvious why UserGestureIndicator.h actually needs to define ProcessingPotentialUserGesture and processingUserGestureForMedia().
Note You need to log in before you can comment on or make changes to this bug.