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

See Also:


Attachments
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
rdar://problem/22015509
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().