本文整理汇总了C++中RenderLayerBacking::hasScrollingLayer方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderLayerBacking::hasScrollingLayer方法的具体用法?C++ RenderLayerBacking::hasScrollingLayer怎么用?C++ RenderLayerBacking::hasScrollingLayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderLayerBacking
的用法示例。
在下文中一共展示了RenderLayerBacking::hasScrollingLayer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: registerMockedHttpURLLoad
TEST_F(ScrollingCoordinatorChromiumTest, touchOverflowScrolling)
{
registerMockedHttpURLLoad("touch-overflow-scrolling.html");
navigateTo(m_baseURL + "touch-overflow-scrolling.html");
// Verify the properties of the accelerated scrolling element starting from the RenderObject
// all the way to the WebLayer.
Element* scrollableElement = m_webViewImpl->mainFrameImpl()->frame()->document()->getElementById("scrollable");
ASSERT(scrollableElement);
RenderObject* renderer = scrollableElement->renderer();
ASSERT_TRUE(renderer->isBoxModelObject());
ASSERT_TRUE(renderer->hasLayer());
RenderLayer* layer = toRenderBoxModelObject(renderer)->layer();
ASSERT_TRUE(layer->usesCompositedScrolling());
ASSERT_TRUE(layer->isComposited());
RenderLayerBacking* layerBacking = layer->backing();
ASSERT_TRUE(layerBacking->hasScrollingLayer());
ASSERT(layerBacking->scrollingContentsLayer());
GraphicsLayerChromium* graphicsLayerChromium = static_cast<GraphicsLayerChromium*>(layerBacking->scrollingContentsLayer());
ASSERT_EQ(layer, graphicsLayerChromium->scrollableArea());
WebLayer* webScrollLayer = static_cast<WebLayer*>(layerBacking->scrollingContentsLayer()->platformLayer());
ASSERT_TRUE(webScrollLayer->scrollable());
}