Bug 156546 - [iOS] remote command should be considered user events
Summary: [iOS] remote command should be considered user events
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-13 10:39 PDT by Eric Carlson
Modified: 2016-04-13 15:09 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch. (9.62 KB, patch)
2016-04-13 11:03 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Updated patch (4.95 KB, patch)
2016-04-13 14:00 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff

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