Bug 143486 - Add a setting & restriction which prevents non-interactive playback of audible media elements.
Summary: Add a setting & restriction which prevents non-interactive playback of audibl...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-07 10:43 PDT by Jer Noble
Modified: 2015-04-28 07:44 PDT (History)
2 users (show)

See Also:


Attachments
Patch (23.08 KB, patch)
2015-04-07 12:37 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (20.33 KB, patch)
2015-04-07 14:17 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (25.21 KB, patch)
2015-04-09 13:26 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (25.01 KB, patch)
2015-04-25 23:11 PDT, Jer Noble
commit-queue: commit-queue-
Details | Formatted Diff | Diff

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