<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[193381] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/193381">193381</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2015-12-03 15:39:38 -0800 (Thu, 03 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit &amp; WebKit2
https://bugs.webkit.org/show_bug.cgi?id=151830

Reviewed by Anders Carlsson.

Source/WebKit/mac:

Add a new WebPreferences property invisibleAutoplayNotPermitted.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences invisibleAutoplayNotPermitted]):
(-[WebPreferences setInvisibleAutoplayNotPermitted:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add a new, private WKWebViewConfiguration property _invisibleAutoplayNotPermitted.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _invisibleAutoplayNotPermitted]):
(-[WKWebViewConfiguration _setInvisibleAutoplayNotPermitted:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Set invisibleAutoplayNotPermitted to NO by default both in WKTR and DRT.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesmm">trunk/Source/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPreferencesPrivateh">trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesDefinitionsh">trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnercocoaTestControllerCocoamm">trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-12-03  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit &amp; WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=151830
+
+        Reviewed by Anders Carlsson.
+
+        Add a new WebPreferences property invisibleAutoplayNotPermitted.
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (-[WebPreferences invisibleAutoplayNotPermitted]):
+        (-[WebPreferences setInvisibleAutoplayNotPermitted:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2015-12-03  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove Objective-C GC support
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -123,6 +123,7 @@
</span><span class="cx"> #define WebKitRequiresUserGestureForAudioPlaybackPreferenceKey @&quot;WebKitAudioPlaybackRequiresUserGesture&quot;
</span><span class="cx"> #define WebKitAllowsInlineMediaPlaybackPreferenceKey @&quot;WebKitMediaPlaybackAllowsInline&quot;
</span><span class="cx"> #define WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey @&quot;InlineMediaPlaybackRequiresPlaysInlineAttribute&quot;
</span><ins>+#define WebKitInvisibleAutoplayNotPermittedKey @&quot;InvisibleAutoplayNotPermitted&quot;
</ins><span class="cx"> #define WebKitAllowsPictureInPictureMediaPlaybackPreferenceKey @&quot;WebKitAllowsPictureInPictureMediaPlayback&quot;
</span><span class="cx"> #define WebKitAllowsAirPlayForMediaPlaybackPreferenceKey @&quot;WebKitMediaPlaybackAllowsAirPlay&quot;
</span><span class="cx"> #define WebKitMediaControlsScaleWithPageZoomPreferenceKey @&quot;WebKitMediaControlsScaleWithPageZoom&quot;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -2218,6 +2218,16 @@
</span><span class="cx">     [self _setBoolValue:flag forKey:WebKitInlineMediaPlaybackRequiresPlaysInlineAttributeKey];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)invisibleAutoplayNotPermitted
+{
+    return [self _boolValueForKey:WebKitInvisibleAutoplayNotPermittedKey];
+}
+
+- (void)setInvisibleAutoplayNotPermitted:(BOOL)flag
+{
+    [self _setBoolValue:flag forKey:WebKitInvisibleAutoplayNotPermittedKey];
+}
+
</ins><span class="cx"> - (BOOL)mediaControlsScaleWithPageZoom
</span><span class="cx"> {
</span><span class="cx">     return [self _boolValueForKey:WebKitMediaControlsScaleWithPageZoomPreferenceKey];
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -254,6 +254,9 @@
</span><span class="cx"> - (void)setInlineMediaPlaybackRequiresPlaysInlineAttribute:(BOOL)flag;
</span><span class="cx"> - (BOOL)inlineMediaPlaybackRequiresPlaysInlineAttribute;
</span><span class="cx"> 
</span><ins>+- (void)setInvisibleAutoplayNotPermitted:(BOOL)flag;
+- (BOOL)invisibleAutoplayNotPermitted;
+
</ins><span class="cx"> - (void)setMediaControlsScaleWithPageZoom:(BOOL)flag;
</span><span class="cx"> - (BOOL)mediaControlsScaleWithPageZoom;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -2306,6 +2306,7 @@
</span><span class="cx">     settings.setAudioPlaybackRequiresUserGesture([preferences audioPlaybackRequiresUserGesture]);
</span><span class="cx">     settings.setAllowsInlineMediaPlayback([preferences mediaPlaybackAllowsInline]);
</span><span class="cx">     settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute([preferences inlineMediaPlaybackRequiresPlaysInlineAttribute]);
</span><ins>+    settings.setInvisibleAutoplayNotPermitted([preferences invisibleAutoplayNotPermitted]);
</ins><span class="cx">     settings.setAllowsPictureInPictureMediaPlayback([preferences allowsPictureInPictureMediaPlayback] &amp;&amp; shouldAllowPictureInPictureMediaPlayback());
</span><span class="cx">     settings.setMediaControlsScaleWithPageZoom([preferences mediaControlsScaleWithPageZoom]);
</span><span class="cx">     settings.setSuppressesIncrementalRendering([preferences suppressesIncrementalRendering]);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit2/ChangeLog        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-12-03  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit &amp; WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=151830
+
+        Reviewed by Anders Carlsson.
+
+        Add a new, private WKWebViewConfiguration property _invisibleAutoplayNotPermitted.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView initWithFrame:configuration:]):
+        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
+        (-[WKWebViewConfiguration init]):
+        (-[WKWebViewConfiguration copyWithZone:]):
+        (-[WKWebViewConfiguration _invisibleAutoplayNotPermitted]):
+        (-[WKWebViewConfiguration _setInvisibleAutoplayNotPermitted:]):
+        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
</ins><span class="cx"> 2015-12-03  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         It should be possible to use version 6 of the WKPageUIClient without adopting the new createNewPage
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx"> #define DEFAULT_PASSWORD_ECHO_ENABLED true
</span><span class="cx"> #define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK false
</span><span class="cx"> #define DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE true
</span><ins>+#define DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED true
</ins><span class="cx"> #define DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY false
</span><span class="cx"> #define DEFAULT_REQUIRES_USER_GESTURE_FOR_MEDIA_PLAYBACK true
</span><span class="cx"> #define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK true
</span><span class="lines">@@ -75,6 +76,7 @@
</span><span class="cx"> #define DEFAULT_PASSWORD_ECHO_ENABLED false
</span><span class="cx"> #define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK true
</span><span class="cx"> #define DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE false
</span><ins>+#define DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED false
</ins><span class="cx"> #define DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY true
</span><span class="cx"> #define DEFAULT_REQUIRES_USER_GESTURE_FOR_MEDIA_PLAYBACK false
</span><span class="cx"> #define DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK false
</span><span class="lines">@@ -143,6 +145,7 @@
</span><span class="cx">     macro(RequiresUserGestureForAudioPlayback, requiresUserGestureForAudioPlayback, Bool, bool, DEFAULT_REQUIRES_USER_GESTURE_FOR_AUDIO_PLAYBACK) \
</span><span class="cx">     macro(AllowsInlineMediaPlayback, allowsInlineMediaPlayback, Bool, bool, DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK) \
</span><span class="cx">     macro(InlineMediaPlaybackRequiresPlaysInlineAttribute, inlineMediaPlaybackRequiresPlaysInlineAttribute, Bool, bool, DEFAULT_INLINE_MEDIA_PLAYBACK_REQUIRES_PLAYS_INLINE_ATTRIBUTE) \
</span><ins>+    macro(InvisibleAutoplayNotPermitted, invisibleAutoplayNotPermitted, Bool, bool, DEFAULT_INVISIBLE_AUTOPLAY_NOT_PERMITTED) \
</ins><span class="cx">     macro(MediaDataLoadsAutomatically, mediaDataLoadsAutomatically, Bool, bool, DEFAULT_MEDIA_DATA_LOADS_AUTOMATICALLY) \
</span><span class="cx">     macro(AllowsPictureInPictureMediaPlayback, allowsPictureInPictureMediaPlayback, Bool, bool, true) \
</span><span class="cx">     macro(AllowsAirPlayForMediaPlayback, allowsAirPlayForMediaPlayback, Bool, bool, true) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -361,6 +361,7 @@
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::allowsPictureInPictureMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration allowsPictureInPictureMediaPlayback] &amp;&amp; shouldAllowPictureInPictureMediaPlayback()));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::requiresUserGestureForMediaPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration requiresUserActionForMediaPlayback]));
</span><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::requiresUserGestureForAudioPlaybackKey(), WebKit::WebPreferencesStore::Value(!![_configuration _requiresUserActionForAudioPlayback]));
</span><ins>+    pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::invisibleAutoplayNotPermittedKey(), WebKit::WebPreferencesStore::Value(!![_configuration _invisibleAutoplayNotPermitted]));
</ins><span class="cx">     pageConfiguration-&gt;preferenceValues().set(WebKit::WebPreferencesKey::mediaDataLoadsAutomaticallyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _mediaDataLoadsAutomatically]));
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -103,6 +103,7 @@
</span><span class="cx">     BOOL _alwaysRunsAtForegroundPriority;
</span><span class="cx">     BOOL _allowsInlineMediaPlayback;
</span><span class="cx">     BOOL _inlineMediaPlaybackRequiresPlaysInlineAttribute;
</span><ins>+    BOOL _invisibleAutoplayNotPermitted;
</ins><span class="cx">     BOOL _mediaDataLoadsAutomatically;
</span><span class="cx">     BOOL _requiresUserActionForAudioPlayback;
</span><span class="cx"> #endif
</span><span class="lines">@@ -124,6 +125,7 @@
</span><span class="cx">     _allowsPictureInPictureMediaPlayback = YES;
</span><span class="cx">     _allowsInlineMediaPlayback = WebCore::deviceClass() == MGDeviceClassiPad;
</span><span class="cx">     _inlineMediaPlaybackRequiresPlaysInlineAttribute = !_allowsInlineMediaPlayback;
</span><ins>+    _invisibleAutoplayNotPermitted = YES;
</ins><span class="cx">     _mediaDataLoadsAutomatically = NO;
</span><span class="cx">     _respectsImageOrientation = YES;
</span><span class="cx">     _printsBackgrounds = YES;
</span><span class="lines">@@ -183,6 +185,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     configuration-&gt;_allowsInlineMediaPlayback = self-&gt;_allowsInlineMediaPlayback;
</span><span class="cx">     configuration-&gt;_inlineMediaPlaybackRequiresPlaysInlineAttribute = self-&gt;_inlineMediaPlaybackRequiresPlaysInlineAttribute;
</span><ins>+    configuration-&gt;_invisibleAutoplayNotPermitted = self-&gt;_invisibleAutoplayNotPermitted;
</ins><span class="cx">     configuration-&gt;_mediaDataLoadsAutomatically = self-&gt;_mediaDataLoadsAutomatically;
</span><span class="cx">     configuration-&gt;_allowsPictureInPictureMediaPlayback = self-&gt;_allowsPictureInPictureMediaPlayback;
</span><span class="cx">     configuration-&gt;_alwaysRunsAtForegroundPriority = _alwaysRunsAtForegroundPriority;
</span><span class="lines">@@ -456,6 +459,16 @@
</span><span class="cx">     _inlineMediaPlaybackRequiresPlaysInlineAttribute = requires;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)_invisibleAutoplayNotPermitted
+{
+    return _invisibleAutoplayNotPermitted;
+}
+
+- (void)_setInvisibleAutoplayNotPermitted:(BOOL)notPermitted
+{
+    _invisibleAutoplayNotPermitted = notPermitted;
+}
+
</ins><span class="cx"> - (BOOL)_mediaDataLoadsAutomatically
</span><span class="cx"> {
</span><span class="cx">     return _mediaDataLoadsAutomatically;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewConfigurationPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> 
</span><span class="cx"> @property (nonatomic, setter=_setRequiresUserActionForAudioPlayback:) BOOL _requiresUserActionForAudioPlayback WK_AVAILABLE(NA, WK_IOS_TBA);
</span><span class="cx"> @property (nonatomic, setter=_setInlineMediaPlaybackRequiresPlaysInlineAttribute:) BOOL _inlineMediaPlaybackRequiresPlaysInlineAttribute WK_AVAILABLE(NA, WK_IOS_TBA);
</span><ins>+@property (nonatomic, setter=_setInvisibleAutoplayNotPermitted:) BOOL _invisibleAutoplayNotPermitted WK_AVAILABLE(NA, WK_IOS_TBA);
</ins><span class="cx"> @property (nonatomic, setter=_setMediaDataLoadsAutomatically:) BOOL _mediaDataLoadsAutomatically WK_AVAILABLE(NA, WK_IOS_TBA);
</span><span class="cx"> #else
</span><span class="cx"> @property (nonatomic, setter=_setShowsURLsInToolTips:) BOOL _showsURLsInToolTips WK_AVAILABLE(WK_MAC_TBA, NA);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -2783,6 +2783,7 @@
</span><span class="cx">     settings.setAudioPlaybackRequiresUserGesture(store.getBoolValueForKey(WebPreferencesKey::requiresUserGestureForAudioPlaybackKey()));
</span><span class="cx">     settings.setAllowsInlineMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsInlineMediaPlaybackKey()));
</span><span class="cx">     settings.setInlineMediaPlaybackRequiresPlaysInlineAttribute(store.getBoolValueForKey(WebPreferencesKey::inlineMediaPlaybackRequiresPlaysInlineAttributeKey()));
</span><ins>+    settings.setInvisibleAutoplayNotPermitted(store.getBoolValueForKey(WebPreferencesKey::invisibleAutoplayNotPermittedKey()));
</ins><span class="cx">     settings.setMediaDataLoadsAutomatically(store.getBoolValueForKey(WebPreferencesKey::mediaDataLoadsAutomaticallyKey()));
</span><span class="cx">     settings.setAllowsPictureInPictureMediaPlayback(store.getBoolValueForKey(WebPreferencesKey::allowsPictureInPictureMediaPlaybackKey()));
</span><span class="cx">     settings.setMediaControlsScaleWithPageZoom(store.getBoolValueForKey(WebPreferencesKey::mediaControlsScaleWithPageZoomKey()));
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Tools/ChangeLog        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-12-03  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit &amp; WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=151830
+
+        Reviewed by Anders Carlsson.
+
+        Set invisibleAutoplayNotPermitted to NO by default both in WKTR and DRT.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (resetWebPreferencesToConsistentValues):
+        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+        (WTR::initializeWebViewConfiguration):
+
</ins><span class="cx"> 2015-12-03  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove Objective-C GC support
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -943,6 +943,7 @@
</span><span class="cx">     [preferences setMediaPlaybackAllowsInline:YES];
</span><span class="cx">     [preferences setMediaPlaybackRequiresUserGesture:NO];
</span><span class="cx">     [preferences setMediaDataLoadsAutomatically:YES];
</span><ins>+    [preferences setInvisibleAutoplayNotPermitted:NO];
</ins><span class="cx"> 
</span><span class="cx">     // Enable the tracker before creating the first WebView will
</span><span class="cx">     // cause initialization to use the correct database paths.
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnercocoaTestControllerCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (193380 => 193381)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm        2015-12-03 22:54:40 UTC (rev 193380)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm        2015-12-03 23:39:38 UTC (rev 193381)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx">     globalWebViewConfiguration.allowsInlineMediaPlayback = YES;
</span><span class="cx">     globalWebViewConfiguration._inlineMediaPlaybackRequiresPlaysInlineAttribute = NO;
</span><ins>+    globalWebViewConfiguration._invisibleAutoplayNotPermitted = NO;
</ins><span class="cx">     globalWebViewConfiguration._mediaDataLoadsAutomatically = YES;
</span><span class="cx">     globalWebViewConfiguration.requiresUserActionForMediaPlayback = NO;
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>