Skip to content
  • jamesr@google.com's avatar
    [chromium] Switch PlatformLayer typedef to Platform API type for PLATFORM(CHROMIUM) · b0e0bc82
    jamesr@google.com authored
    https://bugs.webkit.org/show_bug.cgi?id=93335
    
    Reviewed by Adrienne Walker.
    
    Source/Platform:
    
    Add APIs to control scrolling behavior on WebScrollableLayer.
    
    * chromium/public/WebScrollableLayer.h:
    (WebScrollableLayer):
    
    Source/WebCore:
    
    This converts the PlatformLayer typedef to WebKit::WebLayer (part of the chromium Platform API) for the
    Chromium port. This involves some odd const_cast<>s in places since cross-platform interfaces assume that
    PlatformLayer is a potentially heavy implementation class, but WebLayer is a thin smart pointer type.
    
    * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
    (WebCore::createScrollbarLayer):
    (WebCore::ScrollingCoordinator::setScrollLayer):
    (WebCore::ScrollingCoordinator::setNonFastScrollableRegion):
    (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers):
    (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer):
    * platform/graphics/PlatformLayer.h:
    (WebKit):
    (WebCore):
    * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
    (WebCore::Canvas2DLayerBridge::layer):
    * platform/graphics/chromium/Canvas2DLayerBridge.h:
    (Canvas2DLayerBridge):
    * platform/graphics/chromium/DrawingBufferChromium.cpp:
    (WebCore::DrawingBufferPrivate::layer):
    * platform/graphics/chromium/GraphicsLayerChromium.cpp:
    (WebCore::GraphicsLayerChromium::removeFromParent):
    (WebCore::GraphicsLayerChromium::setDrawsContent):
    (WebCore::GraphicsLayerChromium::setContentsVisible):
    (WebCore::GraphicsLayerChromium::setMaskLayer):
    (WebCore::GraphicsLayerChromium::setContentsToCanvas):
    (WebCore::GraphicsLayerChromium::setContentsToMedia):
    (WebCore::GraphicsLayerChromium::primaryLayer):
    (WebCore::GraphicsLayerChromium::platformLayer):
    (WebCore::GraphicsLayerChromium::updateChildList):
    * platform/graphics/chromium/GraphicsLayerChromium.h:
    (GraphicsLayerChromium):
    
    Source/WebKit/chromium:
    
    Update for new PlatformLayer typedef. This removes knowledge of WebCore::LayerChromium from all classes
    except for NonCompositedContentHost, which still punches through for a few minor APIs that I'll address
    in a separate patch.
    
    * src/NonCompositedContentHost.cpp:
    (WebKit::NonCompositedContentHost::NonCompositedContentHost):
    (WebKit::NonCompositedContentHost::setScrollLayer):
    (WebKit::NonCompositedContentHost::scrollLayer):
    (WebKit::NonCompositedContentHost::notifySyncRequired):
    * src/WebMediaPlayerClientImpl.cpp:
    (WebKit::WebMediaPlayerClientImpl::platformLayer):
    * src/WebMediaPlayerClientImpl.h:
    (WebMediaPlayerClientImpl):
    * src/WebPluginContainerImpl.cpp:
    (WebKit::WebPluginContainerImpl::platformLayer):
    * src/WebPluginContainerImpl.h:
    (WebCore):
    (WebPluginContainerImpl):
    * src/WebScrollableLayer.cpp:
    (WebKit::WebScrollableLayer::setNonFastScrollableRegion):
    (WebKit):
    (WebKit::WebScrollableLayer::setIsContainerForFixedPositionLayers):
    (WebKit::WebScrollableLayer::setFixedToContainerLayer):
    * src/WebViewImpl.cpp:
    (WebKit::WebViewImpl::setRootGraphicsLayer):
    * tests/Canvas2DLayerBridgeTest.cpp:
    * tests/GraphicsLayerChromiumTest.cpp:
    (WebKitTests::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):
    (WebKitTests::TEST_F):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b0e0bc82