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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2736513002: [RLS] Document's main GraphicsLayer size should not include overflow. (Closed)
Patch Set: drop unrelated dependent patchset Created 3 years, 9 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index ec9a1f44e5a2daeadd5c3321c54722094c5db494..5f2f9dba3fc95b5b4a3ef10b5386f4d4b71c0b96 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -2503,16 +2503,16 @@ LayoutRect PaintLayer::boundingBoxForCompositingInternal(
!hasVisibleDescendant())
return LayoutRect();
- // The root layer is the size of the document, plus any additional area due
- // to layout viewport being different than initial containing block.
if (isRootLayer()) {
- IntRect documentRect = layoutObject().view()->documentRect();
-
- if (FrameView* frameView = layoutObject().document().view()) {
- documentRect.unite(IntRect(IntPoint(), frameView->visibleContentSize()));
- }
-
- return LayoutRect(documentRect);
+ // In root layer scrolling mode, the main GraphicsLayer is the size of the
+ // layout viewport. In non-RLS mode, it is the union of the layout viewport
+ // and the document's layout overflow rect.
+ IntRect result = IntRect();
+ if (FrameView* frameView = layoutObject().frameView())
+ result = IntRect(IntPoint(), frameView->visibleContentSize());
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
+ result.unite(layoutObject().view()->documentRect());
+ return LayoutRect(result);
}
// The layer created for the LayoutFlowThread is just a helper for painting
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698