Add a preference to disable media autoplay
<rdar://problem/29152564>
Created attachment 294369 [details] Proposed patch.
Comment on attachment 294369 [details] Proposed patch. Attachment 294369 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2490262 New failing tests: media/video-autoplay-blocked.html
Created attachment 294373 [details] Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
(In reply to comment #3) > Comment on attachment 294369 [details] > Proposed patch. > > Attachment 294369 [details] did not pass mac-debug-ews (mac): > Output: http://webkit-queues.webkit.org/results/2490262 > > New failing tests: > media/video-autoplay-blocked.html This is failing because Internals didn't rebuild: TypeError: internals.settings.setBlockMediaAutoplay is not a function. (In 'internals.settings.setBlockMediaAutoplay(true)', 'internals.settings.setBlockMediaAutoplay' is undefined)
This is unnecessary.
Comment on attachment 294369 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=294369&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:54 > +@property (nonatomic, setter=_setBlockMediaAutoplay:) BOOL _blockMediaAutoplay WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); Cocoa APIs try to stay away from property names that sound like action verb phrases. The method name, _blockMediaAutoplay, can sound like a method that actively blocks something, rather than a property name of a boolean determining what the policy is. That thinking is where Cocoa property names like shouldBlockMediaAutoplay come from. > Source/WebKit/mac/WebView/WebPreferencesPrivate.h:273 > +- (void)setBlockMediaAutoplay:(BOOL)flag; > +- (BOOL)blockMediaAutoplay; Ditto.