<!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>[196964] 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/196964">196964</a></dd>
<dt>Author</dt> <dd>adachan@apple.com</dd>
<dt>Date</dt> <dd>2016-02-22 16:40:16 -0800 (Mon, 22 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement basic functionality in WebVideoFullscreenInterfaceMac.
https://bugs.webkit.org/show_bug.cgi?id=153241

Reviewed by Beth Dakin.

Source/WebCore:

* platform/cocoa/WebVideoFullscreenInterface.h:
* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
(WebCore::WebVideoFullscreenInterfaceMac::invalidate):
(WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::rootViewToWindow):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::rootViewToWindow):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::supportsVideoFullscreen):
* WebProcess/cocoa/WebVideoFullscreenManager.h:
* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::supportsVideoFullscreen):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaWebVideoFullscreenInterfaceh">trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebVideoFullscreenInterfaceMach">trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacWebVideoFullscreenInterfaceMacmm">trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebVideoFullscreenManagerProxymm">trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagerh">trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h</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 (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebCore/ChangeLog        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-02-16  Ada Chan  &lt;adachan@apple.com&gt;
+
+        Implement basic functionality in WebVideoFullscreenInterfaceMac.
+        https://bugs.webkit.org/show_bug.cgi?id=153241
+
+        Reviewed by Beth Dakin.
+
+        * platform/cocoa/WebVideoFullscreenInterface.h:
+        * platform/mac/WebVideoFullscreenInterfaceMac.h:
+        * platform/mac/WebVideoFullscreenInterfaceMac.mm:
+        (WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
+        (WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
+        (WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
+        (WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
+        (WebCore::WebVideoFullscreenInterfaceMac::invalidate):
+        (WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
+
</ins><span class="cx"> 2016-02-22  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r196563): Images not loading on https://klim.co.nz/blog/paypal-sans-design-information/
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaWebVideoFullscreenInterfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebCore/platform/cocoa/WebVideoFullscreenInterface.h        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool supportsPictureInPicture();
</del><ins>+WEBCORE_EXPORT bool supportsPictureInPicture();
</ins><span class="cx"> 
</span><span class="cx"> class TimeRanges;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebVideoFullscreenInterfaceMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -34,6 +34,12 @@
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><ins>+OBJC_CLASS NSWindow;
+
+#if USE(APPLE_INTERNAL_SDK)
+OBJC_CLASS WebVideoFullscreenInterfaceMacObjC;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> class IntRect;
</span><span class="cx"> class WebVideoFullscreenChangeObserver;
</span><span class="lines">@@ -49,7 +55,9 @@
</span><span class="cx">         return adoptRef(*new WebVideoFullscreenInterfaceMac());
</span><span class="cx">     }
</span><span class="cx">     virtual ~WebVideoFullscreenInterfaceMac();
</span><ins>+    WebVideoFullscreenModel* webVideoFullscreenModel() const { return m_videoFullscreenModel; }
</ins><span class="cx">     WEBCORE_EXPORT void setWebVideoFullscreenModel(WebVideoFullscreenModel*);
</span><ins>+    WebVideoFullscreenChangeObserver* webVideoFullscreenChangeObserver() const { return m_fullscreenChangeObserver; }
</ins><span class="cx">     WEBCORE_EXPORT void setWebVideoFullscreenChangeObserver(WebVideoFullscreenChangeObserver*);
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void resetMediaState() override { }
</span><span class="lines">@@ -65,13 +73,13 @@
</span><span class="cx">     WEBCORE_EXPORT void setExternalPlayback(bool /*enabled*/, ExternalPlaybackTargetType, WTF::String /*localizedDeviceName*/) override { }
</span><span class="cx">     WEBCORE_EXPORT void setWirelessVideoPlaybackDisabled(bool) override { }
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT void setupFullscreen(NSView&amp; /*layerHostedView*/, const IntRect&amp; /*initialRect*/, HTMLMediaElementEnums::VideoFullscreenMode, bool /*allowsPictureInPicturePlayback*/) { }
-    WEBCORE_EXPORT void enterFullscreen() { }
-    WEBCORE_EXPORT void exitFullscreen(const IntRect&amp; /*finalRect*/) { }
-    WEBCORE_EXPORT void cleanupFullscreen() { }
-    WEBCORE_EXPORT void invalidate() { }
</del><ins>+    WEBCORE_EXPORT void setupFullscreen(NSView&amp; layerHostedView, const IntRect&amp; initialRect, NSWindow *parentWindow, HTMLMediaElementEnums::VideoFullscreenMode, bool allowsPictureInPicturePlayback);
+    WEBCORE_EXPORT void enterFullscreen();
+    WEBCORE_EXPORT void exitFullscreen(const IntRect&amp; finalRect, NSWindow *parentWindow);
+    WEBCORE_EXPORT void cleanupFullscreen();
+    WEBCORE_EXPORT void invalidate();
</ins><span class="cx">     WEBCORE_EXPORT void requestHideAndExitFullscreen() { }
</span><del>-    WEBCORE_EXPORT void preparedToReturnToInline(bool /*visible*/, const IntRect&amp; /*inlineRect*/) { }
</del><ins>+    WEBCORE_EXPORT void preparedToReturnToInline(bool visible, const IntRect&amp; inlineRect, NSWindow *parentWindow);
</ins><span class="cx"> 
</span><span class="cx">     HTMLMediaElementEnums::VideoFullscreenMode mode() const { return m_mode; }
</span><span class="cx">     bool hasMode(HTMLMediaElementEnums::VideoFullscreenMode mode) const { return m_mode &amp; mode; }
</span><span class="lines">@@ -82,10 +90,14 @@
</span><span class="cx">     WEBCORE_EXPORT bool mayAutomaticallyShowVideoPictureInPicture() const { return false; }
</span><span class="cx">     void applicationDidBecomeActive() { }
</span><span class="cx"> 
</span><del>-protected:
</del><ins>+private:
</ins><span class="cx">     WebVideoFullscreenModel* m_videoFullscreenModel { nullptr };
</span><span class="cx">     WebVideoFullscreenChangeObserver* m_fullscreenChangeObserver { nullptr };
</span><span class="cx">     HTMLMediaElementEnums::VideoFullscreenMode m_mode { HTMLMediaElementEnums::VideoFullscreenModeNone };
</span><ins>+
+#if USE(APPLE_INTERNAL_SDK)
+    RetainPtr&lt;WebVideoFullscreenInterfaceMacObjC&gt; m_webVideoFullscreenInterfaceObjC;
+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacWebVideoFullscreenInterfaceMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -32,6 +32,10 @@
</span><span class="cx"> #import &quot;WebVideoFullscreenChangeObserver.h&quot;
</span><span class="cx"> #import &quot;WebVideoFullscreenModel.h&quot;
</span><span class="cx"> 
</span><ins>+#if USE(APPLE_INTERNAL_SDK)
+#include &lt;WebKitAdditions/WebVideoFullscreenInterfaceMacAdditions.mm&gt;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> WebVideoFullscreenInterfaceMac::~WebVideoFullscreenInterfaceMac()
</span><span class="lines">@@ -70,10 +74,36 @@
</span><span class="cx">         m_videoFullscreenModel-&gt;fullscreenModeChanged(m_mode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !USE(APPLE_INTERNAL_SDK)
+void WebVideoFullscreenInterfaceMac::setupFullscreen(NSView&amp;, const IntRect&amp;, NSWindow *, HTMLMediaElementEnums::VideoFullscreenMode, bool)
+{
+}
+
+void WebVideoFullscreenInterfaceMac::enterFullscreen()
+{
+}
+
+void WebVideoFullscreenInterfaceMac::exitFullscreen(const IntRect&amp;, NSWindow *)
+{
+}
+
+void WebVideoFullscreenInterfaceMac::cleanupFullscreen()
+{
+}
+
+void WebVideoFullscreenInterfaceMac::invalidate()
+{
+}
+
+void WebVideoFullscreenInterfaceMac::preparedToReturnToInline(bool, const IntRect&amp;, NSWindow *)
+{
+}
+
</ins><span class="cx"> bool supportsPictureInPicture()
</span><span class="cx"> {
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/ChangeLog        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-02-16  Ada Chan  &lt;adachan@apple.com&gt;
+
+        Implement basic functionality in WebVideoFullscreenInterfaceMac.
+        https://bugs.webkit.org/show_bug.cgi?id=153241
+
+        Reviewed by Beth Dakin.
+
+        * UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
+        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
+        (WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
+        (WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::rootViewToWindow):
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::rootViewToWindow):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::supportsVideoFullscreen):
+        * WebProcess/cocoa/WebVideoFullscreenManager.h:
+        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
+        (WebKit::WebVideoFullscreenManager::supportsVideoFullscreen):
+
</ins><span class="cx"> 2016-02-22  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r196935.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebVideoFullscreenManagerProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -368,7 +368,9 @@
</span><span class="cx">     UIView *parentView = downcast&lt;RemoteLayerTreeDrawingAreaProxy&gt;(*m_page-&gt;drawingArea()).remoteLayerTreeHost().rootLayer();
</span><span class="cx">     interface-&gt;setupFullscreen(*model-&gt;layerHostView(), initialRect, parentView, videoFullscreenMode, allowsPictureInPicture);
</span><span class="cx"> #else
</span><del>-    interface-&gt;setupFullscreen(*model-&gt;layerHostView(), initialRect, videoFullscreenMode, allowsPictureInPicture);
</del><ins>+    IntRect initialWindowRect;
+    m_page-&gt;rootViewToWindow(initialRect, initialWindowRect);
+    interface-&gt;setupFullscreen(*model-&gt;layerHostView(), initialWindowRect, m_page-&gt;platformWindow(), videoFullscreenMode, allowsPictureInPicture);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -462,7 +464,13 @@
</span><span class="cx"> 
</span><span class="cx"> void WebVideoFullscreenManagerProxy::exitFullscreen(uint64_t contextId, WebCore::IntRect finalRect)
</span><span class="cx"> {
</span><ins>+#if PLATFORM(IOS)
</ins><span class="cx">     ensureInterface(contextId).exitFullscreen(finalRect);
</span><ins>+#else
+    IntRect finalWindowRect;
+    m_page-&gt;rootViewToWindow(finalRect, finalWindowRect);
+    ensureInterface(contextId).exitFullscreen(finalWindowRect, m_page-&gt;platformWindow());
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebVideoFullscreenManagerProxy::cleanupFullscreen(uint64_t contextId)
</span><span class="lines">@@ -474,7 +482,13 @@
</span><span class="cx"> {
</span><span class="cx">     m_page-&gt;fullscreenMayReturnToInline();
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
</ins><span class="cx">     ensureInterface(contextId).preparedToReturnToInline(visible, inlineRect);
</span><ins>+#else
+    IntRect inlineWindowRect;
+    m_page-&gt;rootViewToWindow(inlineRect, inlineWindowRect);
+    ensureInterface(contextId).preparedToReturnToInline(visible, inlineWindowRect, m_page-&gt;platformWindow());
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #pragma mark Messages to WebVideoFullscreenManager
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -209,6 +209,9 @@
</span><span class="cx">     virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&amp;) = 0;
</span><span class="cx">     virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&amp;) = 0;
</span><span class="cx">     virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&amp;) = 0;
</span><ins>+#if PLATFORM(MAC)
+    virtual WebCore::IntRect rootViewToWindow(const WebCore::IntRect&amp;) = 0;
+#endif
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     virtual WebCore::IntPoint accessibilityScreenToRootView(const WebCore::IntPoint&amp;) = 0;
</span><span class="cx">     virtual WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&amp;) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -581,6 +581,7 @@
</span><span class="cx"> 
</span><span class="cx">     void startWindowDrag();
</span><span class="cx">     NSWindow *platformWindow();
</span><ins>+    void rootViewToWindow(const WebCore::IntRect&amp; viewRect, WebCore::IntRect&amp; windowRect);
</ins><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">     NSView *inspectorAttachmentView();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -113,6 +113,9 @@
</span><span class="cx">     virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&amp;) override;
</span><span class="cx">     virtual WebCore::IntPoint screenToRootView(const WebCore::IntPoint&amp;) override;
</span><span class="cx">     virtual WebCore::IntRect rootViewToScreen(const WebCore::IntRect&amp;) override;
</span><ins>+#if PLATFORM(MAC)
+    virtual WebCore::IntRect rootViewToWindow(const WebCore::IntRect&amp;) override;
+#endif
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     virtual WebCore::IntPoint accessibilityScreenToRootView(const WebCore::IntPoint&amp;) = 0;
</span><span class="cx">     virtual WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&amp;) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -421,6 +421,15 @@
</span><span class="cx">     return enclosingIntRect(tempRect);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+IntRect PageClientImpl::rootViewToWindow(const WebCore::IntRect&amp; rect)
+{
+    NSRect tempRect = rect;
+    tempRect = [m_view convertRect:tempRect toView:nil];
+    return enclosingIntRect(tempRect);
+}
+#endif
+
</ins><span class="cx"> void PageClientImpl::doneWithKeyEvent(const NativeWebKeyboardEvent&amp; event, bool eventWasHandled)
</span><span class="cx"> {
</span><span class="cx">     m_impl-&gt;doneWithKeyEvent(event.nativeEvent(), eventWasHandled);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -584,6 +584,11 @@
</span><span class="cx">     return m_pageClient.platformWindow();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::rootViewToWindow(const WebCore::IntRect&amp; viewRect, WebCore::IntRect&amp; windowRect)
+{
+    windowRect = m_pageClient.rootViewToWindow(viewRect);
+}
+
</ins><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> NSView *WebPageProxy::inspectorAttachmentView()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -850,9 +850,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS) || (PLATFORM(MAC) &amp;&amp; ENABLE(VIDEO_PRESENTATION_MODE))
</span><del>-bool WebChromeClient::supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode)
</del><ins>+bool WebChromeClient::supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode)
</ins><span class="cx"> {
</span><del>-    return m_page-&gt;videoFullscreenManager()-&gt;supportsVideoFullscreen();
</del><ins>+    return m_page-&gt;videoFullscreenManager()-&gt;supportsVideoFullscreen(mode);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&amp; videoElement, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.h        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">     void didReceiveMessage(IPC::Connection&amp;, IPC::MessageDecoder&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     // Interface to ChromeClient
</span><del>-    bool supportsVideoFullscreen() const;
</del><ins>+    bool supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) const;
</ins><span class="cx">     void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&amp;, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
</span><span class="cx">     void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&amp;);
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesscocoaWebVideoFullscreenManagermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm (196963 => 196964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm        2016-02-23 00:03:54 UTC (rev 196963)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm        2016-02-23 00:40:16 UTC (rev 196964)
</span><span class="lines">@@ -217,12 +217,14 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma mark Interface to ChromeClient:
</span><span class="cx"> 
</span><del>-bool WebVideoFullscreenManager::supportsVideoFullscreen() const
</del><ins>+bool WebVideoFullscreenManager::supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode) const
</ins><span class="cx"> {
</span><span class="cx"> #if PLATFORM(IOS)
</span><ins>+    UNUSED_PARAM(mode);
</ins><span class="cx">     return Settings::avKitEnabled();
</span><ins>+#elif USE(APPLE_INTERNAL_SDK)
+#import &lt;WebKitAdditions/WebVideoFullscreenManagerSupportsVideoFullscreenMac.mm&gt;
</ins><span class="cx"> #else
</span><del>-    // FIXME 153241: Return false until more of WebVideoFullscreenInterfaceMac has been implemented.
</del><span class="cx">     return false;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>