Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 2519163003: LayoutView's paint layer should clip to the full viewport size. (Closed)
Patch Set: Add test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698