<!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>[218369] 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/218369">218369</a></dd>
<dt>Author</dt> <dd>jlewis3@apple.com</dd>
<dt>Date</dt> <dd>2017-06-15 17:16:36 -0700 (Thu, 15 Jun 2017)</dd>
</dl>

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

The revision caused API timeouts on all builds.

Reverted changeset:

"[WebRTC] Removing a MediaStreamTrack from a MediaStream
reports no recording to WebKit clients"
https://bugs.webkit.org/show_bug.cgi?id=173398
http://trac.webkit.org/changeset/218365</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamcpp">trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamh">trunk/Source/WebCore/Modules/mediastream/MediaStream.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamTrackcpp">trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamTrackh">trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateMediaStreamAVFObjCh">trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaStreamPrivatecpp">trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaStreamPrivateh">trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaStreamTrackPrivatecpp">trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaStreamTrackPrivateh">trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamRealtimeMediaSourcecpp">trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamRealtimeMediaSourceh">trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.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>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2MediaStreamTrackDetachedmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2mediastreamtrackdetachedhtml">trunk/Tools/TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/ChangeLog      2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-06-15  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r218365.
+
+        The revision caused API timeouts on all builds.
+
+        Reverted changeset:
+
+        "[WebRTC] Removing a MediaStreamTrack from a MediaStream
+        reports no recording to WebKit clients"
+        https://bugs.webkit.org/show_bug.cgi?id=173398
+        http://trac.webkit.org/changeset/218365
+
</ins><span class="cx"> 2017-06-15  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Allow use of Layout* TextStream operators in WebKit2
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp 2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp    2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -90,6 +90,7 @@
</span><span class="cx">     setIsActive(m_private->active());
</span><span class="cx">     m_private->addObserver(*this);
</span><span class="cx">     MediaStreamRegistry::shared().registerStream(*this);
</span><ins>+    document()->addAudioProducer(this);
</ins><span class="cx">     suspendIfNeeded();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -110,6 +111,7 @@
</span><span class="cx">         track->addObserver(*this);
</span><span class="cx">         m_trackSet.add(track->id(), WTFMove(track));
</span><span class="cx">     }
</span><ins>+    document()->addAudioProducer(this);
</ins><span class="cx">     suspendIfNeeded();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -123,6 +125,7 @@
</span><span class="cx">     for (auto& track : m_trackSet.values())
</span><span class="cx">         track->removeObserver(*this);
</span><span class="cx">     if (Document* document = this->document()) {
</span><ins>+        document->removeAudioProducer(this);
</ins><span class="cx">         if (m_isWaitingUntilMediaCanStart)
</span><span class="cx">             document->removeMediaCanStartListener(this);
</span><span class="cx">     }
</span><span class="lines">@@ -319,16 +322,53 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void MediaStream::pageMutedStateDidChange()
+{
+    if (!m_isActive)
+        return;
+
+    Document* document = this->document();
+    if (!document)
+        return;
+
+    m_private->setCaptureTracksMuted(document->page()->isMediaCaptureMuted());
+}
+
</ins><span class="cx"> MediaProducer::MediaStateFlags MediaStream::mediaState() const
</span><span class="cx"> {
</span><del>-    MediaProducer::MediaStateFlags state = MediaProducer::IsNotPlaying;
</del><ins>+    MediaStateFlags state = IsNotPlaying;
</ins><span class="cx"> 
</span><span class="cx">     if (!m_isActive || !document() || !document()->page())
</span><span class="cx">         return state;
</span><span class="cx"> 
</span><del>-    for (const auto& track : m_trackSet.values())
-        state |= track->mediaState();
</del><ins>+    bool pageCaptureMuted = document()->page()->isMediaCaptureMuted();
+    for (const auto& track : m_trackSet.values()) {
+        if (!track->isCaptureTrack() || track->ended())
+            continue;
</ins><span class="cx"> 
</span><ins>+        if (track->source().type() == RealtimeMediaSource::Type::Audio) {
+            if (track->source().interrupted() && !pageCaptureMuted)
+                state |= HasInterruptedAudioCaptureDevice;
+            else if (track->muted())
+                state |= HasMutedAudioCaptureDevice;
+            else if (m_isProducingData && m_private->isProducingData()) {
+                state |= HasActiveAudioCaptureDevice;
+                ASSERT(!track->source().interrupted());
+                ASSERT(!track->muted());
+            }
+        } else {
+            if (track->source().interrupted() && !pageCaptureMuted)
+                state |= HasInterruptedVideoCaptureDevice;
+            else if (track->muted())
+                state |= HasMutedVideoCaptureDevice;
+            else if (m_isProducingData && m_private->isProducingData()) {
+                state |= HasActiveVideoCaptureDevice;
+                ASSERT(!track->source().interrupted());
+                ASSERT(!track->muted());
+            }
+        }
+    }
+
</ins><span class="cx">     return state;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -339,12 +379,13 @@
</span><span class="cx">     if (Document* document = this->document()) {
</span><span class="cx">         if (m_isActive)
</span><span class="cx">             document->setHasActiveMediaStreamTrack();
</span><ins>+        document->updateIsPlayingMedia();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaStream::characteristicsChanged()
</span><span class="cx"> {
</span><del>-    auto state = mediaState();
</del><ins>+    MediaStateFlags state = mediaState();
</ins><span class="cx">     if (m_state != state) {
</span><span class="cx">         m_state = state;
</span><span class="cx">         statusDidChange();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStream.h (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStream.h   2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStream.h      2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx">     , public ActiveDOMObject
</span><span class="cx">     , public MediaStreamTrack::Observer
</span><span class="cx">     , public MediaStreamPrivate::Observer
</span><ins>+    , private MediaProducer
</ins><span class="cx">     , private MediaCanStartListener
</span><span class="cx">     , private PlatformMediaSessionClient
</span><span class="cx">     , public RefCounted<MediaStream> {
</span><span class="lines">@@ -135,7 +136,9 @@
</span><span class="cx">     void didRemoveTrack(MediaStreamTrackPrivate&) final;
</span><span class="cx">     void characteristicsChanged() final;
</span><span class="cx"> 
</span><del>-    MediaProducer::MediaStateFlags mediaState() const;
</del><ins>+    // MediaProducer
+    void pageMutedStateDidChange() final;
+    MediaProducer::MediaStateFlags mediaState() const final;
</ins><span class="cx"> 
</span><span class="cx">     // MediaCanStartListener
</span><span class="cx">     void mediaCanStart(Document&) final;
</span><span class="lines">@@ -177,7 +180,7 @@
</span><span class="cx">     Vector<Observer*> m_observers;
</span><span class="cx">     std::unique_ptr<PlatformMediaSession> m_mediaSession;
</span><span class="cx"> 
</span><del>-    MediaProducer::MediaStateFlags m_state { MediaProducer::IsNotPlaying };
</del><ins>+    MediaStateFlags m_state { IsNotPlaying };
</ins><span class="cx"> 
</span><span class="cx">     bool m_isActive { false };
</span><span class="cx">     bool m_isProducingData { false };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamTrackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp    2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp       2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx"> 
</span><del>-#include "Document.h"
</del><span class="cx"> #include "Event.h"
</span><span class="cx"> #include "EventNames.h"
</span><span class="cx"> #include "JSOverconstrainedError.h"
</span><span class="lines">@@ -39,7 +38,6 @@
</span><span class="cx"> #include "MediaStreamPrivate.h"
</span><span class="cx"> #include "NotImplemented.h"
</span><span class="cx"> #include "OverconstrainedError.h"
</span><del>-#include "Page.h"
</del><span class="cx"> #include "ScriptExecutionContext.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> 
</span><span class="lines">@@ -54,22 +52,15 @@
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_private(WTFMove(privateTrack))
</span><span class="cx">     , m_weakPtrFactory(this)
</span><del>-    , m_taskQueue(context)
</del><span class="cx"> {
</span><span class="cx">     suspendIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     m_private->addObserver(*this);
</span><del>-
-    if (auto document = this->document())
-        document->addAudioProducer(this);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaStreamTrack::~MediaStreamTrack()
</span><span class="cx"> {
</span><span class="cx">     m_private->removeObserver(*this);
</span><del>-
-    if (auto document = this->document())
-        document->removeAudioProducer(this);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const AtomicString& MediaStreamTrack::kind() const
</span><span class="lines">@@ -294,53 +285,6 @@
</span><span class="cx">     m_observers.removeFirst(&observer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaStreamTrack::pageMutedStateDidChange()
-{
-    if (m_ended || !isCaptureTrack())
-        return;
-
-    Document* document = this->document();
-    if (!document || !document->page())
-        return;
-
-    m_private->setMuted(document->page()->isMediaCaptureMuted());
-}
-
-MediaProducer::MediaStateFlags MediaStreamTrack::mediaState() const
-{
-    if (m_ended || !isCaptureTrack())
-        return IsNotPlaying;
-
-    Document* document = this->document();
-    if (!document || !document->page())
-        return IsNotPlaying;
-
-    bool pageCaptureMuted = document->page()->isMediaCaptureMuted();
-
-    if (source().type() == RealtimeMediaSource::Type::Audio) {
-        if (source().interrupted() && !pageCaptureMuted)
-            return HasInterruptedAudioCaptureDevice;
-        if (muted())
-            return HasMutedAudioCaptureDevice;
-        if (m_private->isProducingData())
-            return HasActiveAudioCaptureDevice;
-    } else {
-        if (source().interrupted() && !pageCaptureMuted)
-            return HasInterruptedVideoCaptureDevice;
-        if (muted())
-            return HasMutedVideoCaptureDevice;
-        if (m_private->isProducingData())
-            return HasActiveVideoCaptureDevice;
-    }
-
-    return IsNotPlaying;
-}
-
-void MediaStreamTrack::trackStarted(MediaStreamTrackPrivate&)
-{
-    configureTrackRendering();
-}
-
</del><span class="cx"> void MediaStreamTrack::trackEnded(MediaStreamTrackPrivate&)
</span><span class="cx"> {
</span><span class="cx">     // http://w3c.github.io/mediacapture-main/#life-cycle
</span><span class="lines">@@ -388,11 +332,6 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaStreamTrack::configureTrackRendering()
</span><span class="cx"> {
</span><del>-    m_taskQueue.enqueueTask([this] {
-        if (auto document = this->document())
-            document->updateIsPlayingMedia();
-    });
-
</del><span class="cx">     // 4.3.1
</span><span class="cx">     // ... media from the source only flows when a MediaStreamTrack object is both unmuted and enabled
</span><span class="cx"> }
</span><span class="lines">@@ -400,7 +339,6 @@
</span><span class="cx"> void MediaStreamTrack::stop()
</span><span class="cx"> {
</span><span class="cx">     stopTrack();
</span><del>-    m_taskQueue.close();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const char* MediaStreamTrack::activeDOMObjectName() const
</span><span class="lines">@@ -423,11 +361,6 @@
</span><span class="cx">     return m_private->audioSourceProvider();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Document* MediaStreamTrack::document() const
-{
-    return downcast<Document>(scriptExecutionContext());
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(MEDIA_STREAM)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamTrackh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h      2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.h 2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -32,10 +32,8 @@
</span><span class="cx"> #include "ActiveDOMObject.h"
</span><span class="cx"> #include "DoubleRange.h"
</span><span class="cx"> #include "EventTarget.h"
</span><del>-#include "GenericTaskQueue.h"
</del><span class="cx"> #include "JSDOMPromiseDeferred.h"
</span><span class="cx"> #include "LongRange.h"
</span><del>-#include "MediaProducer.h"
</del><span class="cx"> #include "MediaStreamTrackPrivate.h"
</span><span class="cx"> #include "MediaTrackConstraints.h"
</span><span class="cx"> 
</span><span class="lines">@@ -42,16 +40,10 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class AudioSourceProvider;
</span><del>-class Document;
</del><span class="cx"> 
</span><span class="cx"> struct MediaTrackConstraints;
</span><span class="cx"> 
</span><del>-class MediaStreamTrack :
-    public RefCounted<MediaStreamTrack>,
-    public ActiveDOMObject,
-    public EventTargetWithInlineData,
-    private MediaProducer,
-    private MediaStreamTrackPrivate::Observer {
</del><ins>+class MediaStreamTrack : public RefCounted<MediaStreamTrack>, public ActiveDOMObject, public EventTargetWithInlineData, private MediaStreamTrackPrivate::Observer {
</ins><span class="cx"> public:
</span><span class="cx">     class Observer {
</span><span class="cx">     public:
</span><span class="lines">@@ -118,15 +110,11 @@
</span><span class="cx">     const MediaTrackConstraints& getConstraints() const { return m_constraints; }
</span><span class="cx">     void applyConstraints(const std::optional<MediaTrackConstraints>&, DOMPromiseDeferred<void>&&);
</span><span class="cx"> 
</span><del>-    RealtimeMediaSource& source() const { return m_private->source(); }
</del><ins>+    RealtimeMediaSource& source() { return m_private->source(); }
</ins><span class="cx">     MediaStreamTrackPrivate& privateTrack() { return m_private.get(); }
</span><span class="cx"> 
</span><span class="cx">     AudioSourceProvider* audioSourceProvider();
</span><span class="cx"> 
</span><del>-    // MediaProducer
-    void pageMutedStateDidChange() final;
-    MediaProducer::MediaStateFlags mediaState() const final;
-
</del><span class="cx">     void addObserver(Observer&);
</span><span class="cx">     void removeObserver(Observer&);
</span><span class="cx"> 
</span><span class="lines">@@ -144,8 +132,6 @@
</span><span class="cx"> 
</span><span class="cx">     void configureTrackRendering();
</span><span class="cx"> 
</span><del>-    Document* document() const;
-
</del><span class="cx">     // ActiveDOMObject API.
</span><span class="cx">     void stop() final;
</span><span class="cx">     const char* activeDOMObjectName() const final;
</span><span class="lines">@@ -158,7 +144,6 @@
</span><span class="cx">     ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
</span><span class="cx"> 
</span><span class="cx">     // MediaStreamTrackPrivate::Observer
</span><del>-    void trackStarted(MediaStreamTrackPrivate&) final;
</del><span class="cx">     void trackEnded(MediaStreamTrackPrivate&) final;
</span><span class="cx">     void trackMutedChanged(MediaStreamTrackPrivate&) final;
</span><span class="cx">     void trackSettingsChanged(MediaStreamTrackPrivate&) final;
</span><span class="lines">@@ -172,7 +157,6 @@
</span><span class="cx">     MediaTrackConstraints m_constraints;
</span><span class="cx">     std::optional<DOMPromiseDeferred<void>> m_promise;
</span><span class="cx">     WeakPtrFactory<MediaStreamTrack> m_weakPtrFactory;
</span><del>-    GenericTaskQueue<ScriptExecutionContext> m_taskQueue;
</del><span class="cx"> 
</span><span class="cx">     bool m_ended { false };
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateMediaStreamAVFObjCh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h  2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h     2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -201,7 +201,6 @@
</span><span class="cx">     void didRemoveTrack(MediaStreamTrackPrivate&) override;
</span><span class="cx"> 
</span><span class="cx">     // MediaStreamPrivateTrack::Observer
</span><del>-    void trackStarted(MediaStreamTrackPrivate&) override { };
</del><span class="cx">     void trackEnded(MediaStreamTrackPrivate&) override { };
</span><span class="cx">     void trackMutedChanged(MediaStreamTrackPrivate&) override { };
</span><span class="cx">     void trackSettingsChanged(MediaStreamTrackPrivate&) override { };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaStreamPrivatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp 2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp    2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -281,13 +281,6 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaStreamPrivate::trackStarted(MediaStreamTrackPrivate&)
-{
-    scheduleDeferredTask([this] {
-        characteristicsChanged();
-    });
-}
-
</del><span class="cx"> void MediaStreamPrivate::trackEnded(MediaStreamTrackPrivate&)
</span><span class="cx"> {
</span><span class="cx">     scheduleDeferredTask([this] {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaStreamPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h   2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamPrivate.h      2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -125,7 +125,6 @@
</span><span class="cx">     MediaStreamPrivate(const MediaStreamTrackPrivateVector&, String&&);
</span><span class="cx"> 
</span><span class="cx">     // MediaStreamTrackPrivate::Observer
</span><del>-    void trackStarted(MediaStreamTrackPrivate&) override;
</del><span class="cx">     void trackEnded(MediaStreamTrackPrivate&) override;
</span><span class="cx">     void trackMutedChanged(MediaStreamTrackPrivate&) override;
</span><span class="cx">     void trackSettingsChanged(MediaStreamTrackPrivate&) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaStreamTrackPrivatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp    2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp       2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -151,12 +151,6 @@
</span><span class="cx">     return m_source->audioSourceProvider();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void MediaStreamTrackPrivate::sourceStarted()
-{
-    for (auto& observer : m_observers)
-        observer->trackStarted(*this);
-}
-
</del><span class="cx"> void MediaStreamTrackPrivate::sourceStopped()
</span><span class="cx"> {
</span><span class="cx">     if (m_isEnded)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaStreamTrackPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h      2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.h 2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx">     public:
</span><span class="cx">         virtual ~Observer() { }
</span><span class="cx"> 
</span><del>-        virtual void trackStarted(MediaStreamTrackPrivate&) { };
</del><span class="cx">         virtual void trackEnded(MediaStreamTrackPrivate&) = 0;
</span><span class="cx">         virtual void trackMutedChanged(MediaStreamTrackPrivate&) = 0;
</span><span class="cx">         virtual void trackSettingsChanged(MediaStreamTrackPrivate&) = 0;
</span><span class="lines">@@ -103,7 +102,6 @@
</span><span class="cx">     MediaStreamTrackPrivate(Ref<RealtimeMediaSource>&&, String&& id);
</span><span class="cx"> 
</span><span class="cx">     // RealtimeMediaSourceObserver
</span><del>-    void sourceStarted() final;
</del><span class="cx">     void sourceStopped() final;
</span><span class="cx">     void sourceMutedChanged() final;
</span><span class="cx">     void sourceEnabledChanged() final;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamRealtimeMediaSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp        2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp   2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -162,9 +162,6 @@
</span><span class="cx"> 
</span><span class="cx">     m_isProducingData = true;
</span><span class="cx">     startProducingData();
</span><del>-
-    for (Observer& observer : m_observers)
-        observer.sourceStarted();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RealtimeMediaSource::stop()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamRealtimeMediaSourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h  2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSource.h     2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -70,7 +70,6 @@
</span><span class="cx">         virtual ~Observer() { }
</span><span class="cx">         
</span><span class="cx">         // Source state changes.
</span><del>-        virtual void sourceStarted() { }
</del><span class="cx">         virtual void sourceStopped() { }
</span><span class="cx">         virtual void sourceMutedChanged() { }
</span><span class="cx">         virtual void sourceEnabledChanged() { }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Tools/ChangeLog       2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-06-15  Matt Lewis  <jlewis3@apple.com>
+
+        Unreviewed, rolling out r218365.
+
+        The revision caused API timeouts on all builds.
+
+        Reverted changeset:
+
+        "[WebRTC] Removing a MediaStreamTrack from a MediaStream
+        reports no recording to WebKit clients"
+        https://bugs.webkit.org/show_bug.cgi?id=173398
+        http://trac.webkit.org/changeset/218365
+
</ins><span class="cx"> 2017-06-15  Jer Noble  <jer.noble@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [WebRTC] Removing a MediaStreamTrack from a MediaStream reports no recording to WebKit clients
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj   2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -601,8 +601,6 @@
</span><span class="cx">          CDC8E4951BC6F10800594FEC /* video-with-audio.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDC8E48A1BC5C96200594FEC /* video-with-audio.mp4 */; };
</span><span class="cx">          CDC8E4961BC6F10800594FEC /* video-without-audio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDC8E48B1BC5C96200594FEC /* video-without-audio.html */; };
</span><span class="cx">          CDC8E4971BC6F10800594FEC /* video-without-audio.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDC8E48C1BC5C96200594FEC /* video-without-audio.mp4 */; };
</span><del>-               CDC9442E1EF1FC080059C3C4 /* MediaStreamTrackDetached.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC9442C1EF1FC080059C3C4 /* MediaStreamTrackDetached.mm */; };
-               CDC9442F1EF205D60059C3C4 /* mediastreamtrack-detached.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDC9442B1EF1FBD20059C3C4 /* mediastreamtrack-detached.html */; };
</del><span class="cx">           CDCFA7AA1E45183200C2433D /* SampleMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDCFA7A91E45122F00C2433D /* SampleMap.cpp */; };
</span><span class="cx">          CDE195B51CFE0B880053D256 /* FullscreenTopContentInset.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CDE195B21CFE0ADE0053D256 /* FullscreenTopContentInset.html */; };
</span><span class="cx">          CE06DF9B1E1851F200E570C9 /* SecurityOrigin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE06DF9A1E1851F200E570C9 /* SecurityOrigin.cpp */; };
</span><span class="lines">@@ -711,7 +709,6 @@
</span><span class="cx">                  dstPath = TestWebKitAPI.resources;
</span><span class="cx">                  dstSubfolderSpec = 7;
</span><span class="cx">                  files = (
</span><del>-                               CDC9442F1EF205D60059C3C4 /* mediastreamtrack-detached.html in Copy Resources */,
</del><span class="cx">                           F46849C01EEF5EF300B937FE /* rich-and-plain-text.html in Copy Resources */,
</span><span class="cx">                          93E2D2761ED7D53200FA76F6 /* offscreen-iframe-of-media-document.html in Copy Resources */,
</span><span class="cx">                          F46A095A1ED8A6E600D4AA55 /* apple.gif in Copy Resources */,
</span><span class="lines">@@ -1526,8 +1523,6 @@
</span><span class="cx">          CDC8E48A1BC5C96200594FEC /* video-with-audio.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = "video-with-audio.mp4"; sourceTree = "<group>"; };
</span><span class="cx">          CDC8E48B1BC5C96200594FEC /* video-without-audio.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "video-without-audio.html"; sourceTree = "<group>"; };
</span><span class="cx">          CDC8E48C1BC5C96200594FEC /* video-without-audio.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = "video-without-audio.mp4"; sourceTree = "<group>"; };
</span><del>-               CDC9442B1EF1FBD20059C3C4 /* mediastreamtrack-detached.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "mediastreamtrack-detached.html"; sourceTree = "<group>"; };
-               CDC9442C1EF1FC080059C3C4 /* MediaStreamTrackDetached.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaStreamTrackDetached.mm; sourceTree = "<group>"; };
</del><span class="cx">           CDCFA7A91E45122F00C2433D /* SampleMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleMap.cpp; sourceTree = "<group>"; };
</span><span class="cx">          CDE195B21CFE0ADE0053D256 /* FullscreenTopContentInset.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = FullscreenTopContentInset.html; sourceTree = "<group>"; };
</span><span class="cx">          CDE195B31CFE0ADE0053D256 /* FullscreenTopContentInset.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FullscreenTopContentInset.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -2168,7 +2163,6 @@
</span><span class="cx">                          33DC8910141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp */,
</span><span class="cx">                          33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */,
</span><span class="cx">                          8AA28C1916D2FA7B002FF4DB /* LoadPageOnCrash.cpp */,
</span><del>-                               CDC9442C1EF1FC080059C3C4 /* MediaStreamTrackDetached.mm */,
</del><span class="cx">                           7A5623101AD5AF3E0096B920 /* MenuTypesForMouseEvents.cpp */,
</span><span class="cx">                          51CB4AD71B3A079C00C1B1C6 /* ModalAlertsSPI.cpp */,
</span><span class="cx">                          33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */,
</span><span class="lines">@@ -2353,7 +2347,6 @@
</span><span class="cx">                          930AD401150698B30067970F /* lots-of-text.html */,
</span><span class="cx">                          5797FE321EB15A8900B2F4A0 /* navigation-client-default-crypto.html */,
</span><span class="cx">                          AD57AC1D1DA7463800FF1BDE /* many-iframes.html */,
</span><del>-                               CDC9442B1EF1FBD20059C3C4 /* mediastreamtrack-detached.html */,
</del><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><span class="lines">@@ -2914,7 +2907,6 @@
</span><span class="cx">                          51D1249B1E785425002B2820 /* CookieManager.cpp in Sources */,
</span><span class="cx">                          7CCE7EAC1A411A3400447C4C /* Counters.cpp in Sources */,
</span><span class="cx">                          7AEAD47F1E20116C00416EFE /* CrossPartitionFileSchemeAccess.mm in Sources */,
</span><del>-                               CDC9442E1EF1FC080059C3C4 /* MediaStreamTrackDetached.mm in Sources */,
</del><span class="cx">                           7CCE7EDB1A411A9200447C4C /* CSSParser.cpp in Sources */,
</span><span class="cx">                          7CCE7F291A411B1000447C4C /* CustomProtocolsInvalidScheme.mm in Sources */,
</span><span class="cx">                          7CCE7F2A1A411B1000447C4C /* CustomProtocolsSyncXHRTest.mm in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2MediaStreamTrackDetachedmm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm      2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/MediaStreamTrackDetached.mm 2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -1,90 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-
-#if WK_API_ENABLED
-
-#if ENABLE(MEDIA_STREAM)
-
-#import "PlatformUtilities.h"
-#import "Test.h"
-#import "TestWKWebView.h"
-#import <WebKit/WKPreferencesPrivate.h>
-#import <WebKit/WKUIDelegatePrivate.h>
-#import <WebKit/WKWebViewConfiguration.h>
-#import <WebKit/_WKProcessPoolConfiguration.h>
-
-static bool hasRecievedCorrectCaptureState = false;
-
-@interface MediaStreamTrackDetachedUIDelegate : NSObject<WKUIDelegate>
-- (void)_webView:(WKWebView *)webView requestUserMediaAuthorizationForDevices:(_WKCaptureDevices)devices url:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL decisionHandler:(void (^)(BOOL authorized))decisionHandler;
-- (void)_webView:(WKWebView *)webView checkUserMediaPermissionForURL:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL frameIdentifier:(NSUInteger)frameIdentifier decisionHandler:(void (^)(NSString *salt, BOOL authorized))decisionHandler;
-- (void)_webView:(WKWebView *)webView mediaCaptureStateDidChange:(_WKMediaCaptureState)state;
-@end
-
-@implementation MediaStreamTrackDetachedUIDelegate
-- (void)_webView:(WKWebView *)webView requestUserMediaAuthorizationForDevices:(_WKCaptureDevices)devices url:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL decisionHandler:(void (^)(BOOL authorized))decisionHandler
-{
-    decisionHandler(YES);
-}
-
-- (void)_webView:(WKWebView *)webView checkUserMediaPermissionForURL:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL frameIdentifier:(NSUInteger)frameIdentifier decisionHandler:(void (^)(NSString *salt, BOOL authorized))decisionHandler
-{
-    decisionHandler(@"0x987654321", YES);
-}
-- (void)_webView:(WKWebView *)webView mediaCaptureStateDidChange:(_WKMediaCaptureState)state
-{
-    if (state == _WKMediaCaptureStateActiveMicrophone)
-        hasRecievedCorrectCaptureState = true;
-}
-@end
-
-namespace TestWebKitAPI {
-
-TEST(WebKit2, MediaStreamTrackDetached)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    auto processPoolConfig = adoptNS([[_WKProcessPoolConfiguration alloc] init]);
-    auto preferences = [configuration preferences];
-    preferences._mediaCaptureRequiresSecureConnection = NO;
-    preferences._mediaDevicesEnabled = YES;
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500) configuration:configuration.get() processPoolConfiguration:processPoolConfig.get()]);
-    auto delegate = adoptNS([[MediaStreamTrackDetachedUIDelegate alloc] init]);
-    webView.get().UIDelegate = delegate.get();
-
-    hasRecievedCorrectCaptureState = false;
-    [webView loadTestPageNamed:@"mediastreamtrack-detached"];
-
-    TestWebKitAPI::Util::run(&hasRecievedCorrectCaptureState);
-
-
-}
-
-} // namespace TestWebKitAPI
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // WK_API_ENABLED
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2mediastreamtrackdetachedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html (218368 => 218369)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html   2017-06-15 23:49:12 UTC (rev 218368)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/mediastreamtrack-detached.html      2017-06-16 00:16:36 UTC (rev 218369)
</span><span class="lines">@@ -1,23 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<script>
-var audioTrack;
-
-function go() {
-    var constraints = { audio: true, video: true};
-    navigator.mediaDevices.getUserMedia(constraints).then(gotUserMedia);
-}
-
-function gotUserMedia(stream) {
-    audioTrack = stream.getAudioTracks()[0];
-    stream.removeTrack(audioTrack);
-
-    stream.getTracks().forEach(track => { track.stop(); });
-}
-</script>
-</head>
-<body onload="go()">
-    <div>This tests the behavior of the media capture indicator when a live MediaStreamTrack is removed from a MediaStream, and all the other tracks are stopped. The page should request access to the camera and microphone, and then display a audio-capture icon. If the page displays a camera icon or no capture icon at all, the test has failed.</div>
-</body>
-</html>
</del><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>