Chromium Code Reviews| 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 e1996a4c26dd98496167a80bbab5e6e8f2430eb8..bd1a25c887e6bd6ca5bed4267b6c4c4001bd06ac 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp |
| @@ -2427,7 +2427,14 @@ bool PaintLayer::intersectsDamageRect(const LayoutRect& layerBounds, |
| } |
| LayoutRect PaintLayer::logicalBoundingBox() const { |
| - return layoutObject()->visualOverflowRect(); |
| + LayoutRect rect = layoutObject()->visualOverflowRect(); |
| + |
| + if (isRootLayer()) { |
| + rect.unite( |
| + LayoutRect(rect.location(), layoutObject()->view()->viewRect().size())); |
| + } |
| + |
| + return rect; |
| } |
| static inline LayoutRect flippedLogicalBoundingBox( |
| @@ -2541,8 +2548,16 @@ LayoutRect PaintLayer::boundingBoxForCompositing( |
| return LayoutRect(); |
| // Without composited scrolling, the root layer is the size of the document. |
| - if (isRootLayer() && !needsCompositedScrolling()) |
| - return LayoutRect(m_layoutObject->view()->documentRect()); |
| + if (isRootLayer()) { |
|
skobes
2016/11/23 00:13:24
You can keep this line as it was and remove the !n
bokan
2016/11/23 22:49:32
Done.
|
| + IntRect documentRect = layoutObject()->view()->documentRect(); |
| + |
| + if (FrameView* frameView = layoutObject()->document().view()) { |
| + documentRect.unite(IntRect(IntPoint(), frameView->visibleContentSize())); |
| + } |
| + |
| + if (!needsCompositedScrolling()) |
| + return LayoutRect(documentRect); |
| + } |
| // The layer created for the LayoutFlowThread is just a helper for painting |
| // and hit-testing, and should not contribute to the bounding box. The |