Chromium Code Reviews| Index: Source/core/layout/LayoutView.cpp |
| diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp |
| index f100481a8ab8727510cb2745c1dc77de5c6c09f4..a36296a800ef84a557a2eebf8bccec9233c7a9b9 100644 |
| --- a/Source/core/layout/LayoutView.cpp |
| +++ b/Source/core/layout/LayoutView.cpp |
| @@ -195,16 +195,14 @@ bool LayoutView::shouldDoFullPaintInvalidationForNextLayout() const |
| return true; |
| if (size().height() != viewLogicalHeightForBoxSizing()) { |
| - if (LayoutObject* backgroundLayoutObject = this->backgroundLayoutObject()) { |
| - // When background-attachment is 'fixed', we treat the viewport (instead of the 'root' |
| - // i.e. html or body) as the background positioning area, and we should full paint invalidation |
| - // viewport resize if the background image is not composited and needs full paint invalidation on |
| - // background positioning area resize. |
| - if (!m_compositor || !m_compositor->needsFixedRootBackgroundLayer(layer())) { |
| - if (backgroundLayoutObject->style()->hasFixedBackgroundImage() |
| - && mustInvalidateFillLayersPaintOnHeightChange(backgroundLayoutObject->style()->backgroundLayers())) |
| - return true; |
| - } |
| + // When background-attachment is 'fixed', we treat the viewport (instead of the 'root' |
| + // i.e. html or body) as the background positioning area, and we should full paint invalidation |
| + // viewport resize if the background image is not composited and needs full paint invalidation on |
| + // background positioning area resize. |
| + if (!m_compositor || !m_compositor->needsFixedRootBackgroundLayer(layer())) { |
| + if (style()->hasFixedBackgroundImage() |
| + && mustInvalidateFillLayersPaintOnHeightChange(style()->backgroundLayers())) |
| + return true; |
| } |
| } |
| @@ -270,6 +268,13 @@ void LayoutView::layout() |
| clearNeedsLayout(); |
| } |
| +LayoutRect LayoutView::visualOverflowRect() const |
| +{ |
| + if (document().settings() && document().settings()->rootLayerScrolls()) |
| + return LayoutBlockFlow::visualOverflowRect(); |
| + return LayoutRect(unscaledDocumentRect()); |
|
chrishtr
2015/06/08 20:30:58
Add a TODO to remove unscaledDocumentRect() in ano
trchen
2015/06/08 22:46:55
Done in the header.
|
| +} |
| + |
| void LayoutView::mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const |
| { |
| ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == static_cast<bool>(mode & IsFixed)); |
| @@ -844,18 +849,7 @@ IntRect LayoutView::unscaledDocumentRect() const |
| bool LayoutView::rootBackgroundIsEntirelyFixed() const |
| { |
| - if (LayoutObject* backgroundLayoutObject = this->backgroundLayoutObject()) |
| - return backgroundLayoutObject->style()->hasEntirelyFixedBackground(); |
| - return false; |
| -} |
| - |
| -LayoutObject* LayoutView::backgroundLayoutObject() const |
| -{ |
| - if (Element* documentElement = document().documentElement()) { |
| - if (LayoutObject* rootObject = documentElement->layoutObject()) |
| - return rootObject->layoutObjectForRootBackground(); |
| - } |
| - return 0; |
| + return style()->hasEntirelyFixedBackground(); |
| } |
| LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundLayoutObject) const |