Bug 147509

Summary: [iOS] use a media-specific user gesture check
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
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
Description Flags
Proposed patch. jer.noble: review+

Description Eric Carlson 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.
Comment 1 Eric Carlson 2015-07-31 15:03:02 PDT
Comment 2 Eric Carlson 2015-07-31 15:31:40 PDT
Created attachment 257969 [details]
Proposed patch.
Comment 3 Eric Carlson 2015-07-31 16:00:05 PDT
Committed r187688: https://trac.webkit.org/r187688
Comment 4 Eric Carlson 2015-07-31 17:09:55 PDT
Plus r187694: https://trac.webkit.org/r187694
Comment 5 Frédéric Wang (:fredw) 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().