Commit 74d86f50 authored by abarth@chromium.org's avatar abarth@chromium.org

Delete RenderLayerCompositor::requiresOverhangLayers

This function just returns whether we're the main frame.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/329423002

git-svn-id: svn://svn.chromium.org/blink/trunk@175996 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 65d50ad9
......@@ -956,26 +956,10 @@ bool RenderLayerCompositor::requiresScrollCornerLayer() const
return shouldCompositeOverflowControls(view) && view->isScrollCornerVisible();
}
#if USE(RUBBER_BANDING)
bool RenderLayerCompositor::requiresOverhangLayers() const
{
// We don't want a layer if this is a subframe.
if (!m_renderView.frame()->isMainFrame())
return false;
// We do want a layer if we have a scrolling coordinator and can scroll.
if (scrollingCoordinator() && m_renderView.frameView()->hasOpaqueBackground())
return true;
// Chromium always wants a layer.
return true;
}
#endif
void RenderLayerCompositor::updateOverflowControlsLayers()
{
#if USE(RUBBER_BANDING)
if (requiresOverhangLayers()) {
if (m_renderView.frame()->isMainFrame()) {
if (!m_layerForOverhangShadow) {
m_layerForOverhangShadow = GraphicsLayer::create(graphicsLayerFactory(), this);
OverscrollTheme::theme()->setUpOverhangShadowLayer(m_layerForOverhangShadow.get());
......@@ -983,10 +967,7 @@ void RenderLayerCompositor::updateOverflowControlsLayers()
m_scrollLayer->addChild(m_layerForOverhangShadow.get());
}
} else {
if (m_layerForOverhangShadow) {
m_layerForOverhangShadow->removeFromParent();
m_layerForOverhangShadow = nullptr;
}
ASSERT(!m_layerForOverhangShadow);
}
#endif
GraphicsLayer* controlsParent = m_rootTransformLayer.get() ? m_rootTransformLayer.get() : m_overflowControlsHostLayer.get();
......
......@@ -229,9 +229,6 @@ private:
bool requiresHorizontalScrollbarLayer() const;
bool requiresVerticalScrollbarLayer() const;
bool requiresScrollCornerLayer() const;
#if USE(RUBBER_BANDING)
bool requiresOverhangLayers() const;
#endif
void applyUpdateLayerCompositingStateChickenEggHacks(RenderLayer*, CompositingStateTransitionType compositedLayerUpdate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment