Bug 156546

Summary: [iOS] remote command should be considered user events
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch.
none
Updated patch none

Description Eric Carlson 2016-04-13 10:39:36 PDT
Remote control commands are always triggered by a user gesture.
Comment 1 Eric Carlson 2016-04-13 10:40:35 PDT
<rdar://problem/25560877>
Comment 2 Eric Carlson 2016-04-13 11:03:33 PDT
Created attachment 276335 [details]
Proposed patch.
Comment 3 Jer Noble 2016-04-13 12:08:38 PDT
Comment on attachment 276335 [details]
Proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=276335&action=review

> Source/WebCore/html/HTMLMediaElement.cpp:6649
>      LOG(Media, "HTMLMediaElement::didReceiveRemoteControlCommand(%p) - %i", this, static_cast<int>(command));
>  
> +    ++m_processingRemoteControlCommand;
> +

It seems much simpler to add the following here instead:

UserGestureIndicator remoteControlUserGesture(DefinitelyProcessingUserGesture);

This will tell the ScriptController that a user gesture is present, so all of the below should be unnecessary.
Comment 4 Eric Carlson 2016-04-13 14:00:11 PDT
Created attachment 276349 [details]
Updated patch
Comment 5 WebKit Commit Bot 2016-04-13 15:09:35 PDT
Comment on attachment 276349 [details]
Updated patch

Clearing flags on attachment: 276349

Committed r199515: <http://trac.webkit.org/changeset/199515>
Comment 6 WebKit Commit Bot 2016-04-13 15:09:39 PDT
All reviewed patches have been landed.  Closing bug.