• barraclough@apple.com's avatar
    Move ViewState to WebCore · aecbfa41
    barraclough@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=126488
    
    Reviewed by Anders Carlson.
    
    This change also partial reverts handling of LayerHostingMode, making this
    a separate message again. With hindsight the new way of doing this wasn't
    in all ways simpler, and it won't make sense to move this to WebCore.
    
    Source/WebCore: 
    
    * WebCore.xcodeproj/project.pbxproj:
    * page/ViewState.h: Added.
        - Moved from WebKit2, will be used by Page & FocusController.
    
    Source/WebKit2: 
    
    * Shared/ViewState.h: Removed.
        - Moved to WebCore.
    * Shared/WebPageCreationParameters.cpp:
    (WebKit::WebPageCreationParameters::encode):
    (WebKit::WebPageCreationParameters::decode):
    * Shared/WebPageCreationParameters.h:
        - Added layerHostingMode.
    * UIProcess/API/mac/PageClientImpl.h:
    * UIProcess/API/mac/PageClientImpl.mm:
    (WebKit::PageClientImpl::PageClientImpl):
    (WebKit::PageClientImpl::viewLayerHostingMode):
    * UIProcess/PageClient.h:
    (WebKit::PageClient::viewLayerHostingMode):
        - Revert isLayerWindowServerHosted -> viewLayerHostingMode.
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::WebPageProxy):
        - Added back m_layerHostingMode.
    (WebKit::WebPageProxy::updateViewState):
        - Removed IsLayerWindowServerHosted from ViewState.
    (WebKit::WebPageProxy::viewStateDidChange):
        - Added SetLayerHostingMode message.
    (WebKit::WebPageProxy::initializeCreationParameters):
        - Pass layerHostingMode.
    * UIProcess/WebPageProxy.h:
    (WebKit::WebPageProxy::isInWindow):
    (WebKit::WebPageProxy::isViewVisible):
        - ViewState moved to WebCore.
    * WebKit2.xcodeproj/project.pbxproj:
        - Removed ViewState.
    * WebProcess/Plugins/PluginView.cpp:
    (WebKit::PluginView::setLayerHostingMode):
    (WebKit::PluginView::platformViewStateDidChange):
        - Separated setLayerHostingMode from platformViewStateDidChange.
    * WebProcess/Plugins/PluginView.h:
    * WebProcess/WebPage/DrawingArea.h:
    (WebKit::DrawingArea::viewStateDidChange):
    (WebKit::DrawingArea::setLayerHostingMode):
        - Added virtual function, overridden in TiledCoreAnimationDrawingArea.
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::WebPage):
    (WebKit::WebPage::setLayerHostingMode):
        - Separated setLayerHostingMode from platformViewStateDidChange.
    * WebProcess/WebPage/WebPage.h:
    (WebKit::WebPage::isVisible):
    (WebKit::WebPage::layerHostingMode):
        - ViewState moved to WebCore.
    * WebProcess/WebPage/WebPage.messages.in:
        - Added SetLayerHostingMode message.
    * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
    * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
    (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
        - viewStateDidChange no longer calls setLayerHostingMode (this is called by WebPage).
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    aecbfa41