| Index: third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| index 2e243242c277b07bfecacaeefadd0c68c8622202..2b5aa0d006fb5d8b96d99c667d24e762df0069d5 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| @@ -84,6 +84,8 @@ private:
|
|
|
| } // namespace
|
|
|
| +bool LayoutView::s_viewClippingAndScrollOffsetDisabled = false;
|
| +
|
| LayoutView::LayoutView(Document* document)
|
| : LayoutBlockFlow(document)
|
| , m_frameView(document->view())
|
| @@ -323,7 +325,7 @@ LayoutRect LayoutView::visualOverflowRect() const
|
| return LayoutRect(documentRect());
|
| }
|
|
|
| -void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
|
| +void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) const
|
| {
|
| ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == static_cast<bool>(mode & IsFixed));
|
|
|
| @@ -346,10 +348,11 @@ void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, Transf
|
|
|
| if (mode & TraverseDocumentBoundaries) {
|
| if (LayoutPart* parentDocLayoutObject = frame()->ownerLayoutObject()) {
|
| - transformState.move(-frame()->view()->scrollOffset());
|
| + if (!s_viewClippingAndScrollOffsetDisabled)
|
| + transformState.move(-frame()->view()->scrollOffset());
|
| transformState.move(parentDocLayoutObject->contentBoxOffset());
|
|
|
| - parentDocLayoutObject->mapLocalToAncestor(ancestor, transformState, mode, wasFixed, paintInvalidationState);
|
| + parentDocLayoutObject->mapLocalToAncestor(ancestor, transformState, mode, wasFixed);
|
| }
|
| }
|
| }
|
| @@ -444,7 +447,7 @@ void LayoutView::invalidateTreeIfNeeded(const PaintInvalidationState& paintInval
|
| LayoutRect dirtyRect = viewRect();
|
| if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) {
|
| const LayoutBoxModelObject& paintInvalidationContainer = paintInvalidationState.paintInvalidationContainer();
|
| - PaintLayer::mapRectToPaintInvalidationBacking(this, &paintInvalidationContainer, dirtyRect, &paintInvalidationState);
|
| + paintInvalidationState.mapLocalRectToPaintInvalidationBacking(dirtyRect);
|
| invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, PaintInvalidationFull);
|
| invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalidationContainer, paintInvalidationState, PaintInvalidationFull);
|
| }
|
| @@ -475,13 +478,12 @@ void LayoutView::invalidatePaintForViewAndCompositedLayers()
|
| compositor()->fullyInvalidatePaint();
|
| }
|
|
|
| -void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* invalidationState) const
|
| +void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect) const
|
| {
|
| - mapToVisibleRectInAncestorSpace(ancestor, rect, IsNotFixedPosition, invalidationState);
|
| + mapToVisibleRectInAncestorSpace(ancestor, rect, IsNotFixedPosition);
|
| }
|
|
|
| -void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, ViewportConstrainedPosition viewportConstraint,
|
| - const PaintInvalidationState* paintInvalidationState) const
|
| +void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, ViewportConstrainedPosition viewportConstraint) const
|
| {
|
| if (document().printing())
|
| return;
|
| @@ -512,7 +514,7 @@ void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc
|
| return;
|
|
|
| if (LayoutBox* obj = owner->layoutBox()) {
|
| - if (!paintInvalidationState || !paintInvalidationState->viewClippingAndScrollOffsetDisabled()) {
|
| + if (!s_viewClippingAndScrollOffsetDisabled) {
|
| // Intersect the viewport with the paint invalidation rect.
|
| LayoutRect viewRectangle = viewRect();
|
| rect.intersect(viewRectangle);
|
| @@ -523,7 +525,7 @@ void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc
|
|
|
| // Adjust for frame border.
|
| rect.move(obj->contentBoxOffset());
|
| - obj->mapToVisibleRectInAncestorSpace(ancestor, rect, 0);
|
| + obj->mapToVisibleRectInAncestorSpace(ancestor, rect);
|
| }
|
| }
|
|
|
|
|