<!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>[245319] branches/safari-608.1.24-branch/Source/WebKit</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/245319">245319</a></dd>
<dt>Author</dt> <dd>kocsen_chung@apple.com</dd>
<dt>Date</dt> <dd>2019-05-14 22:24:03 -0700 (Tue, 14 May 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Cherry-pick <a href="http://trac.webkit.org/projects/webkit/changeset/245255">r245255</a>. rdar://problem/50141840

    Take out MediaPlayback UI assertion when any WebProcess is playing audible media
    https://bugs.webkit.org/show_bug.cgi?id=197798

    Reviewed by Chris Dumez.

    To keep the system from suspending the UIProcess (and all the other constellation of processes that
    are necessary to play media), take a UIProcess assertion with the MediaPlayback reason whenever there
    is a WebContent process that is playing audible media.

    * Platform/spi/ios/AssertionServicesSPI.h:
    * UIProcess/ProcessAssertion.h:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::updatePlayingMediaDidChange):
    * UIProcess/WebProcessPool.cpp:
    (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):
    (WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):
    * UIProcess/WebProcessPool.h:
    * UIProcess/WebProcessProxy.cpp:
    (WebKit::WebProcessProxy::webPageMediaStateDidChange):
    * UIProcess/WebProcessProxy.h:
    * UIProcess/ios/ProcessAssertionIOS.mm:
    (WebKit::toBKSProcessAssertionReason):
    (WebKit::ProcessAssertion::ProcessAssertion):
    * WebProcess/WebProcess.h:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245255 268f45cc-cd09-0410-ab3c-d52691b4dbfc</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari608124branchSourceWebKitChangeLog">branches/safari-608.1.24-branch/Source/WebKit/ChangeLog</a></li>
<li><a href="#branchessafari608124branchSourceWebKitPlatformspiiosAssertionServicesSPIh">branches/safari-608.1.24-branch/Source/WebKit/Platform/spi/ios/AssertionServicesSPI.h</a></li>
<li><a href="#branchessafari608124branchSourceWebKitUIProcessProcessAssertionh">branches/safari-608.1.24-branch/Source/WebKit/UIProcess/ProcessAssertion.h</a></li>
<li><a href="#branchessafari608124branchSourceWebKitUIProcessWebPageProxycpp">branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#branchessafari608124branchSourceWebKitUIProcessWebProcessPoolcpp">branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#branchessafari608124branchSourceWebKitUIProcessWebProcessPoolh">branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessPool.h</a></li>
<li><a href="#branchessafari608124branchSourceWebKitUIProcessWebProcessProxycpp">branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#branchessafari608124branchSourceWebKitUIProcessWebProcessProxyh">branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.h</a></li>
<li><a href="#branchessafari608124branchSourceWebKitUIProcessiosProcessAssertionIOSmm">branches/safari-608.1.24-branch/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari608124branchSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/ChangeLog (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/ChangeLog  2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/ChangeLog     2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -1,3 +1,62 @@
</span><ins>+2019-05-14  Kocsen Chung  <kocsen_chung@apple.com>
+
+        Cherry-pick r245255. rdar://problem/50141840
+
+    Take out MediaPlayback UI assertion when any WebProcess is playing audible media
+    https://bugs.webkit.org/show_bug.cgi?id=197798
+    
+    Reviewed by Chris Dumez.
+    
+    To keep the system from suspending the UIProcess (and all the other constellation of processes that
+    are necessary to play media), take a UIProcess assertion with the MediaPlayback reason whenever there
+    is a WebContent process that is playing audible media.
+    
+    * Platform/spi/ios/AssertionServicesSPI.h:
+    * UIProcess/ProcessAssertion.h:
+    * UIProcess/WebPageProxy.cpp:
+    (WebKit::WebPageProxy::updatePlayingMediaDidChange):
+    * UIProcess/WebProcessPool.cpp:
+    (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):
+    (WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):
+    * UIProcess/WebProcessPool.h:
+    * UIProcess/WebProcessProxy.cpp:
+    (WebKit::WebProcessProxy::webPageMediaStateDidChange):
+    * UIProcess/WebProcessProxy.h:
+    * UIProcess/ios/ProcessAssertionIOS.mm:
+    (WebKit::toBKSProcessAssertionReason):
+    (WebKit::ProcessAssertion::ProcessAssertion):
+    * WebProcess/WebProcess.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-05-13  Jer Noble  <jer.noble@apple.com>
+
+            Take out MediaPlayback UI assertion when any WebProcess is playing audible media
+            https://bugs.webkit.org/show_bug.cgi?id=197798
+
+            Reviewed by Chris Dumez.
+
+            To keep the system from suspending the UIProcess (and all the other constellation of processes that
+            are necessary to play media), take a UIProcess assertion with the MediaPlayback reason whenever there
+            is a WebContent process that is playing audible media.
+
+            * Platform/spi/ios/AssertionServicesSPI.h:
+            * UIProcess/ProcessAssertion.h:
+            * UIProcess/WebPageProxy.cpp:
+            (WebKit::WebPageProxy::updatePlayingMediaDidChange):
+            * UIProcess/WebProcessPool.cpp:
+            (WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):
+            (WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):
+            * UIProcess/WebProcessPool.h:
+            * UIProcess/WebProcessProxy.cpp:
+            (WebKit::WebProcessProxy::webPageMediaStateDidChange):
+            * UIProcess/WebProcessProxy.h:
+            * UIProcess/ios/ProcessAssertionIOS.mm:
+            (WebKit::toBKSProcessAssertionReason):
+            (WebKit::ProcessAssertion::ProcessAssertion):
+            * WebProcess/WebProcess.h:
+
</ins><span class="cx"> 2019-05-14  Alan Coon  <alancoon@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Cherry-pick r245298. rdar://problem/50665984
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebKitPlatformspiiosAssertionServicesSPIh"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/Platform/spi/ios/AssertionServicesSPI.h (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/Platform/spi/ios/AssertionServicesSPI.h    2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/Platform/spi/ios/AssertionServicesSPI.h       2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> typedef uint32_t BKSProcessAssertionFlags;
</span><span class="cx"> 
</span><span class="cx"> enum {
</span><ins>+    BKSProcessAssertionReasonMediaPlayback = 1,
</ins><span class="cx">     BKSProcessAssertionReasonFinishTask = 4,
</span><span class="cx">     BKSProcessAssertionReasonExtension = 13,
</span><span class="cx">     BKSProcessAssertionReasonFinishTaskUnbounded = 10004,
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebKitUIProcessProcessAssertionh"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/UIProcess/ProcessAssertion.h (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/UIProcess/ProcessAssertion.h       2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/UIProcess/ProcessAssertion.h  2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx">     Extension,
</span><span class="cx">     FinishTask,
</span><span class="cx">     FinishTaskUnbounded,
</span><ins>+    MediaPlayback,
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class ProcessAssertion : public CanMakeWeakPtr<ProcessAssertion> {
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebPageProxy.cpp    2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -1038,6 +1038,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     stopAllURLSchemeTasks();
</span><ins>+    updatePlayingMediaDidChange(MediaProducer::IsNotPlaying);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebPageProxy::tryClose()
</span><span class="lines">@@ -7053,6 +7054,8 @@
</span><span class="cx">         m_pageLoadState.reset(transaction);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    updatePlayingMediaDidChange(MediaProducer::IsNotPlaying);
+
</ins><span class="cx">     // FIXME: <rdar://problem/38676604> In case of process swaps, the old process should gracefully suspend instead of terminating.
</span><span class="cx">     m_process->processTerminated();
</span><span class="cx"> }
</span><span class="lines">@@ -8074,7 +8077,8 @@
</span><span class="cx">     ASSERT(focusManager);
</span><span class="cx">     focusManager->updatePlaybackAttributesFromMediaState(this, sourceElementID, newState);
</span><span class="cx"> #endif
</span><del>-    updatePlayingMediaDidChange(newState);
</del><ins>+    if (!m_isClosed)
+        updatePlayingMediaDidChange(newState);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::updatePlayingMediaDidChange(MediaProducer::MediaStateFlags newState)
</span><span class="lines">@@ -8112,6 +8116,8 @@
</span><span class="cx"> 
</span><span class="cx">     if ((oldState & MediaProducer::HasAudioOrVideo) != (m_mediaState & MediaProducer::HasAudioOrVideo))
</span><span class="cx">         videoControlsManagerDidChange();
</span><ins>+
+    m_process->webPageMediaStateDidChange(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::videoControlsManagerDidChange()
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebKitUIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessPool.cpp (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessPool.cpp       2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessPool.cpp  2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -1100,6 +1100,7 @@
</span><span class="cx"> void WebProcessPool::disconnectProcess(WebProcessProxy* process)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_processes.contains(process));
</span><ins>+    ASSERT(!m_processesPlayingAudibleMedia.contains(process->coreProcessIdentifier()));
</ins><span class="cx"> 
</span><span class="cx">     if (m_prewarmedProcess == process) {
</span><span class="cx">         ASSERT(m_prewarmedProcess->isPrewarmed());
</span><span class="lines">@@ -2575,4 +2576,40 @@
</span><span class="cx">     
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebProcessPool::setWebProcessIsPlayingAudibleMedia(WebCore::ProcessIdentifier processID)
+{
+    auto* process = WebProcessProxy::processForIdentifier(processID);
+    ASSERT(process);
+
+    RELEASE_LOG(ProcessSuspension, "Web process pid %u is now playing audible media", (unsigned)process->processIdentifier());
+
+    if (m_processesPlayingAudibleMedia.isEmpty()) {
+        RELEASE_LOG(ProcessSuspension, "The number of processes playing audible media is now one. Taking UI process assertion.");
+
+        ASSERT(!m_uiProcessMediaPlaybackAssertion);
+        m_uiProcessMediaPlaybackAssertion = std::make_unique<ProcessAssertion>(getCurrentProcessID(), "WebKit Media Playback"_s, AssertionState::Foreground, AssertionReason::MediaPlayback);
+    }
+
+    auto result = m_processesPlayingAudibleMedia.add(processID, nullptr);
+    ASSERT(result.isNewEntry);
+    result.iterator->value = std::make_unique<ProcessAssertion>(process->processIdentifier(), "WebKit Media Playback"_s, AssertionState::Foreground, AssertionReason::MediaPlayback);
+}
+
+void WebProcessPool::clearWebProcessIsPlayingAudibleMedia(WebCore::ProcessIdentifier processID)
+{
+    auto result = m_processesPlayingAudibleMedia.take(processID);
+    ASSERT_UNUSED(result, result);
+
+    auto* process = WebProcessProxy::processForIdentifier(processID);
+    ASSERT(process);
+    RELEASE_LOG(ProcessSuspension, "Web process pid %u is no longer playing audible media", (unsigned)process->processIdentifier());
+
+    if (m_processesPlayingAudibleMedia.isEmpty()) {
+        RELEASE_LOG(ProcessSuspension, "The number of processes playing audible media now zero. Releasing UI process assertion.");
+
+        ASSERT(m_uiProcessMediaPlaybackAssertion);
+        m_uiProcessMediaPlaybackAssertion = nullptr;
+    }
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebKitUIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessPool.h (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessPool.h 2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessPool.h    2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -505,6 +505,9 @@
</span><span class="cx">     void setWebProcessHasUploads(WebCore::ProcessIdentifier);
</span><span class="cx">     void clearWebProcessHasUploads(WebCore::ProcessIdentifier);
</span><span class="cx"> 
</span><ins>+    void setWebProcessIsPlayingAudibleMedia(WebCore::ProcessIdentifier);
+    void clearWebProcessIsPlayingAudibleMedia(WebCore::ProcessIdentifier);
+
</ins><span class="cx">     void disableDelayedWebProcessLaunch() { m_isDelayedWebProcessLaunchDisabled = true; }
</span><span class="cx"> 
</span><span class="cx">     void removeCredential(WebCore::Credential&&, WebCore::ProtectionSpace&&, CompletionHandler<void()>&&);
</span><span class="lines">@@ -790,6 +793,10 @@
</span><span class="cx"> 
</span><span class="cx">     HashMap<WebCore::ProcessIdentifier, std::unique_ptr<ProcessAssertion>> m_processesWithUploads;
</span><span class="cx">     std::unique_ptr<ProcessAssertion> m_uiProcessUploadAssertion;
</span><ins>+
+    HashMap<WebCore::ProcessIdentifier, std::unique_ptr<ProcessAssertion>> m_processesPlayingAudibleMedia;
+    std::unique_ptr<ProcessAssertion> m_uiProcessMediaPlaybackAssertion;
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     // FIXME: Delayed process launch is currently disabled on iOS for performance reasons (rdar://problem/49074131).
</span><span class="cx">     bool m_isDelayedWebProcessLaunchDisabled { true };
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebKitUIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp      2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp 2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -1216,7 +1216,20 @@
</span><span class="cx">     UNUSED_PARAM(state);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><del>-    
</del><ins>+
+void WebProcessProxy::webPageMediaStateDidChange(WebPageProxy&)
+{
+    bool newHasAudibleWebPage = WTF::anyOf(m_pageMap.values(), [] (auto& page) { return page->isPlayingAudio(); });
+    if (m_hasAudibleWebPage == newHasAudibleWebPage)
+        return;
+    m_hasAudibleWebPage = newHasAudibleWebPage;
+
+    if (m_hasAudibleWebPage)
+        processPool().setWebProcessIsPlayingAudibleMedia(coreProcessIdentifier());
+    else
+        processPool().clearWebProcessIsPlayingAudibleMedia(coreProcessIdentifier());
+}
+
</ins><span class="cx"> void WebProcessProxy::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
</span><span class="cx"> {
</span><span class="cx">     if (!isHoldingLockedFiles) {
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebKitUIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.h (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.h        2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/UIProcess/WebProcessProxy.h   2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -306,6 +306,8 @@
</span><span class="cx">     void processWasUnexpectedlyUnsuspended(CompletionHandler<void()>&&);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    void webPageMediaStateDidChange(WebPageProxy&);
+
</ins><span class="cx"> protected:
</span><span class="cx">     static uint64_t generatePageID();
</span><span class="cx">     WebProcessProxy(WebProcessPool&, WebsiteDataStore*, IsPrewarmed);
</span><span class="lines">@@ -485,6 +487,7 @@
</span><span class="cx">     unsigned m_suspendedPageCount { 0 };
</span><span class="cx">     bool m_hasCommittedAnyProvisionalLoads { false };
</span><span class="cx">     bool m_isPrewarmed;
</span><ins>+    bool m_hasAudibleWebPage { false };
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WATCHOS)
</span><span class="cx">     ProcessThrottler::BackgroundActivityToken m_backgroundActivityTokenForFullscreenFormControls;
</span></span></pre></div>
<a id="branchessafari608124branchSourceWebKitUIProcessiosProcessAssertionIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-608.1.24-branch/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm (245318 => 245319)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-608.1.24-branch/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm       2019-05-15 05:23:57 UTC (rev 245318)
+++ branches/safari-608.1.24-branch/Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm  2019-05-15 05:24:03 UTC (rev 245319)
</span><span class="lines">@@ -181,6 +181,8 @@
</span><span class="cx">         return BKSProcessAssertionReasonFinishTask;
</span><span class="cx">     case AssertionReason::FinishTaskUnbounded:
</span><span class="cx">         return BKSProcessAssertionReasonFinishTaskUnbounded;
</span><ins>+    case AssertionReason::MediaPlayback:
+        return BKSProcessAssertionReasonMediaPlayback;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>