| Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
|
| index 06a015ef2c4a8f2bacf9372b1d4ef78b07dbd2e5..bda59280e6ef8d758d05c0989bc0357085a21380 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
|
| @@ -633,16 +633,28 @@ void PaintLayerCompositor::frameViewDidChangeLocation(
|
| m_overflowControlsHostLayer->setPosition(contentsOffset);
|
| }
|
|
|
| +void PaintLayerCompositor::updateContainerSizes() {
|
| + if (!m_containerLayer)
|
| + return;
|
| +
|
| + FrameView* frameView = m_layoutView.frameView();
|
| +
|
| + // The root scroller must always size to the root FrameView.
|
| + if (rootLayer() && rootLayer()->isRootScroller())
|
| + frameView = m_layoutView.document().topDocument().view();
|
| +
|
| + m_containerLayer->setSize(FloatSize(frameView->visibleContentSize()));
|
| + m_overflowControlsHostLayer->setSize(
|
| + FloatSize(frameView->visibleContentSize(IncludeScrollbars)));
|
| +}
|
| +
|
| void PaintLayerCompositor::frameViewDidChangeSize() {
|
| - if (m_containerLayer) {
|
| - FrameView* frameView = m_layoutView.frameView();
|
| - m_containerLayer->setSize(FloatSize(frameView->visibleContentSize()));
|
| - m_overflowControlsHostLayer->setSize(
|
| - FloatSize(frameView->visibleContentSize(IncludeScrollbars)));
|
| + if (!m_containerLayer)
|
| + return;
|
|
|
| - frameViewDidScroll();
|
| - updateOverflowControlsLayers();
|
| - }
|
| + updateContainerSizes();
|
| + frameViewDidScroll();
|
| + updateOverflowControlsLayers();
|
| }
|
|
|
| enum AcceleratedFixedRootBackgroundHistogramBuckets {
|
| @@ -835,12 +847,8 @@ void PaintLayerCompositor::updateRootLayerPosition() {
|
| m_rootContentLayer->setSize(FloatSize(documentRect.size()));
|
| m_rootContentLayer->setPosition(documentRect.location());
|
| }
|
| - if (m_containerLayer) {
|
| - FrameView* frameView = m_layoutView.frameView();
|
| - m_containerLayer->setSize(FloatSize(frameView->visibleContentSize()));
|
| - m_overflowControlsHostLayer->setSize(
|
| - FloatSize(frameView->visibleContentSize(IncludeScrollbars)));
|
| - }
|
| + if (m_containerLayer)
|
| + updateContainerSizes();
|
| }
|
|
|
| void PaintLayerCompositor::updatePotentialCompositingReasonsFromStyle(
|
|
|