| 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 f1ecdfa63692fe8c7e2134668be174c57723f868..0a63f2ef7547b09b1c4a7201af1fc5dd818a8daf 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
|
| @@ -475,15 +475,15 @@ void LayoutView::invalidatePaintForViewAndCompositedLayers()
|
| compositor()->fullyInvalidatePaint();
|
| }
|
|
|
| -void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* invalidationState) const
|
| +bool LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* invalidationState, bool edgeInclusive) const
|
| {
|
| - mapToVisibleRectInAncestorSpace(ancestor, rect, IsNotFixedPosition, invalidationState);
|
| + return mapToVisibleRectInAncestorSpace(ancestor, rect, IsNotFixedPosition, invalidationState, false);
|
| }
|
|
|
| -void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, ViewportConstrainedPosition viewportConstraint, const PaintInvalidationState* state) const
|
| +bool LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, ViewportConstrainedPosition viewportConstraint, const PaintInvalidationState* state, bool edgeInclusive) const
|
| {
|
| if (document().printing())
|
| - return;
|
| + return true;
|
|
|
| if (style()->isFlippedBlocksWritingMode()) {
|
| // We have to flip by hand since the view's logical height has not been determined. We
|
| @@ -502,17 +502,22 @@ void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc
|
|
|
| ASSERT(ancestor);
|
| if (ancestor == this)
|
| - return;
|
| + return true;
|
|
|
| Element* owner = document().ownerElement();
|
| if (!owner)
|
| - return;
|
| + return true;
|
|
|
| if (LayoutBox* obj = owner->layoutBox()) {
|
| if (!state || !state->viewClippingAndScrollOffsetDisabled()) {
|
| // Intersect the viewport with the paint invalidation rect.
|
| LayoutRect viewRectangle = viewRect();
|
| - rect.intersect(viewRectangle);
|
| + if (edgeInclusive) {
|
| + if (!rect.inclusiveIntersect(viewRectangle))
|
| + return false;
|
| + } else {
|
| + rect.intersect(viewRectangle);
|
| + }
|
|
|
| // Adjust for scroll offset of the view.
|
| rect.moveBy(-viewRectangle.location());
|
| @@ -520,8 +525,10 @@ void LayoutView::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc
|
|
|
| // Adjust for frame border.
|
| rect.move(obj->contentBoxOffset());
|
| - obj->mapToVisibleRectInAncestorSpace(ancestor, rect, 0);
|
| + return obj->mapToVisibleRectInAncestorSpace(ancestor, rect, 0, edgeInclusive);
|
| }
|
| +
|
| + return true;
|
| }
|
|
|
| void LayoutView::adjustViewportConstrainedOffset(LayoutRect& rect, ViewportConstrainedPosition viewportConstraint) const
|
|
|