<!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>[161246] 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/161246">161246</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2014-01-02 18:09:25 -0800 (Thu, 02 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Propagate WindowServer modifications state to WebProcess
https://bugs.webkit.org/show_bug.cgi?id=126356

Reviewed by Sam Weinig.

This will be necessary to move control of process suppression to the WebProcess.
IsVisuallyIdle implies the process has stopped painting, or painted rects are
occluded and not actually being composited. State is provided on a per
WindowServer connection basis, and as such may produce (safe) false positives.

* Shared/ViewState.h:
    - added IsVisuallyIdle.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isVisuallyIdle):
    - added, on mac checks WindowServerConnection.
* UIProcess/PageClient.h:
(WebKit::PageClient::isVisuallyIdle):
    - base implementation purely based on isViewVisible.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::windowServerConnectionStateChanged):
    - broadcast the state change.
* UIProcess/WebContext.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateViewState):
(WebKit::WebPageProxy::viewStateDidChange):
    - propagate IsVisuallyIdle.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::windowServerConnectionStateChanged):
    - broadcast the state change.
* UIProcess/WebProcessProxy.h:
    - add windowServerConnectionStateChanged.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::updateProcessSuppressionStateOfGlobalChildProcesses):
    - moved from static in fle to static member of class.
(WebKit::WebContext::platformInitialize):
    - no need to enableOcclusionNotifications.
(WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
(WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
(WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
    - changed to call WindowServerConnection.
(WebKit::WebContext::processSuppressionEnabledChanged):
    - don't remove/reregister occlusion notifications.
* UIProcess/mac/WindowServerConnection.h: Added.
(WebKit::WindowServerConnection::applicationIsOccluded):
(WebKit::WindowServerConnection::applicationWindowModificationsHaveStopped):
    - accessors.
* UIProcess/mac/WindowServerConnection.mm: Added.
(WebKit::WindowServerConnection::applicationBecameOccluded):
(WebKit::WindowServerConnection::applicationWindowModificationsStopped):
(WebKit::WindowServerConnection::applicationBecameVisible):
(WebKit::WindowServerConnection::applicationWindowModificationsStarted):
    - handle notifications from the WindowServer.
(WebKit::WindowServerConnection::windowServerConnectionStateChanged):
    - broadcast the state change.
(WebKit::WindowServerConnection::shared):
    - accessor for singleton object.
(WebKit::WindowServerConnection::WindowServerConnection):
    - constructor inizializes fields &amp; register notification handlers.
* WebKit2.xcodeproj/project.pbxproj:
    - added new files.
* config.h:
    - added HAVE_WINDOW_SERVER_OCCLUSION_NOTIFICATIONS.</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="#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="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextcpp">trunk/Source/WebKit2/UIProcess/WebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContexth">trunk/Source/WebKit2/UIProcess/WebContext.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxyh">trunk/Source/WebKit2/UIProcess/WebProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMacmm">trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2configh">trunk/Source/WebKit2/config.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessmacWindowServerConnectionh">trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWindowServerConnectionmm">trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -1,5 +1,71 @@
</span><span class="cx"> 2014-01-02  Gavin Barraclough  &lt;barraclough@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Propagate WindowServer modifications state to WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=126356
+
+        Reviewed by Sam Weinig.
+
+        This will be necessary to move control of process suppression to the WebProcess.
+        IsVisuallyIdle implies the process has stopped painting, or painted rects are
+        occluded and not actually being composited. State is provided on a per
+        WindowServer connection basis, and as such may produce (safe) false positives.
+
+        * Shared/ViewState.h:
+            - added IsVisuallyIdle.
+        * UIProcess/API/mac/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::isVisuallyIdle):
+            - added, on mac checks WindowServerConnection.
+        * UIProcess/PageClient.h:
+        (WebKit::PageClient::isVisuallyIdle):
+            - base implementation purely based on isViewVisible.
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::windowServerConnectionStateChanged):
+            - broadcast the state change.
+        * UIProcess/WebContext.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::updateViewState):
+        (WebKit::WebPageProxy::viewStateDidChange):
+            - propagate IsVisuallyIdle.
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::windowServerConnectionStateChanged):
+            - broadcast the state change.
+        * UIProcess/WebProcessProxy.h:
+            - add windowServerConnectionStateChanged.
+        * UIProcess/mac/WebContextMac.mm:
+        (WebKit::WebContext::updateProcessSuppressionStateOfGlobalChildProcesses):
+            - moved from static in fle to static member of class.
+        (WebKit::WebContext::platformInitialize):
+            - no need to enableOcclusionNotifications.
+        (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
+        (WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
+        (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
+            - changed to call WindowServerConnection.
+        (WebKit::WebContext::processSuppressionEnabledChanged):
+            - don't remove/reregister occlusion notifications.
+        * UIProcess/mac/WindowServerConnection.h: Added.
+        (WebKit::WindowServerConnection::applicationIsOccluded):
+        (WebKit::WindowServerConnection::applicationWindowModificationsHaveStopped):
+            - accessors.
+        * UIProcess/mac/WindowServerConnection.mm: Added.
+        (WebKit::WindowServerConnection::applicationBecameOccluded):
+        (WebKit::WindowServerConnection::applicationWindowModificationsStopped):
+        (WebKit::WindowServerConnection::applicationBecameVisible):
+        (WebKit::WindowServerConnection::applicationWindowModificationsStarted):
+            - handle notifications from the WindowServer.
+        (WebKit::WindowServerConnection::windowServerConnectionStateChanged):
+            - broadcast the state change.
+        (WebKit::WindowServerConnection::shared):
+            - accessor for singleton object.
+        (WebKit::WindowServerConnection::WindowServerConnection):
+            - constructor inizializes fields &amp; register notification handlers.
+        * WebKit2.xcodeproj/project.pbxproj:
+            - added new files.
+        * config.h:
+            - added HAVE_WINDOW_SERVER_OCCLUSION_NOTIFICATIONS.
+
+2014-01-02  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
</ins><span class="cx">         Remove WindowIsVisible
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=126270
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedViewStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ViewState.h (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ViewState.h        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/Shared/ViewState.h        2014-01-03 02:09:25 UTC (rev 161246)
</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>-        IsLayerWindowServerHosted = 1 &lt;&lt; 4
</del><ins>+        IsVisuallyIdle = 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 | IsLayerWindowServerHosted;
</del><ins>+    static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | IsLayerWindowServerHosted | IsVisuallyIdle;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx">     virtual bool isViewFocused();
</span><span class="cx">     virtual bool isViewVisible();
</span><span class="cx">     virtual bool isViewInWindow();
</span><ins>+    virtual bool isVisuallyIdle();
</ins><span class="cx"> #if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
</span><span class="cx">     virtual bool isLayerWindowServerHosted();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #import &quot;WebContextMenuProxyMac.h&quot;
</span><span class="cx"> #import &quot;WebEditCommandProxy.h&quot;
</span><span class="cx"> #import &quot;WebPopupMenuProxyMac.h&quot;
</span><ins>+#import &quot;WindowServerConnection.h&quot;
</ins><span class="cx"> #import &lt;WebCore/AlternativeTextUIController.h&gt;
</span><span class="cx"> #import &lt;WebCore/BitmapImage.h&gt;
</span><span class="cx"> #import &lt;WebCore/Cursor.h&gt;
</span><span class="lines">@@ -214,6 +215,11 @@
</span><span class="cx">     return [m_wkView window];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool PageClientImpl::isVisuallyIdle()
+{
+    return WindowServerConnection::shared().applicationWindowModificationsHaveStopped() || !isViewVisible();
+}
+
</ins><span class="cx"> #if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
</span><span class="cx"> bool PageClientImpl::isLayerWindowServerHosted()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -108,6 +108,9 @@
</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><ins>+    // Return whether the view is visually idle.
+    virtual bool isVisuallyIdle() { return !isViewVisible(); }
+
</ins><span class="cx"> #if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
</span><span class="cx">     // Return whether the layer is window server hosted.
</span><span class="cx">     virtual bool isLayerWindowServerHosted() = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -452,6 +452,13 @@
</span><span class="cx">         contexts[i]-&gt;setAnyPageGroupMightHavePrivateBrowsingEnabled(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebContext::windowServerConnectionStateChanged()
+{
+    size_t processCount = m_processes.size();
+    for (size_t i = 0; i &lt; processCount; ++i)
+        m_processes[i]-&gt;windowServerConnectionStateChanged();
+}
+
</ins><span class="cx"> void WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled(bool privateBrowsingEnabled)
</span><span class="cx"> {
</span><span class="cx">     m_iconDatabase-&gt;setPrivateBrowsingEnabled(privateBrowsingEnabled);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.h        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -291,6 +291,8 @@
</span><span class="cx">     void updateProcessSuppressionStateOfChildProcesses();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    void windowServerConnectionStateChanged();
+
</ins><span class="cx">     static void willStartUsingPrivateBrowsing();
</span><span class="cx">     static void willStopUsingPrivateBrowsing();
</span><span class="cx"> 
</span><span class="lines">@@ -316,6 +318,10 @@
</span><span class="cx">     static void unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&amp;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+    static void updateProcessSuppressionStateOfGlobalChildProcesses();
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     void platformInitialize();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -929,6 +929,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::IsVisuallyIdle &amp;&amp; m_pageClient.isVisuallyIdle())
+        m_viewState |= ViewState::IsVisuallyIdle;
</ins><span class="cx"> #if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
</span><span class="cx">     if (flagsToUpdate &amp; ViewState::IsLayerWindowServerHosted &amp;&amp; m_pageClient.isLayerWindowServerHosted())
</span><span class="cx">         m_viewState |= ViewState::IsLayerWindowServerHosted;
</span><span class="lines">@@ -943,6 +945,9 @@
</span><span class="cx">     // If the in-window state may have changed, then so may the layer hosting.
</span><span class="cx">     if (mayHaveChanged &amp; ViewState::IsInWindow)
</span><span class="cx">         mayHaveChanged |= ViewState::IsLayerWindowServerHosted;
</span><ins>+    // If the visibility state may have changed, then so may the visually idle.
+    if (mayHaveChanged &amp; ViewState::IsVisible)
+        mayHaveChanged |= ViewState::IsVisuallyIdle;
</ins><span class="cx"> 
</span><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></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -638,6 +638,11 @@
</span><span class="cx">         send(Messages::WebProcess::ReleasePageCache(), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebProcessProxy::windowServerConnectionStateChanged()
+{
+    for (const auto&amp; page : m_pageMap.values())
+        page-&gt;viewStateDidChange(ViewState::IsVisuallyIdle);
+}
</ins><span class="cx"> 
</span><span class="cx"> void WebProcessProxy::requestTermination()
</span><span class="cx"> {
</span><span class="lines">@@ -652,7 +657,6 @@
</span><span class="cx">     disconnect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> void WebProcessProxy::enableSuddenTermination()
</span><span class="cx"> {
</span><span class="cx">     if (!isValid())
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -125,6 +125,8 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;API::Object&gt; apiObjectByConvertingToHandles(API::Object*);
</span><span class="cx"> 
</span><ins>+    void windowServerConnectionStateChanged();
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit WebProcessProxy(WebContext&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #import &quot;WebKitSystemInterface.h&quot;
</span><span class="cx"> #import &quot;WebProcessCreationParameters.h&quot;
</span><span class="cx"> #import &quot;WebProcessMessages.h&quot;
</span><ins>+#import &quot;WindowServerConnection.h&quot;
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> #import &lt;QuartzCore/CARemoteLayerServer.h&gt;
</span><span class="cx"> #endif
</span><span class="lines">@@ -84,9 +85,6 @@
</span><span class="cx"> NSString *SchemeForCustomProtocolRegisteredNotificationName = @&quot;WebKitSchemeForCustomProtocolRegisteredNotification&quot;;
</span><span class="cx"> NSString *SchemeForCustomProtocolUnregisteredNotificationName = @&quot;WebKitSchemeForCustomProtocolUnregisteredNotification&quot;;
</span><span class="cx"> 
</span><del>-static bool s_applicationIsOccluded = false;
-static bool s_applicationWindowModificationsHaveStopped = false;
-static bool s_occlusionNotificationHandlersRegistered = false;
</del><span class="cx"> static bool s_processSuppressionEnabledForAllContexts = true;
</span><span class="cx"> 
</span><span class="cx"> static void registerUserDefaultsIfNeeded()
</span><span class="lines">@@ -105,7 +103,7 @@
</span><span class="cx">     [[NSUserDefaults standardUserDefaults] registerDefaults:registrationDictionary];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void updateProcessSuppressionStateOfGlobalChildProcesses()
</del><ins>+void WebContext::updateProcessSuppressionStateOfGlobalChildProcesses()
</ins><span class="cx"> {
</span><span class="cx">     // The plan is to have all child processes become context specific.  This function
</span><span class="cx">     // can be removed once that is complete.
</span><span class="lines">@@ -117,119 +115,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
-static void applicationOcclusionStateChanged()
-{
-    const Vector&lt;WebContext*&gt;&amp; contexts = WebContext::allContexts();
-    for (size_t i = 0, count = contexts.size(); i &lt; count; ++i) {
-        if (contexts[i]-&gt;processSuppressionEnabled())
-            contexts[i]-&gt;updateProcessSuppressionStateOfChildProcesses();
-    }
-
-    if (s_processSuppressionEnabledForAllContexts)
-        updateProcessSuppressionStateOfGlobalChildProcesses();
-}
-
-static void applicationBecameVisible(uint32_t, void*, uint32_t, void*, uint32_t)
-{
-    if (!s_applicationIsOccluded)
-        return;
-    s_applicationIsOccluded = false;
-    applicationOcclusionStateChanged();
-}
-
-static void applicationBecameOccluded(uint32_t, void*, uint32_t, void*, uint32_t)
-{
-    if (s_applicationIsOccluded)
-        return;
-    s_applicationIsOccluded = true;
-    applicationOcclusionStateChanged();
-}
-
-static void applicationWindowModificationsStarted(uint32_t, void*, uint32_t, void*, uint32_t)
-{
-    if (!s_applicationWindowModificationsHaveStopped)
-        return;
-    s_applicationWindowModificationsHaveStopped = false;
-    applicationOcclusionStateChanged();
-}
-
-static void applicationWindowModificationsStopped(uint32_t, void*, uint32_t, void*, uint32_t)
-{
-    if (s_applicationWindowModificationsHaveStopped)
-        return;
-    s_applicationWindowModificationsHaveStopped = true;
-    applicationOcclusionStateChanged();
-}
-
-struct OcclusionNotificationHandler {
-    WKOcclusionNotificationType notificationType;
-    WKOcclusionNotificationHandler handler;
-    const char *name;
-};
-
-static const OcclusionNotificationHandler occlusionNotificationHandlers[] = {
-    { WKOcclusionNotificationTypeApplicationBecameVisible, applicationBecameVisible, &quot;Application Became Visible&quot; },
-    { WKOcclusionNotificationTypeApplicationBecameOccluded, applicationBecameOccluded, &quot;Application Became Occluded&quot; },
-    { WKOcclusionNotificationTypeApplicationWindowModificationsStarted, applicationWindowModificationsStarted, &quot;Application Window Modifications Started&quot; },
-    { WKOcclusionNotificationTypeApplicationWindowModificationsStopped, applicationWindowModificationsStopped, &quot;Application Window Modifications Stopped&quot; },
-};
-
-#endif
-
-static void registerOcclusionNotificationHandlers()
-{
-#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
-    for (const OcclusionNotificationHandler&amp; occlusionNotificationHandler : occlusionNotificationHandlers) {
-        bool result = WKRegisterOcclusionNotificationHandler(occlusionNotificationHandler.notificationType, occlusionNotificationHandler.handler);
-        UNUSED_PARAM(result);
-        ASSERT_WITH_MESSAGE(result, &quot;Registration of \&quot;%s\&quot; notification handler failed.\n&quot;, occlusionNotificationHandler.name);
-    }
-#endif
-}
-
-static void unregisterOcclusionNotificationHandlers()
-{
-#if !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
-    for (const OcclusionNotificationHandler&amp; occlusionNotificationHandler : occlusionNotificationHandlers) {
-        bool result = WKUnregisterOcclusionNotificationHandler(occlusionNotificationHandler.notificationType, occlusionNotificationHandler.handler);
-        UNUSED_PARAM(result);
-        ASSERT_WITH_MESSAGE(result, &quot;Unregistration of \&quot;%s\&quot; notification handler failed.\n&quot;, occlusionNotificationHandler.name);
-    }
-#endif
-}
-
-static void enableOcclusionNotifications()
-{
-    if (s_occlusionNotificationHandlersRegistered)
-        return;
-
-    s_occlusionNotificationHandlersRegistered = true;
-    registerOcclusionNotificationHandlers();
-}
-
-static void disableOcclusionNotifications()
-{
-    if (!s_occlusionNotificationHandlersRegistered)
-        return;
-
-    s_occlusionNotificationHandlersRegistered = false;
-    unregisterOcclusionNotificationHandlers();
-}
-
-static bool processSuppressionIsEnabledForAnyContext()
-{
-    bool result = false;
-    const Vector&lt;WebContext*&gt;&amp; contexts = WebContext::allContexts();
-    for (size_t i = 0, count = contexts.size(); i &lt; count; ++i) {
-        if (contexts[i]-&gt;processSuppressionEnabled()) {
-            result = true;
-            break;
-        }
-    }
-    return result;
-}
-
</del><span class="cx"> static bool processSuppressionIsEnabledForAllContexts()
</span><span class="cx"> {
</span><span class="cx">     bool result = true;
</span><span class="lines">@@ -254,7 +139,6 @@
</span><span class="cx">     registerUserDefaultsIfNeeded();
</span><span class="cx">     registerNotificationObservers();
</span><span class="cx">     ASSERT(m_processSuppressionEnabled);
</span><del>-    enableOcclusionNotifications();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String WebContext::platformDefaultApplicationCacheDirectory() const
</span><span class="lines">@@ -540,29 +424,24 @@
</span><span class="cx"> 
</span><span class="cx"> bool WebContext::canEnableProcessSuppressionForNetworkProcess() const
</span><span class="cx"> {
</span><del>-    return (s_applicationIsOccluded || s_applicationWindowModificationsHaveStopped) &amp;&amp; m_processSuppressionEnabled &amp;&amp; !omitProcessSuppression();
</del><ins>+    return (WindowServerConnection::shared().applicationIsOccluded() || WindowServerConnection::shared().applicationWindowModificationsHaveStopped()) &amp;&amp; m_processSuppressionEnabled &amp;&amp; !omitProcessSuppression();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebContext::canEnableProcessSuppressionForWebProcess(const WebKit::WebProcessProxy *webProcess) const
</span><span class="cx"> {
</span><del>-    return (s_applicationIsOccluded || s_applicationWindowModificationsHaveStopped || webProcess-&gt;allPagesAreProcessSuppressible())
</del><ins>+    return (WindowServerConnection::shared().applicationIsOccluded() || WindowServerConnection::shared().applicationWindowModificationsHaveStopped() || webProcess-&gt;allPagesAreProcessSuppressible())
</ins><span class="cx">            &amp;&amp; m_processSuppressionEnabled &amp;&amp; !omitProcessSuppression();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebContext::canEnableProcessSuppressionForGlobalChildProcesses()
</span><span class="cx"> {
</span><del>-    return (s_applicationIsOccluded || s_applicationWindowModificationsHaveStopped) &amp;&amp; s_processSuppressionEnabledForAllContexts &amp;&amp; !omitProcessSuppression();
</del><ins>+    return (WindowServerConnection::shared().applicationIsOccluded() || WindowServerConnection::shared().applicationWindowModificationsHaveStopped()) &amp;&amp; s_processSuppressionEnabledForAllContexts &amp;&amp; !omitProcessSuppression();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebContext::processSuppressionEnabledChanged()
</span><span class="cx"> {
</span><span class="cx">     updateProcessSuppressionStateOfChildProcesses();
</span><span class="cx"> 
</span><del>-    if (processSuppressionIsEnabledForAnyContext())
-        enableOcclusionNotifications();
-    else
-        disableOcclusionNotifications();
-
</del><span class="cx">     bool newProcessSuppressionEnabledForAllContexts = processSuppressionIsEnabledForAllContexts();
</span><span class="cx">     if (s_processSuppressionEnabledForAllContexts != newProcessSuppressionEnabledForAllContexts) {
</span><span class="cx">         s_processSuppressionEnabledForAllContexts = newProcessSuppressionEnabledForAllContexts;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWindowServerConnectionh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.h (0 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.h        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WindowServerConnection_h
+#define WindowServerConnection_h
+
+namespace WebKit {
+
+class WindowServerConnection {
+public:
+    static WindowServerConnection&amp; shared();
+
+    bool applicationIsOccluded() const { return m_applicationIsOccluded; }
+    bool applicationWindowModificationsHaveStopped() const { return m_applicationWindowModificationsHaveStopped; }
+
+private:
+    WindowServerConnection();
+
+#if HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS)
+    void windowServerConnectionStateChanged();
+
+    void applicationBecameOccluded(bool occluded);
+    void applicationWindowModificationsStopped(bool stopped);
+
+    static void applicationBecameVisible(uint32_t, void*, uint32_t, void*, uint32_t);
+    static void applicationBecameOccluded(uint32_t, void*, uint32_t, void*, uint32_t);
+    static void applicationWindowModificationsStarted(uint32_t, void*, uint32_t, void*, uint32_t);
+    static void applicationWindowModificationsStopped(uint32_t, void*, uint32_t, void*, uint32_t);
+#endif
+
+    bool m_applicationIsOccluded;
+    bool m_applicationWindowModificationsHaveStopped;
+};
+
+} // namespace WebKit
+
+#endif // WindowServerConnection_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWindowServerConnectionmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm (0 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -0,0 +1,118 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;WindowServerConnection.h&quot;
+
+#import &quot;WebContext.h&quot;
+#import &quot;WebKitSystemInterface.h&quot;
+
+namespace WebKit {
+
+#if HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS)
+
+void WindowServerConnection::applicationBecameOccluded(bool occluded)
+{
+    if (m_applicationIsOccluded == occluded)
+        return;
+    m_applicationIsOccluded = occluded;
+    windowServerConnectionStateChanged();
+}
+
+void WindowServerConnection::applicationWindowModificationsStopped(bool stopped)
+{
+    if (m_applicationWindowModificationsHaveStopped == stopped)
+        return;
+    m_applicationWindowModificationsHaveStopped = stopped;
+    windowServerConnectionStateChanged();
+}
+
+void WindowServerConnection::applicationBecameVisible(uint32_t, void*, uint32_t, void*, uint32_t)
+{
+    WindowServerConnection::shared().applicationBecameOccluded(false);
+}
+
+void WindowServerConnection::applicationBecameOccluded(uint32_t, void*, uint32_t, void*, uint32_t)
+{
+    WindowServerConnection::shared().applicationBecameOccluded(true);
+}
+
+void WindowServerConnection::applicationWindowModificationsStarted(uint32_t, void*, uint32_t, void*, uint32_t)
+{
+    WindowServerConnection::shared().applicationWindowModificationsStopped(false);
+}
+
+void WindowServerConnection::applicationWindowModificationsStopped(uint32_t, void*, uint32_t, void*, uint32_t)
+{
+    WindowServerConnection::shared().applicationWindowModificationsStopped(true);
+}
+
+void WindowServerConnection::windowServerConnectionStateChanged()
+{
+    for (auto* context : WebContext::allContexts()) {
+        context-&gt;windowServerConnectionStateChanged();
+        if (context-&gt;processSuppressionEnabled())
+            context-&gt;updateProcessSuppressionStateOfChildProcesses();
+    }
+
+    WebContext::updateProcessSuppressionStateOfGlobalChildProcesses();
+}
+
+#endif
+
+WindowServerConnection&amp; WindowServerConnection::shared()
+{
+    static WindowServerConnection&amp; windowServerConnection = *new WindowServerConnection;
+    return windowServerConnection;
+}
+
+WindowServerConnection::WindowServerConnection()
+    : m_applicationIsOccluded(false)
+    , m_applicationWindowModificationsHaveStopped(false)
+{
+#if HAVE(WINDOW_SERVER_OCCLUSION_NOTIFICATIONS)
+    struct OcclusionNotificationHandler {
+        WKOcclusionNotificationType notificationType;
+        WKOcclusionNotificationHandler handler;
+        const char* name;
+    };
+
+    static const OcclusionNotificationHandler occlusionNotificationHandlers[] = {
+        { WKOcclusionNotificationTypeApplicationBecameVisible, applicationBecameVisible, &quot;Application Became Visible&quot; },
+        { WKOcclusionNotificationTypeApplicationBecameOccluded, applicationBecameOccluded, &quot;Application Became Occluded&quot; },
+        { WKOcclusionNotificationTypeApplicationWindowModificationsStarted, applicationWindowModificationsStarted, &quot;Application Window Modifications Started&quot; },
+        { WKOcclusionNotificationTypeApplicationWindowModificationsStopped, applicationWindowModificationsStopped, &quot;Application Window Modifications Stopped&quot; },
+    };
+
+    for (auto occlusionNotificationHandler : occlusionNotificationHandlers) {
+        bool result = WKRegisterOcclusionNotificationHandler(occlusionNotificationHandler.notificationType, occlusionNotificationHandler.handler);
+        UNUSED_PARAM(result);
+        ASSERT_WITH_MESSAGE(result, &quot;Registration of \&quot;%s\&quot; notification handler failed.\n&quot;, occlusionNotificationHandler.name);
+    }
+#endif
+}
+
+} // namespace WebKit
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -783,6 +783,7 @@
</span><span class="cx">                 7CF47FFF17276AE3008ACB91 /* WKBundlePageBannerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CF47FFD17276AE3008ACB91 /* WKBundlePageBannerMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 84477853176FCC0800CDC7BB /* InjectedBundleHitTestResultMediaType.h in Headers */ = {isa = PBXBuildFile; fileRef = 84477851176FCAC100CDC7BB /* InjectedBundleHitTestResultMediaType.h */; };
</span><span class="cx">                 865E0485181A094A001F72F2 /* ViewState.h in Headers */ = {isa = PBXBuildFile; fileRef = 865E0484181A090D001F72F2 /* ViewState.h */; };
</span><ins>+                868160D0187645570021E79D /* WindowServerConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 868160CF187645370021E79D /* WindowServerConnection.mm */; };
</ins><span class="cx">                 8CFECE941490F140002AAA32 /* EditorState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CFECE931490F140002AAA32 /* EditorState.cpp */; };
</span><span class="cx">                 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
</span><span class="cx">                 909854EC12BC4E17000AD080 /* WebMemorySampler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 905620E812BC248B000799B6 /* WebMemorySampler.cpp */; };
</span><span class="lines">@@ -2402,6 +2403,8 @@
</span><span class="cx">                 7CF47FFD17276AE3008ACB91 /* WKBundlePageBannerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundlePageBannerMac.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 84477851176FCAC100CDC7BB /* InjectedBundleHitTestResultMediaType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleHitTestResultMediaType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 865E0484181A090D001F72F2 /* ViewState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewState.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                868160CD18763D4B0021E79D /* WindowServerConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WindowServerConnection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                868160CF187645370021E79D /* WindowServerConnection.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowServerConnection.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 8CFECE931490F140002AAA32 /* EditorState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditorState.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8DC2EF5B0486A6940098B216 /* WebKit2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WebKit2.framework; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="lines">@@ -5352,6 +5355,8 @@
</span><span class="cx">                 BCCF085C113F3B7500C650C5 /* mac */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                868160CF187645370021E79D /* WindowServerConnection.mm */,
+                                868160CD18763D4B0021E79D /* WindowServerConnection.h */,
</ins><span class="cx">                                 B878B613133428DC006888E9 /* CorrectionPanel.h */,
</span><span class="cx">                                 B878B614133428DC006888E9 /* CorrectionPanel.mm */,
</span><span class="cx">                                 1AB16AE01648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h */,
</span><span class="lines">@@ -7369,6 +7374,7 @@
</span><span class="cx">                                 518D2CAD12D5153B003BB93B /* WebBackForwardListItem.cpp in Sources */,
</span><span class="cx">                                 BC72B9FA11E6476B001EB4EA /* WebBackForwardListProxy.cpp in Sources */,
</span><span class="cx">                                 BC111A5A112F4FBB00337BAB /* WebChromeClient.cpp in Sources */,
</span><ins>+                                868160D0187645570021E79D /* WindowServerConnection.mm in Sources */,
</ins><span class="cx">                                 3F87B9BD158940120090FF62 /* WebColorChooser.cpp in Sources */,
</span><span class="cx">                                 F036978815F4BF0500C3A80E /* WebColorPicker.cpp in Sources */,
</span><span class="cx">                                 F036978B15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2configh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/config.h (161245 => 161246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/config.h        2014-01-03 02:00:51 UTC (rev 161245)
+++ trunk/Source/WebKit2/config.h        2014-01-03 02:09:25 UTC (rev 161246)
</span><span class="lines">@@ -80,3 +80,9 @@
</span><span class="cx"> #define ENABLE_SEC_ITEM_SHIM 1
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><ins>+
+#ifndef HAVE_WINDOW_SERVER_OCCLUSION_NOTIFICATIONS
+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
+#define HAVE_WINDOW_SERVER_OCCLUSION_NOTIFICATIONS 1
+#endif
+#endif
</ins></span></pre>
</div>
</div>

</body>
</html>