Bug 147509 - [iOS] use a media-specific user gesture check
Summary: [iOS] use a media-specific user gesture check
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
Keywords: InRadar
Depends on:
Reported: 2015-07-31 15:02 PDT by Eric Carlson
Modified: 2018-06-18 03:19 PDT (History)
1 user (show)

See Also:

Proposed patch. (5.11 KB, patch)
2015-07-31 15:31 PDT, Eric Carlson
jer.noble: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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().