Bug 143486

Summary: Add a setting & restriction which prevents non-interactive playback of audible media elements.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing
none
Patch for landing commit-queue: commit-queue-

Description Jer Noble 2015-04-07 10:43:51 PDT
Add a setting & restriction which prevents non-interactivte playback of audible media elements.
Comment 1 Jer Noble 2015-04-07 12:37:02 PDT
Created attachment 250285 [details]
Patch
Comment 2 Eric Carlson 2015-04-07 12:48:08 PDT
Comment on attachment 250285 [details]
Patch

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

> Source/WebCore/ChangeLog:15
> +
> +        

Nit: two blank lines

> Source/WebCore/html/HTMLMediaElement.cpp:5835
>      m_mediaSession->removeBehaviorRestriction(HTMLMediaSession::RequireUserGestureForLoad);
>      m_mediaSession->removeBehaviorRestriction(HTMLMediaSession::RequireUserGestureForRateChange);
> +    m_mediaSession->removeBehaviorRestriction(HTMLMediaSession::RequireUserGestureForAudioRateChange);
>      m_mediaSession->removeBehaviorRestriction(HTMLMediaSession::RequireUserGestureForFullscreen);

Nit: You should be able to call remove just once with a bit mask with all restrictions to clear.

> LayoutTests/media/video-test.js:399
> -}
>  \ No newline at end of file

:-O
Comment 3 Jer Noble 2015-04-07 14:17:40 PDT
Created attachment 250299 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2015-04-07 15:39:18 PDT
Attachment 250299 [details] did not pass style-queue:


ERROR: Source/WebCore/html/HTMLMediaSession.cpp:57:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/html/HTMLMediaElement.cpp:5849:  Line contains only semicolon. If this should be an empty statement, use { } instead.  [whitespace/semicolon] [5]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Jer Noble 2015-04-09 13:26:02 PDT
Created attachment 250457 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2015-04-09 13:28:30 PDT
Attachment 250457 [details] did not pass style-queue:


ERROR: Source/WebCore/html/HTMLMediaSession.cpp:57:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/html/HTMLMediaElement.cpp:5857:  Line contains only semicolon. If this should be an empty statement, use { } instead.  [whitespace/semicolon] [5]
Total errors found: 2 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Sam Weinig 2015-04-09 16:35:46 PDT
Comment on attachment 250457 [details]
Patch for landing

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

> Source/WebCore/html/HTMLMediaElement.cpp:5843
> +        | HTMLMediaSession::RequireUserGestureForAudioRateChange
> +        | HTMLMediaSession::RequireUserGestureForAudioRateChange

You have HTMLMediaSession::RequireUserGestureForAudioRateChange twice here.
Comment 8 Jer Noble 2015-04-25 23:11:59 PDT
Created attachment 251674 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2015-04-25 23:15:26 PDT
Attachment 251674 [details] did not pass style-queue:


ERROR: Source/WebCore/html/HTMLMediaSession.cpp:58:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 1 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 WebKit Commit Bot 2015-04-27 08:10:17 PDT
Comment on attachment 251674 [details]
Patch for landing

Rejecting attachment 251674 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 251674, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.

Full output: http://webkit-queues.appspot.com/results/5124165619154944
Comment 11 Jer Noble 2015-04-27 15:10:10 PDT
Committed r183428: <http://trac.webkit.org/changeset/183428>
Comment 12 Andy Estes 2015-04-28 07:44:36 PDT
(In reply to comment #11)
> Committed r183428: <http://trac.webkit.org/changeset/183428>

The new tests are missing expected results, so I added the actual results from Yosemite in http://trac.webkit.org/changeset/183473. You might want to check if that's right.