Simplify logic to prevent App Nap in WebPage
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 May 2019 01:28:26 +0000 (01:28 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 May 2019 01:28:26 +0000 (01:28 +0000)
commitf4315b19c290b12223930a0c711b9c5843825ce8
treeb5108e0e9a120a7c0ef03694122ba86d6ec8e966
parent82640321bbd8712542e1851ec57e527494ce3637
Simplify logic to prevent App Nap in WebPage
https://bugs.webkit.org/show_bug.cgi?id=197674

Reviewed by Geoff Garen.

Simplify logic to prevent App Nap in WebPage. We do not need both m_userActivityHysteresis and
m_userActivity since UserActivity is already a HysteresisActivity. We had 2 levels of
HysteresisActivity stacked on top of one another. Also rename "process suppression" to "app nap" as
I find it clearer.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateThrottleState):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::updatePreferences):
(WebKit::m_userActivityHysteresis): Deleted.
(WebKit::WebPage::updateUserActivity): Deleted.
* WebProcess/WebPage/WebPage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h