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..8476b142066903e12674924a19602bce7160e7ee 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 global root scroller must always size to the root FrameView. |
+ if (rootLayer() && rootLayer()->isGlobalRootScroller()) |
+ 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( |