<!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>[160695] trunk/Source/WebKit2</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/160695">160695</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2013-12-16 23:46:19 -0800 (Mon, 16 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add layer hosting mode to ViewState
https://bugs.webkit.org/show_bug.cgi?id=125803

Reviewed by Anders Carlsson.

When the view state of the page is updated the layer mode may also
change. Currently this is passed by a separate message, remove this
and fold it into ViewState.
        
Previously the setLayerHostingMode message would be passed to the
DrawingArea, which would inform the WebPage. Since the WebPage is
passed the SetVisibilityState messgae reverse this.

WebPageProxy had a policy of only updating the hosting mode when
visible - the value is sticky whilst the view is not visible. Make
this policy explicit in the PageClientImpl, rather then implicit
from the flow control.

* Shared/ViewState.h:
    - Added ViewState::IsLayerWindowServerHosted.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
    - removed layerHostingMode.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::isLayerWindowServerHosted):
(WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
    - viewLayerHostingMode -&gt; isLayerWindowServerHosted, added m_layerHostingMode.
* UIProcess/DrawingAreaProxy.h:
    - removed layerHostingModeDidChange.
* UIProcess/PageClient.h:
    - viewLayerHostingMode -&gt; isLayerWindowServerHosted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
    - removed m_layerHostingMode.
(WebKit::WebPageProxy::updateViewState):
    - added IsLayerWindowServerHosted.
(WebKit::WebPageProxy::viewStateDidChange):
    - changes to ViewState::IsInWindow implies ViewState::IsLayerWindowServerHosted may change too.
    - remove special handling (separate message) for LayerHostingMode.
(WebKit::WebPageProxy::initializeCreationParameters):
    - removed m_layerHostingMode.
* UIProcess/WebPageProxy.h:
    - removed m_layerHostingMode.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
    - removed layerHostingModeDidChange.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setLayerHostingMode):
(WebKit::DrawingArea::didUpdate):
    - setLayerHostingMode takes a LayerHostingMode.
* WebProcess/WebPage/DrawingArea.messages.in:
    - SetLayerHostingMode is no longer a message.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
    - removed m_layerHostingMode.
(WebKit::WebPage::setViewState):
    - handle ViewState::IsLayerWindowServerHosted.
(WebKit::WebPage::setLayerHostingMode):
    - moved from ~Mac.mm (matching other ViewState setters), calls to DrawingArea.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::layerHostingMode):
    - layerHostingMode queries m_viewState, removed m_layerHostingMode.
* WebProcess/WebPage/ios/WebPageIOS.mm:
    - removed setLayerHostingMode.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
    - setLayerHostingMode takes a LayerHostingMode, WebPage now calls to DrawingArea.
* WebProcess/WebPage/mac/WebPageMac.mm:
    - removed setLayerHostingMode.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedViewStateh">trunk/Source/WebKit2/Shared/ViewState.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParameterscpp">trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParametersh">trunk/Source/WebKit2/Shared/WebPageCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacPageClientImplh">trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacPageClientImplmm">trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxymm">trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreamessagesin">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/ChangeLog        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -1,3 +1,80 @@
</span><ins>+2013-12-13  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        Add layer hosting mode to ViewState
+        https://bugs.webkit.org/show_bug.cgi?id=125803
+
+        Reviewed by Anders Carlsson.
+
+        When the view state of the page is updated the layer mode may also
+        change. Currently this is passed by a separate message, remove this
+        and fold it into ViewState.
+        
+        Previously the setLayerHostingMode message would be passed to the
+        DrawingArea, which would inform the WebPage. Since the WebPage is
+        passed the SetVisibilityState messgae reverse this.
+
+        WebPageProxy had a policy of only updating the hosting mode when
+        visible - the value is sticky whilst the view is not visible. Make
+        this policy explicit in the PageClientImpl, rather then implicit
+        from the flow control.
+
+        * Shared/ViewState.h:
+            - Added ViewState::IsLayerWindowServerHosted.
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode):
+        (WebKit::WebPageCreationParameters::decode):
+        * Shared/WebPageCreationParameters.h:
+            - removed layerHostingMode.
+        * UIProcess/API/mac/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::PageClientImpl):
+        (WebKit::PageClientImpl::isLayerWindowServerHosted):
+        (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
+            - viewLayerHostingMode -&gt; isLayerWindowServerHosted, added m_layerHostingMode.
+        * UIProcess/DrawingAreaProxy.h:
+            - removed layerHostingModeDidChange.
+        * UIProcess/PageClient.h:
+            - viewLayerHostingMode -&gt; isLayerWindowServerHosted.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+            - removed m_layerHostingMode.
+        (WebKit::WebPageProxy::updateViewState):
+            - added IsLayerWindowServerHosted.
+        (WebKit::WebPageProxy::viewStateDidChange):
+            - changes to ViewState::IsInWindow implies ViewState::IsLayerWindowServerHosted may change too.
+            - remove special handling (separate message) for LayerHostingMode.
+        (WebKit::WebPageProxy::initializeCreationParameters):
+            - removed m_layerHostingMode.
+        * UIProcess/WebPageProxy.h:
+            - removed m_layerHostingMode.
+        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
+        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+            - removed layerHostingModeDidChange.
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::setLayerHostingMode):
+        (WebKit::DrawingArea::didUpdate):
+            - setLayerHostingMode takes a LayerHostingMode.
+        * WebProcess/WebPage/DrawingArea.messages.in:
+            - SetLayerHostingMode is no longer a message.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+            - removed m_layerHostingMode.
+        (WebKit::WebPage::setViewState):
+            - handle ViewState::IsLayerWindowServerHosted.
+        (WebKit::WebPage::setLayerHostingMode):
+            - moved from ~Mac.mm (matching other ViewState setters), calls to DrawingArea.
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::layerHostingMode):
+            - layerHostingMode queries m_viewState, removed m_layerHostingMode.
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+            - removed setLayerHostingMode.
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
+            - setLayerHostingMode takes a LayerHostingMode, WebPage now calls to DrawingArea.
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+            - removed setLayerHostingMode.
+
</ins><span class="cx"> 2013-12-16  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [Cocoa] Remove unused contentAnchor SPI from WKView
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedViewStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ViewState.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ViewState.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/Shared/ViewState.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -34,13 +34,14 @@
</span><span class="cx">         IsFocused = 1 &lt;&lt; 1,
</span><span class="cx">         IsVisible = 1 &lt;&lt; 2,
</span><span class="cx">         IsInWindow = 1 &lt;&lt; 3,
</span><del>-        WindowIsVisible = 1 &lt;&lt; 4
</del><ins>+        WindowIsVisible = 1 &lt;&lt; 4,
+        IsLayerWindowServerHosted = 1 &lt;&lt; 5
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     typedef unsigned Flags;
</span><span class="cx"> 
</span><span class="cx">     static const Flags NoFlags = 0;
</span><del>-    static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | WindowIsVisible;
</del><ins>+    static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | WindowIsVisible | IsLayerWindowServerHosted;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -62,7 +62,6 @@
</span><span class="cx">     encoder &lt;&lt; backgroundExtendsBeyondPage;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    encoder.encodeEnum(layerHostingMode);
</del><span class="cx">     encoder &lt;&lt; colorSpace;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -125,8 +124,6 @@
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    if (!decoder.decodeEnum(parameters.layerHostingMode))
-        return false;
</del><span class="cx">     if (!decoder.decode(parameters.colorSpace))
</span><span class="cx">         return false;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #define WebPageCreationParameters_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DrawingAreaInfo.h&quot;
</span><del>-#include &quot;LayerTreeContext.h&quot;
</del><span class="cx"> #include &quot;SessionState.h&quot;
</span><span class="cx"> #include &quot;ViewState.h&quot;
</span><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><span class="lines">@@ -100,7 +99,6 @@
</span><span class="cx">     bool backgroundExtendsBeyondPage;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    LayerHostingMode layerHostingMode;
</del><span class="cx">     ColorSpaceData colorSpace;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #define PageClientImpl_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CorrectionPanel.h&quot;
</span><ins>+#include &quot;LayerTreeContext.h&quot;
</ins><span class="cx"> #include &quot;PageClient.h&quot;
</span><span class="cx"> #include &quot;WebFullScreenManagerProxy.h&quot;
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="lines">@@ -66,7 +67,7 @@
</span><span class="cx">     virtual bool isViewVisible();
</span><span class="cx">     virtual bool isWindowVisible();
</span><span class="cx">     virtual bool isViewInWindow();
</span><del>-    virtual LayerHostingMode viewLayerHostingMode() OVERRIDE;
</del><ins>+    virtual bool isLayerWindowServerHosted();
</ins><span class="cx">     virtual ColorSpaceData colorSpace() OVERRIDE;
</span><span class="cx">     virtual void setAcceleratedCompositingRootLayer(CALayer *) OVERRIDE;
</span><span class="cx"> 
</span><span class="lines">@@ -163,6 +164,8 @@
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><span class="cx">     OwnPtr&lt;WebCore::AlternativeTextUIController&gt; m_alternativeTextUIController;
</span><span class="cx"> #endif
</span><ins>+
+    LayerHostingMode m_layerHostingMode;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -127,6 +127,11 @@
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><span class="cx">     , m_alternativeTextUIController(adoptPtr(new AlternativeTextUIController))
</span><span class="cx"> #endif
</span><ins>+#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
+    , m_layerHostingMode(LayerHostingModeInWindowServer)
+#else
+    , m_layerHostingMode(LayerHostingModeDefault)
+#endif
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -215,21 +220,20 @@
</span><span class="cx">     return [m_wkView window];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PageClientImpl::viewWillMoveToAnotherWindow()
</del><ins>+bool PageClientImpl::isLayerWindowServerHosted()
</ins><span class="cx"> {
</span><del>-    clearAllEditCommands();
</del><ins>+#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
+    // Only update m_layerHostingMode when the view is in a window - otherwise just report the last value.
+    if ([m_wkView window])
+        m_layerHostingMode = [[m_wkView window] _hostsLayersInWindowServer] ? LayerHostingModeInWindowServer : LayerHostingModeDefault;
+#endif
+
+    return m_layerHostingMode == LayerHostingModeInWindowServer;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayerHostingMode PageClientImpl::viewLayerHostingMode()
</del><ins>+void PageClientImpl::viewWillMoveToAnotherWindow()
</ins><span class="cx"> {
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
-    if (![m_wkView window])
-        return LayerHostingModeDefault;
-
-    return [[m_wkView window] _hostsLayersInWindowServer] ? LayerHostingModeInWindowServer : LayerHostingModeDefault;
-#else
-    return LayerHostingModeDefault;
-#endif
</del><ins>+    clearAllEditCommands();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ColorSpaceData PageClientImpl::colorSpace()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -53,8 +53,6 @@
</span><span class="cx">     virtual void deviceScaleFactorDidChange() = 0;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: These should be pure virtual.
</span><del>-    virtual void layerHostingModeDidChange() { }
-
</del><span class="cx">     virtual void setBackingStoreIsDiscardable(bool) { }
</span><span class="cx"> 
</span><span class="cx">     virtual void waitForBackingStoreUpdateOnNextPaint() { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -111,8 +111,8 @@
</span><span class="cx">     // Return whether the view is in a window.
</span><span class="cx">     virtual bool isViewInWindow() = 0;
</span><span class="cx"> 
</span><del>-    // Return the layer hosting mode for the view.
-    virtual LayerHostingMode viewLayerHostingMode() { return LayerHostingModeDefault; }
</del><ins>+    // Return whether the layer is window server hosted.
+    virtual bool isLayerWindowServerHosted() = 0;
</ins><span class="cx"> 
</span><span class="cx">     virtual void processDidCrash() = 0;
</span><span class="cx">     virtual void didRelaunchProcess() = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -92,6 +92,9 @@
</span><span class="cx"> #include &lt;WebCore/WindowFeatures.h&gt;
</span><span class="cx"> #include &lt;stdio.h&gt;
</span><span class="cx"> 
</span><ins>+#import &quot;DrawingAreaMessages.h&quot;
+#import &quot;DrawingAreaProxyMessages.h&quot;
+
</ins><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx"> #include &quot;CoordinatedLayerTreeHostProxyMessages.h&quot;
</span><span class="cx"> #endif
</span><span class="lines">@@ -243,11 +246,6 @@
</span><span class="cx">     , m_pageScaleFactor(1)
</span><span class="cx">     , m_intrinsicDeviceScaleFactor(1)
</span><span class="cx">     , m_customDeviceScaleFactor(0)
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
-    , m_layerHostingMode(LayerHostingModeInWindowServer)
-#else
-    , m_layerHostingMode(LayerHostingModeDefault)
-#endif
</del><span class="cx">     , m_drawsBackground(true)
</span><span class="cx">     , m_drawsTransparentBackground(false)
</span><span class="cx">     , m_areMemoryCacheClientCallsEnabled(true)
</span><span class="lines">@@ -315,6 +313,10 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_scrollPinningBehavior(DoNotPin)
</span><span class="cx"> {
</span><ins>+#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
+    // By default assume we'll be window server hosted.
+    m_viewState |= ViewState::IsLayerWindowServerHosted;
+#endif
</ins><span class="cx">     updateViewState();
</span><span class="cx"> 
</span><span class="cx">     platformInitialize();
</span><span class="lines">@@ -950,6 +952,8 @@
</span><span class="cx">         m_viewState |= ViewState::IsVisible;
</span><span class="cx">     if (flagsToUpdate &amp; ViewState::IsInWindow &amp;&amp; m_pageClient.isViewInWindow())
</span><span class="cx">         m_viewState |= ViewState::IsInWindow;
</span><ins>+    if (flagsToUpdate &amp; ViewState::IsLayerWindowServerHosted &amp;&amp; m_pageClient.isLayerWindowServerHosted())
+        m_viewState |= ViewState::IsLayerWindowServerHosted;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged, WantsReplyOrNot wantsReply)
</span><span class="lines">@@ -957,6 +961,10 @@
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    // If the in-window state may have changed, then so may the layer hosting.
+    if (mayHaveChanged &amp; ViewState::IsInWindow)
+        mayHaveChanged |= ViewState::IsLayerWindowServerHosted;
+
</ins><span class="cx">     // Record the prior view state, update the flags that may have changed,
</span><span class="cx">     // and check which flags have actually changed.
</span><span class="cx">     ViewState::Flags previousViewState = m_viewState;
</span><span class="lines">@@ -985,22 +993,15 @@
</span><span class="cx"> #endif
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (mayHaveChanged &amp; ViewState::IsInWindow) {
-        if (m_viewState &amp; ViewState::IsInWindow) {
-            LayerHostingMode layerHostingMode = m_pageClient.viewLayerHostingMode();
-            if (m_layerHostingMode != layerHostingMode) {
-                m_layerHostingMode = layerHostingMode;
-                m_drawingArea-&gt;layerHostingModeDidChange();
-            }
-        }
</del><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR_POPOVER)
</span><del>-        else {
</del><ins>+    if (mayHaveChanged &amp; ViewState::IsInWindow) {
+        if (!(m_viewState &amp; ViewState::IsInWindow)) {
</ins><span class="cx">             // When leaving the current page, close the popover color well.
</span><span class="cx">             if (m_colorPicker)
</span><span class="cx">                 endColorPicker();
</span><span class="cx">         }
</span><del>-#endif
</del><span class="cx">     }
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx">     updateBackingStoreDiscardableState();
</span><span class="cx"> }
</span><span class="lines">@@ -3916,11 +3917,8 @@
</span><span class="cx">     m_creationParameters.scrollPinningBehavior = m_scrollPinningBehavior;
</span><span class="cx">     m_creationParameters.backgroundExtendsBeyondPage = m_backgroundExtendsBeyondPage;
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
-    m_creationParameters.layerHostingMode = m_layerHostingMode;
-#if !PLATFORM(IOS)
</del><ins>+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</ins><span class="cx">     m_creationParameters.colorSpace = m_pageClient.colorSpace();
</span><del>-#endif // !PLATFORM(IOS)
</del><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include &quot;DrawingAreaProxy.h&quot;
</span><span class="cx"> #include &quot;EditorState.h&quot;
</span><span class="cx"> #include &quot;GeolocationPermissionRequestManagerProxy.h&quot;
</span><del>-#include &quot;LayerTreeContext.h&quot;
</del><span class="cx"> #include &quot;MessageSender.h&quot;
</span><span class="cx"> #include &quot;NotificationPermissionRequestManagerProxy.h&quot;
</span><span class="cx"> #include &quot;PageLoadState.h&quot;
</span><span class="lines">@@ -552,8 +551,6 @@
</span><span class="cx">     void setCustomDeviceScaleFactor(float);
</span><span class="cx">     void windowScreenDidChange(PlatformDisplayID);
</span><span class="cx"> 
</span><del>-    LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
-
</del><span class="cx">     void setUseFixedLayout(bool);
</span><span class="cx">     void setFixedLayoutSize(const WebCore::IntSize&amp;);
</span><span class="cx">     bool useFixedLayout() const { return m_useFixedLayout; };
</span><span class="lines">@@ -1237,8 +1234,6 @@
</span><span class="cx">     float m_intrinsicDeviceScaleFactor;
</span><span class="cx">     float m_customDeviceScaleFactor;
</span><span class="cx"> 
</span><del>-    LayerHostingMode m_layerHostingMode;
-
</del><span class="cx">     bool m_drawsBackground;
</span><span class="cx">     bool m_drawsTransparentBackground;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> private:
</span><span class="cx">     // DrawingAreaProxy
</span><span class="cx">     virtual void deviceScaleFactorDidChange() OVERRIDE;
</span><del>-    virtual void layerHostingModeDidChange() OVERRIDE;
</del><span class="cx">     virtual void sizeDidChange() OVERRIDE;
</span><span class="cx">     virtual void waitForPossibleGeometryUpdate(double timeout = didUpdateBackingStoreStateTimeout) OVERRIDE;
</span><span class="cx">     virtual void colorSpaceDidChange() OVERRIDE;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacTiledCoreAnimationDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -54,11 +54,6 @@
</span><span class="cx">     m_webPageProxy-&gt;process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy-&gt;deviceScaleFactor()), m_webPageProxy-&gt;pageID());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange()
-{
-    m_webPageProxy-&gt;process().send(Messages::DrawingArea::SetLayerHostingMode(m_webPageProxy-&gt;layerHostingMode()), m_webPageProxy-&gt;pageID());
-}
-
</del><span class="cx"> void TiledCoreAnimationDrawingAreaProxy::sizeDidChange()
</span><span class="cx"> {
</span><span class="cx">     if (!m_webPageProxy-&gt;isValid())
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #define DrawingArea_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DrawingAreaInfo.h&quot;
</span><ins>+#include &quot;LayerTreeContext.h&quot;
</ins><span class="cx"> #include &lt;WebCore/FloatPoint.h&gt;
</span><span class="cx"> #include &lt;WebCore/IntRect.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="lines">@@ -106,6 +107,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void suspendPainting() { }
</span><span class="cx">     virtual void resumePainting() { }
</span><ins>+    virtual void setLayerHostingMode(LayerHostingMode) { }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     DrawingArea(DrawingAreaType, WebPage*);
</span><span class="lines">@@ -119,7 +121,6 @@
</span><span class="cx">     virtual void updateBackingStoreState(uint64_t /*backingStoreStateID*/, bool /*respondImmediately*/, float /*deviceScaleFactor*/, const WebCore::IntSize&amp; /*size*/, 
</span><span class="cx">                                          const WebCore::IntSize&amp; /*scrollOffset*/) { }
</span><span class="cx">     virtual void didUpdate() { }
</span><del>-    virtual void setLayerHostingMode(uint32_t) { }
</del><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     // Used by TiledCoreAnimationDrawingArea.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreamessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> messages -&gt; DrawingArea LegacyReceiver {
</span><span class="cx">     UpdateBackingStoreState(uint64_t backingStoreStateID, bool respondImmediately, float deviceScaleFactor, WebCore::IntSize size, WebCore::IntSize scrollOffset)
</span><span class="cx">     DidUpdate()
</span><del>-    SetLayerHostingMode(uint32_t layerHostingMode)
</del><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     // Used by TiledCoreAnimationDrawingArea.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -243,7 +243,6 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     , m_pdfPluginEnabled(false)
</span><span class="cx">     , m_hasCachedWindowFrame(false)
</span><del>-    , m_layerHostingMode(parameters.layerHostingMode)
</del><span class="cx">     , m_keyboardEventBeingInterpreted(0)
</span><span class="cx"> #elif PLATFORM(GTK)
</span><span class="cx">     , m_accessibilityObject(0)
</span><span class="lines">@@ -442,8 +441,8 @@
</span><span class="cx"> 
</span><span class="cx">     m_sandboxExtensionTracker.invalidate();
</span><span class="cx"> 
</span><del>-    for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
-        (*it)-&gt;webPageDestroyed();
</del><ins>+    for (auto* pluginView : m_pluginViews)
+        pluginView-&gt;webPageDestroyed();
</ins><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">     if (m_headerBanner)
</span><span class="lines">@@ -1233,8 +1232,8 @@
</span><span class="cx"> 
</span><span class="cx">     m_page-&gt;setPageScaleFactor(scale, origin);
</span><span class="cx"> 
</span><del>-    for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
-        (*it)-&gt;pageScaleFactorDidChange();
</del><ins>+    for (auto* pluginView : m_pluginViews)
+        pluginView-&gt;pageScaleFactorDidChange();
</ins><span class="cx"> 
</span><span class="cx">     if (m_drawingArea-&gt;layerTreeHost())
</span><span class="cx">         m_drawingArea-&gt;layerTreeHost()-&gt;deviceOrPageScaleFactorChanged();
</span><span class="lines">@@ -1260,8 +1259,8 @@
</span><span class="cx"> 
</span><span class="cx">     // Tell all our plug-in views that the device scale factor changed.
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
</span><del>-    for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
-        (*it)-&gt;setDeviceScaleFactor(scaleFactor);
</del><ins>+    for (auto* pluginView : m_pluginViews)
+        pluginView-&gt;setDeviceScaleFactor(scaleFactor);
</ins><span class="cx"> 
</span><span class="cx">     updateHeaderAndFooterLayersForDeviceScaleChange(scaleFactor);
</span><span class="cx"> #endif
</span><span class="lines">@@ -1912,8 +1911,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)    
</span><span class="cx">     // Tell all our plug-in views that the window focus changed.
</span><del>-    for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
-        (*it)-&gt;setWindowIsFocused(isActive);
</del><ins>+    for (auto* pluginView : m_pluginViews)
+        pluginView-&gt;setWindowIsFocused(isActive);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2095,6 +2094,8 @@
</span><span class="cx">         setActive(viewState &amp; ViewState::WindowIsActive);
</span><span class="cx">     if (changed &amp; ViewState::IsInWindow)
</span><span class="cx">         setIsInWindow(viewState &amp; ViewState::IsInWindow);
</span><ins>+    if (changed &amp; ViewState::IsLayerWindowServerHosted)
+        setLayerHostingMode(viewState &amp; ViewState::IsLayerWindowServerHosted ? LayerHostingModeInWindowServer : LayerHostingModeDefault);
</ins><span class="cx"> 
</span><span class="cx">     m_viewState = viewState;
</span><span class="cx"> 
</span><span class="lines">@@ -3058,12 +3059,23 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     // Tell all our plug-in views that the window visibility changed.
</span><del>-    for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
-        (*it)-&gt;setWindowIsVisible(windowIsVisible);
</del><ins>+    for (auto* pluginView : m_pluginViews)
+        pluginView-&gt;setWindowIsVisible(windowIsVisible);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPage::setLayerHostingMode(LayerHostingMode layerHostingMode)
+{
</ins><span class="cx"> #if PLATFORM(MAC)
</span><ins>+    // Tell all our plug-in views that the layer hosting mode changed.
+    for (auto* pluginView : m_pluginViews)
+        pluginView-&gt;setLayerHostingMode(layerHostingMode);
+#endif
+
+    m_drawingArea-&gt;setLayerHostingMode(layerHostingMode);
+}
+
+#if PLATFORM(MAC)
</ins><span class="cx"> void WebPage::windowAndViewFramesChanged(const FloatRect&amp; windowFrameInScreenCoordinates, const FloatRect&amp; windowFrameInUnflippedScreenCoordinates, const FloatRect&amp; viewFrameInWindowCoordinates, const FloatPoint&amp; accessibilityViewCoordinates)
</span><span class="cx"> {
</span><span class="cx">     m_windowFrameInScreenCoordinates = windowFrameInScreenCoordinates;
</span><span class="lines">@@ -3072,8 +3084,8 @@
</span><span class="cx">     m_accessibilityPosition = accessibilityViewCoordinates;
</span><span class="cx">     
</span><span class="cx">     // Tell all our plug-in views that the window and view frames have changed.
</span><del>-    for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
-        (*it)-&gt;windowAndViewFramesChanged(enclosingIntRect(windowFrameInScreenCoordinates), enclosingIntRect(viewFrameInWindowCoordinates));
</del><ins>+    for (auto* pluginView : m_pluginViews)
+        pluginView-&gt;windowAndViewFramesChanged(enclosingIntRect(windowFrameInScreenCoordinates), enclosingIntRect(viewFrameInWindowCoordinates));
</ins><span class="cx"> 
</span><span class="cx">     m_hasCachedWindowFrame = !m_windowFrameInUnflippedScreenCoordinates.isEmpty();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -348,7 +348,11 @@
</span><span class="cx">     bool windowIsVisible() const { return m_windowIsVisible; }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
</del><ins>+    LayerHostingMode layerHostingMode() const
+    {
+        return m_viewState &amp; ViewState::IsLayerWindowServerHosted ? LayerHostingModeInWindowServer : LayerHostingModeDefault;
+    }
+
</ins><span class="cx">     void setLayerHostingMode(LayerHostingMode);
</span><span class="cx"> 
</span><span class="cx">     void updatePluginsActiveAndFocusedState();
</span><span class="lines">@@ -925,9 +929,6 @@
</span><span class="cx">     // The accessibility position of the view.
</span><span class="cx">     WebCore::FloatPoint m_accessibilityPosition;
</span><span class="cx">     
</span><del>-    // The layer hosting mode.
-    LayerHostingMode m_layerHostingMode;
-
</del><span class="cx">     RetainPtr&lt;WKAccessibilityWebPageObject&gt; m_mockAccessibilityElement;
</span><span class="cx"> 
</span><span class="cx">     WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -268,11 +268,6 @@
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::setLayerHostingMode(LayerHostingMode)
-{
-    notImplemented();
-}
-
</del><span class="cx"> void WebPage::computePagesForPrintingPDFDocument(uint64_t, const PrintInfo&amp;, Vector&lt;IntRect&gt;&amp;)
</span><span class="cx"> {
</span><span class="cx">     notImplemented();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">     // Message handlers.
</span><span class="cx">     virtual void updateGeometry(const WebCore::IntSize&amp; viewSize, const WebCore::IntSize&amp; layerPosition) OVERRIDE;
</span><span class="cx">     virtual void setDeviceScaleFactor(float) OVERRIDE;
</span><del>-    virtual void setLayerHostingMode(uint32_t) OVERRIDE;
</del><ins>+    virtual void setLayerHostingMode(LayerHostingMode) OVERRIDE;
</ins><span class="cx">     virtual void setColorSpace(const ColorSpaceData&amp;) OVERRIDE;
</span><span class="cx"> 
</span><span class="cx">     virtual void beginTransientZoom() OVERRIDE;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -504,14 +504,8 @@
</span><span class="cx">         it-&gt;value-&gt;noteDeviceOrPageScaleFactorChangedIncludingDescendants();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TiledCoreAnimationDrawingArea::setLayerHostingMode(uint32_t opaqueLayerHostingMode)
</del><ins>+void TiledCoreAnimationDrawingArea::setLayerHostingMode(LayerHostingMode layerHostingMode)
</ins><span class="cx"> {
</span><del>-    LayerHostingMode layerHostingMode = static_cast&lt;LayerHostingMode&gt;(opaqueLayerHostingMode);
-    if (layerHostingMode == m_webPage-&gt;layerHostingMode())
-        return;
-
-    m_webPage-&gt;setLayerHostingMode(layerHostingMode);
-
</del><span class="cx">     updateLayerHostingContext();
</span><span class="cx"> 
</span><span class="cx">     // Finally, inform the UIProcess that the context has changed.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (160694 => 160695)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2013-12-17 06:09:43 UTC (rev 160694)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2013-12-17 07:46:19 UTC (rev 160695)
</span><span class="lines">@@ -249,8 +249,8 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, const String&amp; textInput)
</span><span class="cx"> {
</span><del>-    for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it) {
-        if ((*it)-&gt;sendComplexTextInput(pluginComplexTextInputIdentifier, textInput))
</del><ins>+    for (auto* pluginView : m_pluginViews) {
+        if (pluginView-&gt;sendComplexTextInput(pluginComplexTextInputIdentifier, textInput))
</ins><span class="cx">             break;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -792,14 +792,6 @@
</span><span class="cx">         result = !!hitResult.scrollbar();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::setLayerHostingMode(LayerHostingMode layerHostingMode)
-{
-    m_layerHostingMode = layerHostingMode;
-
-    for (HashSet&lt;PluginView*&gt;::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
-        (*it)-&gt;setLayerHostingMode(layerHostingMode);
-}
-
</del><span class="cx"> void WebPage::setTopOverhangImage(PassRefPtr&lt;WebImage&gt; image)
</span><span class="cx"> {
</span><span class="cx">     FrameView* frameView = m_mainFrame-&gt;coreFrame()-&gt;view();
</span></span></pre>
</div>
</div>

</body>
</html>