<!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>[209747] trunk/Source</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/209747">209747</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2016-12-12 16:45:37 -0800 (Mon, 12 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS] MediaDocument &quot;Done&quot; button should navigate the page back
https://bugs.webkit.org/show_bug.cgi?id=165779

Reviewed by Sam Weinig.

Source/WebCore:

Detect if the exit from fullscreen was caused by the Done button,
and if so, tell the page to navigate back.

Unfortunately this is not yet testable. It's waiting on the
UI-based device testing in development by the media team.

* platform/cocoa/WebVideoFullscreenModel.h: Add a finishedWithMedia parameter to
requestFullscreenMode, to indicate if the change in mode is associated with
the closing of the media document.
* platform/cocoa/WebVideoFullscreenModelVideoElement.h:
* platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::requestFullscreenMode): If we're a media
document, and we say we're finished with the media, tell the document
to navigate back a page.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::requestFullscreenMode):
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenModelContext::requestFullscreenMode):
(WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode):
* WebProcess/cocoa/WebVideoFullscreenManager.h:
* WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::requestFullscreenMode):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelh">trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelVideoElementh">trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelVideoElementmm">trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebVideoFullscreenControllerAVKitmm">trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformiosWebVideoFullscreenInterfaceAVKitmm">trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebVideoFullscreenManagerProxyh">trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebVideoFullscreenManagerProxymm">trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagerh">trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagermessagesin">trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagermm">trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebCore/ChangeLog        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2016-12-12  Dean Jackson  &lt;dino@apple.com&gt;
+
+        [iOS] MediaDocument &quot;Done&quot; button should navigate the page back
+        https://bugs.webkit.org/show_bug.cgi?id=165779
+
+        Reviewed by Sam Weinig.
+
+        Detect if the exit from fullscreen was caused by the Done button,
+        and if so, tell the page to navigate back.
+
+        Unfortunately this is not yet testable. It's waiting on the
+        UI-based device testing in development by the media team.
+
+        * platform/cocoa/WebVideoFullscreenModel.h: Add a finishedWithMedia parameter to
+        requestFullscreenMode, to indicate if the change in mode is associated with
+        the closing of the media document.
+        * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
+        * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
+        (WebVideoFullscreenModelVideoElement::requestFullscreenMode): If we're a media
+        document, and we say we're finished with the media, tell the document
+        to navigate back a page.
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        (WebVideoFullscreenControllerContext::requestFullscreenMode):
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
+
</ins><span class="cx"> 2016-12-12  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Infinite recursion when viewport is set to the size of the content but the content overflows the viewport.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     virtual void addClient(WebVideoFullscreenModelClient&amp;) = 0;
</span><span class="cx">     virtual void removeClient(WebVideoFullscreenModelClient&amp;)= 0;
</span><span class="cx"> 
</span><del>-    virtual void requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode) = 0;
</del><ins>+    virtual void requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode, bool finishedWithMedia = false) = 0;
</ins><span class="cx">     virtual void setVideoLayerFrame(FloatRect) = 0;
</span><span class="cx">     enum VideoGravity { VideoGravityResize, VideoGravityResizeAspect, VideoGravityResizeAspectFill };
</span><span class="cx">     virtual void setVideoLayerGravity(VideoGravity) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelVideoElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void addClient(WebVideoFullscreenModelClient&amp;) override;
</span><span class="cx">     WEBCORE_EXPORT void removeClient(WebVideoFullscreenModelClient&amp;) override;
</span><del>-    WEBCORE_EXPORT void requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode) override;
</del><ins>+    WEBCORE_EXPORT void requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode, bool finishedWithMedia = false) override;
</ins><span class="cx">     WEBCORE_EXPORT void setVideoLayerFrame(FloatRect) override;
</span><span class="cx">     WEBCORE_EXPORT void setVideoLayerGravity(VideoGravity) override;
</span><span class="cx">     WEBCORE_EXPORT void fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaWebVideoFullscreenModelVideoElementmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -28,6 +28,8 @@
</span><span class="cx"> #if PLATFORM(IOS) || (PLATFORM(MAC) &amp;&amp; ENABLE(VIDEO_PRESENTATION_MODE))
</span><span class="cx"> #import &quot;WebVideoFullscreenModelVideoElement.h&quot;
</span><span class="cx"> 
</span><ins>+#import &quot;DOMWindow.h&quot;
+#import &quot;History.h&quot;
</ins><span class="cx"> #import &quot;Logging.h&quot;
</span><span class="cx"> #import &quot;MediaControlsHost.h&quot;
</span><span class="cx"> #import &quot;WebPlaybackSessionModelMediaElement.h&quot;
</span><span class="lines">@@ -134,10 +136,19 @@
</span><span class="cx">     m_videoElement-&gt;waitForPreparedForInlineThen(completionHandler);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebVideoFullscreenModelVideoElement::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode)
</del><ins>+void WebVideoFullscreenModelVideoElement::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode, bool finishedWithMedia)
</ins><span class="cx"> {
</span><span class="cx">     if (m_videoElement &amp;&amp; m_videoElement-&gt;fullscreenMode() != mode)
</span><span class="cx">         m_videoElement-&gt;setFullscreenMode(mode);
</span><ins>+
+    if (m_videoElement &amp;&amp; finishedWithMedia &amp;&amp; mode == MediaPlayerEnums::VideoFullscreenModeNone) {
+        if (m_videoElement-&gt;document().isMediaDocument()) {
+            if (DOMWindow* window = m_videoElement-&gt;document().domWindow()) {
+                if (History* history = window-&gt;history())
+                    history-&gt;back();
+            }
+        }
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebVideoFullscreenModelVideoElement::setVideoLayerFrame(FloatRect rect)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebVideoFullscreenControllerAVKitmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">     // WebVideoFullscreenModel
</span><span class="cx">     void addClient(WebVideoFullscreenModelClient&amp;) override;
</span><span class="cx">     void removeClient(WebVideoFullscreenModelClient&amp;) override;
</span><del>-    void requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode) override;
</del><ins>+    void requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode, bool finishedWithMedia = false) override;
</ins><span class="cx">     void setVideoLayerFrame(FloatRect) override;
</span><span class="cx">     void setVideoLayerGravity(WebVideoFullscreenModel::VideoGravity) override;
</span><span class="cx">     void fullscreenModeChanged(HTMLMediaElementEnums::VideoFullscreenMode) override;
</span><span class="lines">@@ -444,13 +444,13 @@
</span><span class="cx">     m_fullscreenClients.remove(&amp;client);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebVideoFullscreenControllerContext::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode)
</del><ins>+void WebVideoFullscreenControllerContext::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode, bool finishedWithMedia)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isUIThread());
</span><span class="cx">     RefPtr&lt;WebVideoFullscreenControllerContext&gt; protectedThis(this);
</span><del>-    WebThreadRun([protectedThis, this, mode] {
</del><ins>+    WebThreadRun([protectedThis, this, mode, finishedWithMedia] {
</ins><span class="cx">         if (m_fullscreenModel)
</span><del>-            m_fullscreenModel-&gt;requestFullscreenMode(mode);
</del><ins>+            m_fullscreenModel-&gt;requestFullscreenMode(mode, finishedWithMedia);
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosWebVideoFullscreenInterfaceAVKitmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -982,9 +982,8 @@
</span><span class="cx">     if (webPlaybackSessionModel() &amp;&amp; (reason == ExitFullScreenReason::DoneButtonTapped || reason == ExitFullScreenReason::RemoteControlStopEventReceived))
</span><span class="cx">         webPlaybackSessionModel()-&gt;pause();
</span><span class="cx">     
</span><ins>+    m_videoFullscreenModel-&gt;requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenModeNone, reason == ExitFullScreenReason::DoneButtonTapped);
</ins><span class="cx"> 
</span><del>-    m_videoFullscreenModel-&gt;requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenModeNone);
-
</del><span class="cx">     if (!m_watchdogTimer.isActive())
</span><span class="cx">         m_watchdogTimer.startOneShot(DefaultWatchdogTimerInterval);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebKit2/ChangeLog        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-12-12  Dean Jackson  &lt;dino@apple.com&gt;
+
+        [iOS] MediaDocument &quot;Done&quot; button should navigate the page back
+        https://bugs.webkit.org/show_bug.cgi?id=165779
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
+        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
+        (WebKit::WebVideoFullscreenModelContext::requestFullscreenMode):
+        (WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode):
+        * WebProcess/cocoa/WebVideoFullscreenManager.h:
+        * WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
+        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
+        (WebKit::WebVideoFullscreenManager::requestFullscreenMode):
+
</ins><span class="cx"> 2016-12-12  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Provide SPI to avoid blocking on painting when coming into view
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebVideoFullscreenManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     // WebVideoFullscreenModel
</span><span class="cx">     void addClient(WebCore::WebVideoFullscreenModelClient&amp;) override;
</span><span class="cx">     void removeClient(WebCore::WebVideoFullscreenModelClient&amp;) override;
</span><del>-    void requestFullscreenMode(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
</del><ins>+    void requestFullscreenMode(WebCore::HTMLMediaElementEnums::VideoFullscreenMode, bool finishedWithMedia = false) override;
</ins><span class="cx">     void setVideoLayerFrame(WebCore::FloatRect) override;
</span><span class="cx">     void setVideoLayerGravity(VideoGravity) override;
</span><span class="cx">     void fullscreenModeChanged(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Messages to WebVideoFullscreenManager
</span><del>-    void requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
</del><ins>+    void requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode, bool finishedWithMedia = false);
</ins><span class="cx">     void didSetupFullscreen(uint64_t contextId);
</span><span class="cx">     void didExitFullscreen(uint64_t contextId);
</span><span class="cx">     void didEnterFullscreen(uint64_t contextId);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebVideoFullscreenManagerProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -136,10 +136,10 @@
</span><span class="cx">     m_clients.remove(&amp;client);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebVideoFullscreenModelContext::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode)
</del><ins>+void WebVideoFullscreenModelContext::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode, bool finishedWithMedia)
</ins><span class="cx"> {
</span><span class="cx">     if (m_manager)
</span><del>-        m_manager-&gt;requestFullscreenMode(m_contextId, mode);
</del><ins>+        m_manager-&gt;requestFullscreenMode(m_contextId, mode, finishedWithMedia);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebVideoFullscreenModelContext::setVideoLayerFrame(WebCore::FloatRect frame)
</span><span class="lines">@@ -435,9 +435,9 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma mark Messages to WebVideoFullscreenManager
</span><span class="cx"> 
</span><del>-void WebVideoFullscreenManagerProxy::requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode)
</del><ins>+void WebVideoFullscreenManagerProxy::requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode, bool finishedWithMedia)
</ins><span class="cx"> {
</span><del>-    m_page-&gt;send(Messages::WebVideoFullscreenManager::RequestFullscreenMode(contextId, mode), m_page-&gt;pageID());
</del><ins>+    m_page-&gt;send(Messages::WebVideoFullscreenManager::RequestFullscreenMode(contextId, mode, finishedWithMedia), m_page-&gt;pageID());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebVideoFullscreenManagerProxy::didSetupFullscreen(uint64_t contextId)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">     void videoDimensionsChanged(uint64_t contextId, const WebCore::FloatSize&amp;);
</span><span class="cx"> 
</span><span class="cx">     // Messages from WebVideoFullscreenManagerProxy
</span><del>-    void requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
</del><ins>+    void requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode, bool finishedWithMedia);
</ins><span class="cx">     void didSetupFullscreen(uint64_t contextId);
</span><span class="cx">     void didExitFullscreen(uint64_t contextId);
</span><span class="cx">     void didEnterFullscreen(uint64_t contextId);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagermessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.messages.in (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.messages.in        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.messages.in        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if (PLATFORM(IOS) &amp;&amp; HAVE(AVKIT)) || (PLATFORM(MAC) &amp;&amp; ENABLE(VIDEO_PRESENTATION_MODE))
</span><span class="cx"> messages -&gt; WebVideoFullscreenManager {
</span><del>-    RequestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
</del><ins>+    RequestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode, bool finishedWithMedia)
</ins><span class="cx">     DidSetupFullscreen(uint64_t contextId)
</span><span class="cx">     DidExitFullscreen(uint64_t contextId)
</span><span class="cx">     DidEnterFullscreen(uint64_t contextId)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm (209746 => 209747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm        2016-12-13 00:37:40 UTC (rev 209746)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm        2016-12-13 00:45:37 UTC (rev 209747)
</span><span class="lines">@@ -291,9 +291,9 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma mark Messages from WebVideoFullscreenManagerProxy:
</span><span class="cx"> 
</span><del>-void WebVideoFullscreenManager::requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode)
</del><ins>+void WebVideoFullscreenManager::requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode, bool finishedWithMedia)
</ins><span class="cx"> {
</span><del>-    ensureModel(contextId).requestFullscreenMode(mode);
</del><ins>+    ensureModel(contextId).requestFullscreenMode(mode, finishedWithMedia);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebVideoFullscreenManager::fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
</span></span></pre>
</div>
</div>

</body>
</html>