<!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>[207424] 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/207424">207424</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2016-10-17 13:18:38 -0700 (Mon, 17 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>UIProcess should determine throttle state for WebContent process
https://bugs.webkit.org/show_bug.cgi?id=163556

Reviewed by Anders Carlsson.

This is a step towards merging page/process throttling code for mac &amp; iOS.

Previously WebPage determined whether to start a UserActivity based on page activity,
visibility and the preference to disable. Now WebPage passes the activity state across
to WebPageProxy, which makes the decision &amp; explicitly instructs WebPage to start/stop
the UserActivity.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
    - updateActivityToken + updateProccessSuppressionState -&gt; updateThrottleState
(WebKit::WebPageProxy::reattachToWebProcess):
    - updateActivityToken -&gt; updateThrottleState
(WebKit::WebPageProxy::dispatchViewStateChange):
    - updateActivityToken -&gt; updateThrottleState
(WebKit::WebPageProxy::setPageActivityState):
    - Record activity state passed from WebPage, and update.
(WebKit::WebPageProxy::preferencesDidChange):
    - updateProccessSuppressionState -&gt; updateThrottleState
(WebKit::WebPageProxy::updateActivityToken): Deleted.
(WebKit::WebPageProxy::updateProccessSuppressionState): Deleted.
(WebKit::WebPageProxy::updateThrottleState):
    - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
    - Compute whether page should be suppressed, and send SetPageSuppressed message accordingly.
* UIProcess/WebPageProxy.h:
    - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
    - Added setPageActivityState/m_activityState to report/record page activity.
    - Added m_pageSuppressed to prevent redundant message sends.
* UIProcess/WebPageProxy.messages.in:
    - Expose SetPageActivityState message (called by WebPage).
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
    - removed m_processSuppressionEnabled
    - updateUserActivity -&gt; setPageSuppressed - explicitly set the page to not be suppressed, until WebPageProxy tells us to do so.
(WebKit::WebPage::setPageActivityState):
    - post activity state on to WebPageProxy.
(WebKit::WebPage::setPageSuppressed):
    - Start/stop USerActivity accordingly.
(WebKit::WebPage::setViewState):
    - No longer need to monitor ViewState changes on the WebProcess side.
(WebKit::WebPage::updatePreferences):
    - No longer need to monitor preference changes on the WebProcess side.
(WebKit::WebPage::updateUserActivity): Deleted.
    - Only updated on reciept of setPageSuppressed message.
* WebProcess/WebPage/WebPage.h:
    - Removed m_activityState, m_processSuppressionEnabled, updateUserActivity.
    - Added setPageSuppressed message.
* WebProcess/WebPage/WebPage.messages.in:
    - Added SetPageSuppressed message.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</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="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.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="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (207423 => 207424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-10-17 19:54:04 UTC (rev 207423)
+++ trunk/Source/WebKit2/ChangeLog        2016-10-17 20:18:38 UTC (rev 207424)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2016-10-17  Gavin Barraclough  &lt;barraclough@apple.com&gt;
+
+        UIProcess should determine throttle state for WebContent process
+        https://bugs.webkit.org/show_bug.cgi?id=163556
+
+        Reviewed by Anders Carlsson.
+
+        This is a step towards merging page/process throttling code for mac &amp; iOS.
+
+        Previously WebPage determined whether to start a UserActivity based on page activity,
+        visibility and the preference to disable. Now WebPage passes the activity state across
+        to WebPageProxy, which makes the decision &amp; explicitly instructs WebPage to start/stop
+        the UserActivity.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+            - updateActivityToken + updateProccessSuppressionState -&gt; updateThrottleState
+        (WebKit::WebPageProxy::reattachToWebProcess):
+            - updateActivityToken -&gt; updateThrottleState
+        (WebKit::WebPageProxy::dispatchViewStateChange):
+            - updateActivityToken -&gt; updateThrottleState
+        (WebKit::WebPageProxy::setPageActivityState):
+            - Record activity state passed from WebPage, and update.
+        (WebKit::WebPageProxy::preferencesDidChange):
+            - updateProccessSuppressionState -&gt; updateThrottleState
+        (WebKit::WebPageProxy::updateActivityToken): Deleted.
+        (WebKit::WebPageProxy::updateProccessSuppressionState): Deleted.
+        (WebKit::WebPageProxy::updateThrottleState):
+            - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
+            - Compute whether page should be suppressed, and send SetPageSuppressed message accordingly.
+        * UIProcess/WebPageProxy.h:
+            - Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
+            - Added setPageActivityState/m_activityState to report/record page activity.
+            - Added m_pageSuppressed to prevent redundant message sends.
+        * UIProcess/WebPageProxy.messages.in:
+            - Expose SetPageActivityState message (called by WebPage).
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+            - removed m_processSuppressionEnabled
+            - updateUserActivity -&gt; setPageSuppressed - explicitly set the page to not be suppressed, until WebPageProxy tells us to do so.
+        (WebKit::WebPage::setPageActivityState):
+            - post activity state on to WebPageProxy.
+        (WebKit::WebPage::setPageSuppressed):
+            - Start/stop USerActivity accordingly.
+        (WebKit::WebPage::setViewState):
+            - No longer need to monitor ViewState changes on the WebProcess side.
+        (WebKit::WebPage::updatePreferences):
+            - No longer need to monitor preference changes on the WebProcess side.
+        (WebKit::WebPage::updateUserActivity): Deleted.
+            - Only updated on reciept of setPageSuppressed message.
+        * WebProcess/WebPage/WebPage.h:
+            - Removed m_activityState, m_processSuppressionEnabled, updateUserActivity.
+            - Added setPageSuppressed message.
+        * WebProcess/WebPage/WebPage.messages.in:
+            - Added SetPageSuppressed message.
+
</ins><span class="cx"> 2016-10-17  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r206189): logs error statements when API::URLRequest is canceled
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (207423 => 207424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-10-17 19:54:04 UTC (rev 207423)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-10-17 20:18:38 UTC (rev 207424)
</span><span class="lines">@@ -457,8 +457,7 @@
</span><span class="cx">     m_webProcessLifetimeTracker.addObserver(m_websiteDataStore);
</span><span class="cx"> 
</span><span class="cx">     updateViewState();
</span><del>-    updateActivityToken();
-    updateProccessSuppressionState();
</del><ins>+    updateThrottleState();
</ins><span class="cx">     updateHiddenPageThrottlingAutoIncreases();
</span><span class="cx">     
</span><span class="cx"> #if HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
</span><span class="lines">@@ -715,7 +714,7 @@
</span><span class="cx">     m_process-&gt;addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID, *this);
</span><span class="cx"> 
</span><span class="cx">     updateViewState();
</span><del>-    updateActivityToken();
</del><ins>+    updateThrottleState();
</ins><span class="cx"> 
</span><span class="cx">     m_inspector = WebInspectorProxy::create(this);
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="lines">@@ -1538,7 +1537,7 @@
</span><span class="cx">     m_nextViewStateChangeCallbacks.clear();
</span><span class="cx"> 
</span><span class="cx">     // This must happen after the SetViewState message is sent, to ensure the page visibility event can fire.
</span><del>-    updateActivityToken();
</del><ins>+    updateThrottleState();
</ins><span class="cx"> 
</span><span class="cx">     // If we've started the responsiveness timer as part of telling the web process to update the backing store
</span><span class="cx">     // state, it might not send back a reply (since it won't paint anything if the web page is hidden) so we
</span><span class="lines">@@ -1563,13 +1562,34 @@
</span><span class="cx">     m_viewWasEverInWindow |= isNowInWindow;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::setPageActivityState(WebCore::PageActivityState::Flags activityState)
+{
+    m_activityState = activityState;
+    updateThrottleState();
+}
+
</ins><span class="cx"> bool WebPageProxy::isAlwaysOnLoggingAllowed() const
</span><span class="cx"> {
</span><span class="cx">     return sessionID().isAlwaysOnLoggingAllowed();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::updateActivityToken()
</del><ins>+void WebPageProxy::updateThrottleState()
</ins><span class="cx"> {
</span><ins>+    bool processSuppressionEnabled = m_preferences-&gt;pageVisibilityBasedProcessSuppressionEnabled();
+
+    // If process suppression is not enabled take a token on the process pool to disable suppression of support processes.
+    if (!processSuppressionEnabled)
+        m_preventProcessSuppressionCount = m_process-&gt;processPool().processSuppressionDisabledForPageCount();
+    else if (!m_preventProcessSuppressionCount)
+        m_preventProcessSuppressionCount = nullptr;
+
+    // We should suppress if the page is not active, is visually idle, and supression is enabled.
+    bool pageShouldBeSuppressed = !m_activityState &amp;&amp; processSuppressionEnabled &amp;&amp; (m_viewState &amp; ViewState::IsVisuallyIdle);
+    if (m_pageSuppressed != pageShouldBeSuppressed) {
+        m_pageSuppressed = pageShouldBeSuppressed;
+        m_process-&gt;send(Messages::WebPage::SetPageSuppressed(m_pageSuppressed), m_pageID);
+    }
+
</ins><span class="cx">     if (m_viewState &amp; ViewState::IsVisuallyIdle)
</span><span class="cx">         m_pageIsUserObservableCount = nullptr;
</span><span class="cx">     else if (!m_pageIsUserObservableCount)
</span><span class="lines">@@ -1591,14 +1611,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::updateProccessSuppressionState()
-{
-    if (m_preferences-&gt;pageVisibilityBasedProcessSuppressionEnabled())
-        m_preventProcessSuppressionCount = nullptr;
-    else if (!m_preventProcessSuppressionCount)
-        m_preventProcessSuppressionCount = m_process-&gt;processPool().processSuppressionDisabledForPageCount();
-}
-
</del><span class="cx"> void WebPageProxy::updateHiddenPageThrottlingAutoIncreases()
</span><span class="cx"> {
</span><span class="cx">     if (!m_preferences-&gt;hiddenPageDOMTimerThrottlingAutoIncreases())
</span><span class="lines">@@ -3012,7 +3024,7 @@
</span><span class="cx">         inspector()-&gt;enableRemoteInspection();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    updateProccessSuppressionState();
</del><ins>+    updateThrottleState();
</ins><span class="cx">     updateHiddenPageThrottlingAutoIncreases();
</span><span class="cx"> 
</span><span class="cx">     m_pageClient.preferencesDidChange();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (207423 => 207424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-10-17 19:54:04 UTC (rev 207423)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-10-17 20:18:38 UTC (rev 207424)
</span><span class="lines">@@ -1137,8 +1137,7 @@
</span><span class="cx">     void platformInitialize();
</span><span class="cx"> 
</span><span class="cx">     void updateViewState(WebCore::ViewState::Flags flagsToUpdate = WebCore::ViewState::AllFlags);
</span><del>-    void updateActivityToken();
-    void updateProccessSuppressionState();
</del><ins>+    void updateThrottleState();
</ins><span class="cx">     void updateHiddenPageThrottlingAutoIncreases();
</span><span class="cx"> 
</span><span class="cx">     enum class ResetStateReason {
</span><span class="lines">@@ -1520,6 +1519,7 @@
</span><span class="cx">     void dispatchViewStateChange();
</span><span class="cx">     void viewDidLeaveWindow();
</span><span class="cx">     void viewDidEnterWindow();
</span><ins>+    void setPageActivityState(WebCore::PageActivityState::Flags);
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     void didPerformImmediateActionHitTest(const WebHitTestResultData&amp;, bool contentPreventsDefault, const UserData&amp;);
</span><span class="lines">@@ -1713,6 +1713,8 @@
</span><span class="cx">     WebCore::PolicyAction m_syncNavigationActionPolicyAction;
</span><span class="cx">     DownloadID m_syncNavigationActionPolicyDownloadID;
</span><span class="cx">     bool m_shouldSuppressAppLinksInNextNavigationPolicyDecision { false };
</span><ins>+    WebCore::PageActivityState::Flags m_activityState { WebCore::PageActivityState::NoFlags };
+    bool m_pageSuppressed { false };
</ins><span class="cx"> 
</span><span class="cx">     Deque&lt;NativeWebKeyboardEvent&gt; m_keyEventQueue;
</span><span class="cx">     Deque&lt;NativeWebWheelEvent&gt; m_wheelEventQueue;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (207423 => 207424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2016-10-17 19:54:04 UTC (rev 207423)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2016-10-17 20:18:38 UTC (rev 207424)
</span><span class="lines">@@ -408,7 +408,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     DidUpdateViewState()
</span><del>-    
</del><ins>+    SetPageActivityState(int32_t pageActivityState)
+
</ins><span class="cx">     DidSaveToPageCache()
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (207423 => 207424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-10-17 19:54:04 UTC (rev 207423)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-10-17 20:18:38 UTC (rev 207424)
</span><span class="lines">@@ -376,7 +376,6 @@
</span><span class="cx">     , m_scrollPinningBehavior(DoNotPin)
</span><span class="cx">     , m_useAsyncScrolling(false)
</span><span class="cx">     , m_viewState(parameters.viewState)
</span><del>-    , m_processSuppressionEnabled(true)
</del><span class="cx">     , m_userActivity(&quot;Process suppression disabled for page.&quot;)
</span><span class="cx">     , m_pendingNavigationID(0)
</span><span class="cx"> #if ENABLE(WEBGL)
</span><span class="lines">@@ -495,7 +494,7 @@
</span><span class="cx">     m_page-&gt;setViewState(m_viewState);
</span><span class="cx">     if (!isVisible())
</span><span class="cx">         m_page-&gt;setIsPrerender();
</span><del>-    updateUserActivity();
</del><ins>+    setPageSuppressed(false);
</ins><span class="cx"> 
</span><span class="cx">     updateIsInWindow(true);
</span><span class="cx"> 
</span><span class="lines">@@ -582,21 +581,17 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::setPageActivityState(PageActivityState::Flags activityState)
</span><span class="cx"> {
</span><del>-    PageActivityState::Flags changed = m_activityState ^ activityState;
-    m_activityState = activityState;
-
-    if (changed)
-        updateUserActivity();
</del><ins>+    send(Messages::WebPageProxy::SetPageActivityState(activityState));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::updateUserActivity()
</del><ins>+void WebPage::setPageSuppressed(bool pageSuppressed)
</ins><span class="cx"> {
</span><del>-    // Start the activity to prevent AppNap if the page activity is in progress,
-    // the page is visible and non-idle, or process suppression is disabled.
-    if (m_activityState || !(m_viewState &amp; ViewState::IsVisuallyIdle) || !m_processSuppressionEnabled)
</del><ins>+    // The UserActivity keeps the processes runnable. So if the page should be suppressed, stop the activity.
+    // If the page should not be supressed, start it.
+    if (pageSuppressed)
+        m_userActivity.stop();
+    else
</ins><span class="cx">         m_userActivity.start();
</span><del>-    else
-        m_userActivity.stop();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebPage::~WebPage()
</span><span class="lines">@@ -2595,9 +2590,6 @@
</span><span class="cx">     ViewState::Flags changed = m_viewState ^ viewState;
</span><span class="cx">     m_viewState = viewState;
</span><span class="cx"> 
</span><del>-    if (changed)
-        updateUserActivity();
-
</del><span class="cx">     m_page-&gt;setViewState(viewState);
</span><span class="cx">     for (auto* pluginView : m_pluginViews)
</span><span class="cx">         pluginView-&gt;viewStateDidChange(changed);
</span><span class="lines">@@ -3233,12 +3225,6 @@
</span><span class="cx"> 
</span><span class="cx">     RuntimeEnabledFeatures::sharedFeatures().setModernMediaControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::modernMediaControlsEnabledKey()));
</span><span class="cx"> 
</span><del>-    bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
-    if (m_processSuppressionEnabled != processSuppressionEnabled) {
-        m_processSuppressionEnabled = processSuppressionEnabled;
-        updateUserActivity();
-    }
-
</del><span class="cx">     platformPreferencesDidChange(store);
</span><span class="cx"> 
</span><span class="cx">     if (m_drawingArea)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (207423 => 207424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-10-17 19:54:04 UTC (rev 207423)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-10-17 20:18:38 UTC (rev 207424)
</span><span class="lines">@@ -926,6 +926,7 @@
</span><span class="cx">     bool shouldDispatchFakeMouseMoveEvents() const { return m_shouldDispatchFakeMouseMoveEvents; }
</span><span class="cx"> 
</span><span class="cx">     void setPageActivityState(WebCore::PageActivityState::Flags);
</span><ins>+    void setPageSuppressed(bool);
</ins><span class="cx"> 
</span><span class="cx">     void postMessage(const String&amp; messageName, API::Object* messageBody);
</span><span class="cx">     void postSynchronousMessageForTesting(const String&amp; messageName, API::Object* messageBody, RefPtr&lt;API::Object&gt;&amp; returnData);
</span><span class="lines">@@ -1039,8 +1040,6 @@
</span><span class="cx">     void executeEditCommand(const String&amp;, const String&amp;);
</span><span class="cx">     void setEditable(bool);
</span><span class="cx"> 
</span><del>-    void updateUserActivity();
-
</del><span class="cx">     void mouseEvent(const WebMouseEvent&amp;);
</span><span class="cx">     void keyEvent(const WebKeyboardEvent&amp;);
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="lines">@@ -1476,9 +1475,7 @@
</span><span class="cx">     bool m_useAsyncScrolling;
</span><span class="cx"> 
</span><span class="cx">     WebCore::ViewState::Flags m_viewState;
</span><del>-    WebCore::PageActivityState::Flags m_activityState;
</del><span class="cx"> 
</span><del>-    bool m_processSuppressionEnabled;
</del><span class="cx">     UserActivity m_userActivity;
</span><span class="cx"> 
</span><span class="cx">     uint64_t m_pendingNavigationID;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (207423 => 207424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-10-17 19:54:04 UTC (rev 207423)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-10-17 20:18:38 UTC (rev 207424)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx">     SetInitialFocus(bool forward, bool isKeyboardEventValid, WebKit::WebKeyboardEvent event, uint64_t callbackID)
</span><span class="cx">     SetViewState(unsigned viewState, bool wantsDidUpdateViewState, Vector&lt;uint64_t&gt; callbackIDs)
</span><span class="cx">     SetLayerHostingMode(enum WebKit::LayerHostingMode layerHostingMode)
</span><ins>+    SetPageSuppressed(bool pageSuppressed)
</ins><span class="cx"> 
</span><span class="cx">     SetDrawsBackground(bool drawsBackground)
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>