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..f1e4f3954e713c0dfb2ce8037fdce48615c569a3 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
@@ -831,7 +831,14 @@ void PaintLayerCompositor::setIsInWindow(bool isInWindow) { |
void PaintLayerCompositor::updateRootLayerPosition() { |
if (m_rootContentLayer) { |
- const IntRect& documentRect = m_layoutView.documentRect(); |
+ IntRect documentRect = m_layoutView.documentRect(); |
+ |
+ // Ensure the root content layer is at least the size of the outer viewport |
+ // so that we don't end up clipping position: fixed elements if the |
+ // document is smaller. |
+ documentRect.unite(IntRect(documentRect.location(), |
+ m_layoutView.frameView()->visibleContentSize())); |
+ |
m_rootContentLayer->setSize(FloatSize(documentRect.size())); |
m_rootContentLayer->setPosition(documentRect.location()); |
} |