<!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>[211200] 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/211200">211200</a></dd>
<dt>Author</dt> <dd>ryanhaddad@apple.com</dd>
<dt>Date</dt> <dd>2017-01-25 20:24:10 -0800 (Wed, 25 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/211193">r211193</a>.

This change broke internal builds.

Reverted changeset:

&quot;Notify clients when the user plays media otherwise prevented
from autoplaying&quot;
https://bugs.webkit.org/show_bug.cgi?id=167390
http://trac.webkit.org/changeset/211193</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageChromeClienth">trunk/Source/WebCore/page/ChromeClient.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIUIClienth">trunk/Source/WebKit2/UIProcess/API/APIUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageUIClienth">trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaWebsitePoliciesmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPIcocoaTestWKWebViewh">trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h</a></li>
<li><a href="#trunkToolsTestWebKitAPIcocoaTestWKWebViewmm">trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2autoplaywithcontrolshtml">trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2jsplaywithcontrolshtml">trunk/Tools/TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2noautoplaywithcontrolshtml">trunk/Tools/TestWebKitAPI/Tests/WebKit2/no-autoplay-with-controls.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebCore/ChangeLog        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-01-25  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Unreviewed, rolling out r211193.
+
+        This change broke internal builds.
+
+        Reverted changeset:
+
+        &quot;Notify clients when the user plays media otherwise prevented
+        from autoplaying&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=167390
+        http://trac.webkit.org/changeset/211193
+
</ins><span class="cx"> 2017-01-25  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add infrastructure to support data interaction in WebKit2
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -3167,8 +3167,7 @@
</span><span class="cx">         scheduleResolvePendingPlayPromises();
</span><span class="cx"> 
</span><span class="cx">     if (ScriptController::processingUserGestureForMedia() &amp;&amp; m_preventedFromPlayingWithoutUserGesture) {
</span><del>-        if (Page* page = document().page())
-            page-&gt;chrome().client().didPlayMediaPreventedFromPlayingWithoutUserGesture();
</del><ins>+        // FIXME: notify clients a user gesture was made and started playback of an element that was otherwise prevented from playing.
</ins><span class="cx">         m_preventedFromPlayingWithoutUserGesture = false;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ChromeClient.h (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ChromeClient.h        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebCore/page/ChromeClient.h        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -420,7 +420,6 @@
</span><span class="cx">     virtual bool shouldUseTiledBackingForFrameView(const FrameView&amp;) const { return false; }
</span><span class="cx"> 
</span><span class="cx">     virtual void isPlayingMediaDidChange(MediaProducer::MediaStateFlags, uint64_t) { }
</span><del>-    virtual void didPlayMediaPreventedFromPlayingWithoutUserGesture() { }
</del><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><span class="cx">     virtual void hasMediaSessionWithActiveMediaElementsDidChange(bool) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/ChangeLog        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-01-25  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Unreviewed, rolling out r211193.
+
+        This change broke internal builds.
+
+        Reverted changeset:
+
+        &quot;Notify clients when the user plays media otherwise prevented
+        from autoplaying&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=167390
+        http://trac.webkit.org/changeset/211193
+
</ins><span class="cx"> 2017-01-25  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add infrastructure to support data interaction in WebKit2
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -152,7 +152,6 @@
</span><span class="cx">     virtual void isPlayingAudioDidChange(WebKit::WebPageProxy&amp;) { }
</span><span class="cx">     virtual void didBeginCaptureSession() { }
</span><span class="cx">     virtual void didEndCaptureSession() { }
</span><del>-    virtual void didPlayMediaPreventedFromPlayingWithoutUserGesture(WebKit::WebPageProxy&amp;) { }
</del><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><span class="cx">     virtual void mediaSessionMetadataDidChange(WebKit::WebPageProxy&amp;, WebKit::WebMediaSessionMetadata*) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -2235,14 +2235,6 @@
</span><span class="cx">             m_client.didLosePointerLock(toAPI(page), m_client.base.clientInfo);
</span><span class="cx">         }
</span><span class="cx"> #endif
</span><del>-
-        void didPlayMediaPreventedFromPlayingWithoutUserGesture(WebPageProxy&amp; page) override
-        {
-            if (!m_client.didPlayMediaPreventedFromPlayingWithoutUserGesture)
-                return;
-
-            m_client.didPlayMediaPreventedFromPlayingWithoutUserGesture(toAPI(&amp;page), m_client.base.clientInfo);
-        }
</del><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     toImpl(pageRef)-&gt;setUIClient(std::make_unique&lt;UIClient&gt;(wkClient));
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -102,7 +102,6 @@
</span><span class="cx"> typedef void (*WKCheckUserMediaPermissionCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef userMediaDocumentOrigin, WKSecurityOriginRef topLevelDocumentOrigin, WKUserMediaPermissionCheckRef devicesRequest, const void *clientInfo);
</span><span class="cx"> typedef void (*WKPageDidClickAutoFillButtonCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
</span><span class="cx"> typedef void (*WKPageMediaSessionMetadataDidChangeCallback)(WKPageRef page, WKMediaSessionMetadataRef metadata, const void* clientInfo);
</span><del>-typedef void (*WKDidPlayMediaPreventedFromPlayingWithoutUserGesture)(WKPageRef page, const void* clientInfo);
</del><span class="cx"> typedef void (*WKFullscreenMayReturnToInlineCallback)(WKPageRef page, const void* clientInfo);
</span><span class="cx"> 
</span><span class="cx"> typedef void (*WKRequestPointerLockCallback)(WKPageRef page, const void* clientInfo);
</span><span class="lines">@@ -726,7 +725,6 @@
</span><span class="cx">     // Version 8.
</span><span class="cx">     WKRequestPointerLockCallback                                        requestPointerLock;
</span><span class="cx">     WKDidLosePointerLockCallback                                        didLosePointerLock;
</span><del>-    WKDidPlayMediaPreventedFromPlayingWithoutUserGesture                didPlayMediaPreventedFromPlayingWithoutUserGesture;
</del><span class="cx"> } WKPageUIClientV8;
</span><span class="cx">     
</span><span class="cx"> #ifdef __cplusplus
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -6527,11 +6527,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture()
-{
-    m_uiClient-&gt;didPlayMediaPreventedFromPlayingWithoutUserGesture(*this);
-}
-
</del><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> void WebPageProxy::removeNavigationGestureSnapshot()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -1062,7 +1062,6 @@
</span><span class="cx">     bool hasActiveAudioStream() const { return m_mediaState &amp; WebCore::MediaProducer::HasActiveAudioCaptureDevice; }
</span><span class="cx">     bool hasActiveVideoStream() const { return m_mediaState &amp; WebCore::MediaProducer::HasActiveVideoCaptureDevice; }
</span><span class="cx">     WebCore::MediaProducer::MediaStateFlags mediaStateFlags() const { return m_mediaState; }
</span><del>-    void didPlayMediaPreventedFromPlayingWithoutUserGesture();
</del><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     void videoControlsManagerDidChange();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -443,7 +443,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     IsPlayingMediaDidChange(unsigned state, uint64_t sourceElementID)
</span><del>-    DidPlayMediaPreventedFromPlayingWithoutUserGesture()
</del><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><span class="cx">     HasMediaSessionWithActiveMediaElementsDidChange(bool state)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -1084,11 +1084,6 @@
</span><span class="cx">     m_page.send(Messages::WebPageProxy::IsPlayingMediaDidChange(state, sourceElementID));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture()
-{
-    m_page.send(Messages::WebPageProxy::DidPlayMediaPreventedFromPlayingWithoutUserGesture());
-}
-
</del><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::hasMediaSessionWithActiveMediaElementsDidChange(bool state)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -297,7 +297,6 @@
</span><span class="cx">     bool shouldUseTiledBackingForFrameView(const WebCore::FrameView&amp;) const final;
</span><span class="cx"> 
</span><span class="cx">     void isPlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags, uint64_t) final;
</span><del>-    void didPlayMediaPreventedFromPlayingWithoutUserGesture() final;
</del><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><span class="cx">     void hasMediaSessionWithActiveMediaElementsDidChange(bool) final;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/ChangeLog        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-01-25  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Unreviewed, rolling out r211193.
+
+        This change broke internal builds.
+
+        Reverted changeset:
+
+        &quot;Notify clients when the user plays media otherwise prevented
+        from autoplaying&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=167390
+        http://trac.webkit.org/changeset/211193
+
</ins><span class="cx"> 2017-01-25  Matt Rajca  &lt;mrajca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Notify clients when the user plays media otherwise prevented from autoplaying
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -509,9 +509,6 @@
</span><span class="cx">                 C95984F41E36BC6B002C0D45 /* autoplay-check.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C95984F21E36BC55002C0D45 /* autoplay-check.html */; };
</span><span class="cx">                 C95984F51E36BC6B002C0D45 /* autoplay-no-audio-check.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */; };
</span><span class="cx">                 C95984F71E36BCEF002C0D45 /* test-without-audio-track.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = C95984F61E36BCD7002C0D45 /* test-without-audio-track.mp4 */; };
</span><del>-                C99B675C1E39721A00FC6C80 /* autoplay-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */; };
-                C99B675D1E39722000FC6C80 /* js-play-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */; };
-                C99B675F1E39736F00FC6C80 /* no-autoplay-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */; };
</del><span class="cx">                 CD59F53419E9110D00CF1835 /* file-with-mse.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD59F53219E910AA00CF1835 /* file-with-mse.html */; };
</span><span class="cx">                 CD59F53519E9110D00CF1835 /* test-mse.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD59F53319E910BC00CF1835 /* test-mse.mp4 */; };
</span><span class="cx">                 CD78E11D1DB7EA660014A2DE /* FullscreenDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD78E11A1DB7EA360014A2DE /* FullscreenDelegate.mm */; };
</span><span class="lines">@@ -610,9 +607,6 @@
</span><span class="cx">                         dstPath = TestWebKitAPI.resources;
</span><span class="cx">                         dstSubfolderSpec = 7;
</span><span class="cx">                         files = (
</span><del>-                                C99B675F1E39736F00FC6C80 /* no-autoplay-with-controls.html in Copy Resources */,
-                                C99B675D1E39722000FC6C80 /* js-play-with-controls.html in Copy Resources */,
-                                C99B675C1E39721A00FC6C80 /* autoplay-with-controls.html in Copy Resources */,
</del><span class="cx">                                 C95984F71E36BCEF002C0D45 /* test-without-audio-track.mp4 in Copy Resources */,
</span><span class="cx">                                 C95984F41E36BC6B002C0D45 /* autoplay-check.html in Copy Resources */,
</span><span class="cx">                                 C95984F51E36BC6B002C0D45 /* autoplay-no-audio-check.html in Copy Resources */,
</span><span class="lines">@@ -1280,9 +1274,6 @@
</span><span class="cx">                 C95984F21E36BC55002C0D45 /* autoplay-check.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;autoplay-check.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;autoplay-no-audio-check.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 C95984F61E36BCD7002C0D45 /* test-without-audio-track.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = &quot;test-without-audio-track.mp4&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;autoplay-with-controls.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
-                C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;js-play-with-controls.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
-                C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;no-autoplay-with-controls.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 CD225C071C45A69200140761 /* ParsedContentRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParsedContentRange.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD5393C71757BA9700C07123 /* MD5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MD5.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 CD5393C91757BAC400C07123 /* SHA1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SHA1.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1970,7 +1961,6 @@
</span><span class="cx">                                 76E182DE15475A8300F1FADD /* auto-submitting-form.html */,
</span><span class="cx">                                 C95984F21E36BC55002C0D45 /* autoplay-check.html */,
</span><span class="cx">                                 C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */,
</span><del>-                                C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */,
</del><span class="cx">                                 7C486BA01AA1254B003F6F9B /* bundle-file.html */,
</span><span class="cx">                                 9BD4239B1E04BFD000200395 /* chinese-character-with-image.html */,
</span><span class="cx">                                 1A50AA1F1A2A4EA500F4C345 /* close-from-within-create-page.html */,
</span><span class="lines">@@ -1991,7 +1981,6 @@
</span><span class="cx">                                 4A410F4D19AF7BEF002EBAB5 /* getUserMedia.html */,
</span><span class="cx">                                 BCBD372E125ABBE600D2C29F /* icon.png */,
</span><span class="cx">                                 CE3524F51B142BBB0028A7C5 /* input-focus-blur.html */,
</span><del>-                                C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */,
</del><span class="cx">                                 8349D3C31DB9724F004A9F65 /* link-with-download-attribute.html */,
</span><span class="cx">                                 378E647816326FDF00B6C676 /* link-with-title.html */,
</span><span class="cx">                                 9361002814DC957B0061379D /* lots-of-iframes.html */,
</span><span class="lines">@@ -2002,7 +1991,6 @@
</span><span class="cx">                                 51CD1C711B38D48400142CA5 /* modal-alerts-in-new-about-blank-window.html */,
</span><span class="cx">                                 7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */,
</span><span class="cx">                                 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */,
</span><del>-                                C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */,
</del><span class="cx">                                 CEA6CF2719CCF69D0064F5A7 /* open-and-close-window.html */,
</span><span class="cx">                                 F6FDDDD514241C48004F1729 /* push-state.html */,
</span><span class="cx">                                 CEBABD481B71687C0051210A /* should-open-external-schemes.html */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2autoplaywithcontrolshtml"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -1,19 +0,0 @@
</span><del>-&lt;html&gt;
-    &lt;head&gt;
-        &lt;script&gt;
-            function pageLoaded() {
-                try {
-                    window.webkit.messageHandlers.testHandler.postMessage(&quot;loaded&quot;);
-                } catch(e) { }
-            }
-
-            function play() {
-                document.getElementById(&quot;video&quot;).play();
-            }
-        &lt;/script&gt;
-    &lt;/head&gt;
-    &lt;body onload=&quot;pageLoaded()&quot;&gt;
-        &lt;button onclick=&quot;play()&quot;&gt;Play&lt;/button&gt;
-        &lt;video id=&quot;video&quot; autoplay src=&quot;test.mp4&quot; /&gt;
-    &lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2jsplaywithcontrolshtml"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -1,20 +0,0 @@
</span><del>-&lt;html&gt;
-    &lt;head&gt;
-        &lt;script&gt;
-            function pageLoaded() {
-                document.getElementById(&quot;video&quot;).play();
-                try {
-                    window.webkit.messageHandlers.testHandler.postMessage(&quot;loaded&quot;);
-                } catch(e) { }
-            }
-
-            function play() {
-                document.getElementById(&quot;video&quot;).play();
-            }
-        &lt;/script&gt;
-    &lt;/head&gt;
-    &lt;body onload=&quot;pageLoaded()&quot;&gt;
-        &lt;button onclick=&quot;play()&quot;&gt;Play&lt;/button&gt;
-        &lt;video id=&quot;video&quot; src=&quot;test.mp4&quot; /&gt;
-    &lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2noautoplaywithcontrolshtml"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/no-autoplay-with-controls.html (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/no-autoplay-with-controls.html        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/no-autoplay-with-controls.html        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-&lt;html&gt;
-    &lt;head&gt;
-        &lt;script&gt;
-            function pageLoaded() {
-                try {
-                    window.webkit.messageHandlers.testHandler.postMessage(&quot;loaded&quot;);
-                } catch(e) { }
-            }
-
-            function beganPlaying() {
-                try {
-                    window.webkit.messageHandlers.testHandler.postMessage(&quot;played&quot;);
-                } catch(e) { }
-            }
-
-            function play() {
-                document.getElementById(&quot;video&quot;).play();
-            }
-        &lt;/script&gt;
-    &lt;/head&gt;
-    &lt;body onload=&quot;pageLoaded()&quot;&gt;
-        &lt;button onclick=&quot;play()&quot;&gt;Play&lt;/button&gt;
-        &lt;video id=&quot;video&quot; onplaying=beganPlaying() src=&quot;test.mp4&quot; /&gt;
-    &lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaWebsitePoliciesmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -39,10 +39,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><del>-@interface WKWebView ()
-- (WKPageRef)_pageForTesting;
-@end
-
</del><span class="cx"> static bool doneCompiling;
</span><span class="cx"> static bool receivedAlert;
</span><span class="cx"> static size_t alertCount;
</span><span class="lines">@@ -217,59 +213,4 @@
</span><span class="cx">     [webView waitForMessage:@&quot;autoplayed&quot;];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
-static void didPlayMediaPreventedFromPlayingWithoutUserGesture(WKPageRef page, const void* clientInfo)
-{
-    receivedAlert = true;
-}
-
-TEST(WebKit2, WebsitePoliciesPlayAfterPreventedAutoplay)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 336, 276) configuration:configuration.get()]);
-
-    auto delegate = adoptNS([[AutoplayPoliciesDelegate alloc] init]);
-    [delegate setAutoplayPolicy:_WKWebsiteAutoplayPolicyDeny];
-    [webView setNavigationDelegate:delegate.get()];
-
-    WKPageUIClientV8 uiClient;
-    memset(&amp;uiClient, 0, sizeof(uiClient));
-
-    uiClient.base.version = 8;
-    uiClient.didPlayMediaPreventedFromPlayingWithoutUserGesture = didPlayMediaPreventedFromPlayingWithoutUserGesture;
-
-    WKPageSetPageUIClient([webView _pageForTesting], &amp;uiClient.base);
-    NSPoint playButtonClickPoint = NSMakePoint(20, 256);
-
-    receivedAlert = false;
-    NSURLRequest *jsPlayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@&quot;js-play-with-controls&quot; withExtension:@&quot;html&quot; subdirectory:@&quot;TestWebKitAPI.resources&quot;]];
-    [webView loadRequest:jsPlayRequest];
-    [webView waitForMessage:@&quot;loaded&quot;];
-    [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO];
-    [webView mouseUpAtPoint:playButtonClickPoint];
-    TestWebKitAPI::Util::run(&amp;receivedAlert);
-
-    receivedAlert = false;
-    [webView loadHTMLString:@&quot;&quot; baseURL:nil];
-
-    NSURLRequest *autoplayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@&quot;autoplay-with-controls&quot; withExtension:@&quot;html&quot; subdirectory:@&quot;TestWebKitAPI.resources&quot;]];
-    [webView loadRequest:autoplayRequest];
-    [webView waitForMessage:@&quot;loaded&quot;];
-    [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO];
-    [webView mouseUpAtPoint:playButtonClickPoint];
-    TestWebKitAPI::Util::run(&amp;receivedAlert);
-
-    receivedAlert = false;
-    [webView loadHTMLString:@&quot;&quot; baseURL:nil];
-
-    NSURLRequest *noAutoplayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@&quot;no-autoplay-with-controls&quot; withExtension:@&quot;html&quot; subdirectory:@&quot;TestWebKitAPI.resources&quot;]];
-    [webView loadRequest:noAutoplayRequest];
-    [webView waitForMessage:@&quot;loaded&quot;];
-    [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO];
-    [webView mouseUpAtPoint:playButtonClickPoint];
-    [webView waitForMessage:@&quot;played&quot;];
-    ASSERT_FALSE(receivedAlert);
-}
</del><span class="cx"> #endif
</span><del>-
-#endif
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPIcocoaTestWKWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx"> @interface TestWKWebView (MacOnly)
</span><span class="cx"> // Simulates clicking with a pressure-sensitive device, if possible.
</span><span class="cx"> - (void)mouseDownAtPoint:(NSPoint)point simulatePressure:(BOOL)simulatePressure;
</span><del>-- (void)mouseUpAtPoint:(NSPoint)point;
</del><span class="cx"> - (void)typeCharacter:(char)character;
</span><span class="cx"> @end
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPIcocoaTestWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -120,11 +120,6 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><del>-
-- (void)_mouseUpAtPoint:(NSPoint)point
-{
-    [self sendEvent:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:point modifierFlags:0 timestamp:GetCurrentEventTime() windowNumber:self.windowNumber context:[NSGraphicsContext currentContext] eventNumber:++gEventNumber clickCount:1 pressure:0]];
-}
</del><span class="cx"> #endif // PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)isKeyWindow
</span><span class="lines">@@ -255,11 +250,6 @@
</span><span class="cx">     [_hostWindow _mouseDownAtPoint:point simulatePressure:simulatePressure];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)mouseUpAtPoint:(NSPoint)point
-{
-    [_hostWindow _mouseUpAtPoint:point];
-}
-
</del><span class="cx"> - (void)typeCharacter:(char)character {
</span><span class="cx">     NSString *characterAsString = [NSString stringWithFormat:@&quot;%c&quot; , character];
</span><span class="cx">     NSEventType keyDownEventType = NSEventTypeKeyDown;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (211199 => 211200)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2017-01-26 04:24:10 UTC (rev 211200)
</span><span class="lines">@@ -279,7 +279,6 @@
</span><span class="cx">         0, // fullscreenMayReturnToInline
</span><span class="cx">         requestPointerLock,
</span><span class="cx">         0,
</span><del>-        0, // didPlayMediaPreventedFromPlayingWithoutUserGesture
</del><span class="cx">     };
</span><span class="cx">     WKPageSetPageUIClient(newPage, &amp;otherPageUIClient.base);
</span><span class="cx">     
</span><span class="lines">@@ -552,7 +551,6 @@
</span><span class="cx">         0, // fullscreenMayReturnToInline
</span><span class="cx">         requestPointerLock,
</span><span class="cx">         0,
</span><del>-        0, // didPlayMediaPreventedFromPlayingWithoutUserGesture
</del><span class="cx">     };
</span><span class="cx">     WKPageSetPageUIClient(m_mainWebView-&gt;page(), &amp;pageUIClient.base);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>