Rename ViewState to ActivityState
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Nov 2016 18:05:28 +0000 (18:05 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Nov 2016 18:05:28 +0000 (18:05 +0000)
commit0dcc591466294c100bb917667cab5df22083a85a
tree57219fbd7fafdbce40f0af7ba7a2dc07acdb7590
parent6d037ba0d5f0bc89cca69f98ae6289573c0dd3ba
Rename ViewState to ActivityState
https://bugs.webkit.org/show_bug.cgi?id=164254

Reviewed by Andreas Kling.

We plan to add a couple more flags to ViewState that aren't directly related to the view
itself - whether there is an ongoing page load, and whether whether there is audio playback.
This will allow viewState (now activityState) to fully drive throttling decisions.

Renaming this bitfield accordingly.
Source/WebCore:

* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::GeolocationController):
(WebCore::GeolocationController::~GeolocationController):
(WebCore::GeolocationController::activityStateDidChange):
(WebCore::GeolocationController::viewStateDidChange): Deleted.
* Modules/geolocation/GeolocationController.h:
* WebCore.xcodeproj/project.pbxproj:
* page/ActivityState.h: Copied from Source/WebCore/page/ViewState.h.
* page/ActivityStateChangeObserver.h: Copied from Source/WebCore/page/ViewStateChangeObserver.h.
(WebCore::ActivityStateChangeObserver::~ActivityStateChangeObserver):
(WebCore::ViewStateChangeObserver::~ViewStateChangeObserver): Deleted.
* page/FocusController.cpp:
(WebCore::FocusController::FocusController):
(WebCore::FocusController::setFocused):
(WebCore::FocusController::setActivityState):
(WebCore::FocusController::setActive):
(WebCore::FocusController::setViewState): Deleted.
* page/FocusController.h:
(WebCore::FocusController::isActive):
(WebCore::FocusController::isFocused):
(WebCore::FocusController::contentIsVisible):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setIsInWindow):
(WebCore::Page::addActivityStateChangeObserver):
(WebCore::Page::removeActivityStateChangeObserver):
(WebCore::Page::updateTimerThrottlingState):
(WebCore::Page::setActivityState):
(WebCore::Page::isVisibleAndActive):
(WebCore::Page::setIsVisible):
(WebCore::Page::addViewStateChangeObserver): Deleted.
(WebCore::Page::removeViewStateChangeObserver): Deleted.
(WebCore::Page::setViewState): Deleted.
* page/Page.h:
(WebCore::Page::isVisible):
(WebCore::Page::isInWindow):
* page/PageThrottler.h:
* page/ViewState.h: Removed.
* page/ViewStateChangeObserver.h: Removed.

Source/WebKit2:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
(_WebKitWebViewBasePrivate::updateActivityStateTimerFired):
(webkitWebViewBaseScheduleUpdateActivityState):
(toplevelWindowFocusInEvent):
(toplevelWindowFocusOutEvent):
(toplevelWindowStateEvent):
(webkitWebViewBaseSetToplevelOnScreenWindow):
(webkitWebViewBaseMap):
(webkitWebViewBaseUnmap):
(webkitWebViewBaseSetFocus):
(webkitWebViewBaseIsInWindowActive):
(webkitWebViewBaseIsFocused):
(webkitWebViewBaseIsVisible):
(webkitWebViewBaseIsInWindow):
(_WebKitWebViewBasePrivate::updateViewStateTimerFired): Deleted.
(webkitWebViewBaseScheduleUpdateViewState): Deleted.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::resignFirstResponder):
(WebKit::WebViewImpl::windowDidOrderOffScreen):
(WebKit::WebViewImpl::windowDidOrderOnScreen):
(WebKit::WebViewImpl::windowDidBecomeKey):
(WebKit::WebViewImpl::windowDidResignKey):
(WebKit::WebViewImpl::windowDidMiniaturize):
(WebKit::WebViewImpl::windowDidDeminiaturize):
(WebKit::WebViewImpl::windowDidChangeOcclusionState):
(WebKit::WebViewImpl::viewDidMoveToWindow):
(WebKit::WebViewImpl::viewDidHide):
(WebKit::WebViewImpl::viewDidUnhide):
(WebKit::WebViewImpl::activeSpaceDidChange):
(WebKit::WebViewImpl::endDeferringViewInWindowChanges):
(WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
(WebKit::WebViewImpl::prepareForMoveToWindow):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::DrawingAreaProxy::waitForDidUpdateViewState): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::setSuppressVisibilityUpdates):
(WebKit::WebPageProxy::updateActivityState):
(WebKit::WebPageProxy::activityStateDidChange):
(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::updateThrottleState):
(WebKit::WebPageProxy::waitForDidUpdateActivityState):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
(WebKit::WebPageProxy::updateViewState): Deleted.
(WebKit::WebPageProxy::viewStateDidChange): Deleted.
(WebKit::WebPageProxy::dispatchViewStateChange): Deleted.
(WebKit::WebPageProxy::waitForDidUpdateViewState): Deleted.
(WebKit::WebPageProxy::installViewStateChangeCompletionHandler): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isInWindow):
(WebKit::WebPageProxy::didUpdateActivityState):
(WebKit::WebPageProxy::isViewVisible):
(WebKit::WebPageProxy::didUpdateViewState): Deleted.
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::windowServerConnectionStateChanged):
* UIProcess/efl/WebView.cpp:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationDidEnterBackground]):
(-[WKContentView _applicationWillEnterForeground]):
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _applicationDidEnterBackground]):
(-[WKPDFView _applicationWillEnterForeground]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState): Deleted.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::activityStateDidChange):
(WebKit::PluginView::viewStateDidChange): Deleted.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::activityStateDidChange):
(WebKit::AcceleratedDrawingArea::viewStateDidChange): Deleted.
* WebProcess/WebPage/AcceleratedDrawingArea.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::activityStateDidChange):
(WebKit::DrawingArea::viewStateDidChange): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::updateIsInWindow):
(WebKit::WebPage::setActivityState):
(WebKit::WebPage::setViewState): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::isVisible):
(WebKit::WebPage::isVisibleOrOccluded):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
(WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange): Deleted.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
(WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
(WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange): Deleted.
(WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
42 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/geolocation/GeolocationController.cpp
Source/WebCore/Modules/geolocation/GeolocationController.h
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/ActivityState.h [moved from Source/WebCore/page/ViewState.h with 98% similarity]
Source/WebCore/page/ActivityStateChangeObserver.h [moved from Source/WebCore/page/ViewStateChangeObserver.h with 86% similarity]
Source/WebCore/page/FocusController.cpp
Source/WebCore/page/FocusController.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/PageThrottler.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPageCreationParameters.cpp
Source/WebKit2/Shared/WebPageCreationParameters.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit2/UIProcess/DrawingAreaProxy.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/efl/WebView.cpp
Source/WebKit2/UIProcess/ios/WKContentView.mm
Source/WebKit2/UIProcess/ios/WKPDFView.mm
Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h
Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.h
Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp
Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm