| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 // |paintInvalidationContainer| may have a local 2D transform on it, so take
that into account when mapping into the space of the | 588 // |paintInvalidationContainer| may have a local 2D transform on it, so take
that into account when mapping into the space of the |
| 589 // transformed ancestor. | 589 // transformed ancestor. |
| 590 rect = LayoutRect(paintInvalidationContainer->localToAncestorQuad(FloatRect(
rect), transformedAncestor).boundingBox()); | 590 rect = LayoutRect(paintInvalidationContainer->localToAncestorQuad(FloatRect(
rect), transformedAncestor).boundingBox()); |
| 591 | 591 |
| 592 rect.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTr
ansformedAncestor()); | 592 rect.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTr
ansformedAncestor()); |
| 593 } | 593 } |
| 594 | 594 |
| 595 void PaintLayer::mapRectToPaintInvalidationBacking(const LayoutObject* layoutObj
ect, const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect& rect, c
onst PaintInvalidationState* paintInvalidationState) | 595 void PaintLayer::mapRectToPaintInvalidationBacking(const LayoutObject* layoutObj
ect, const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect& rect, c
onst PaintInvalidationState* paintInvalidationState) |
| 596 { | 596 { |
| 597 if (!paintInvalidationContainer->layer()->groupedMapping()) { | 597 if (!paintInvalidationContainer->layer()->groupedMapping()) { |
| 598 layoutObject->mapToVisibleRectInAncestorSpace(paintInvalidationContainer
, rect, paintInvalidationState); | 598 layoutObject->mapToVisibleRectInAncestorSpace(paintInvalidationContainer
, rect, paintInvalidationState, false); |
| 599 return; | 599 return; |
| 600 } | 600 } |
| 601 | 601 |
| 602 // This code adjusts the paint invalidation rectangle to be in the space of
the transformed ancestor of the grouped (i.e. squashed) | 602 // This code adjusts the paint invalidation rectangle to be in the space of
the transformed ancestor of the grouped (i.e. squashed) |
| 603 // layer. This is because all layers that squash together need to issue pain
t invalidations w.r.t. a single container that is | 603 // layer. This is because all layers that squash together need to issue pain
t invalidations w.r.t. a single container that is |
| 604 // an ancestor of all of them, in order to properly take into account any lo
cal transforms etc. | 604 // an ancestor of all of them, in order to properly take into account any lo
cal transforms etc. |
| 605 // FIXME: remove this special-case code that works around the paint invalida
tion code structure. | 605 // FIXME: remove this special-case code that works around the paint invalida
tion code structure. |
| 606 layoutObject->mapToVisibleRectInAncestorSpace(paintInvalidationContainer, re
ct, paintInvalidationState); | 606 layoutObject->mapToVisibleRectInAncestorSpace(paintInvalidationContainer, re
ct, paintInvalidationState, false); |
| 607 | 607 |
| 608 mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect); | 608 mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect); |
| 609 } | 609 } |
| 610 | 610 |
| 611 LayoutRect PaintLayer::computePaintInvalidationRect(const LayoutObject& layoutOb
ject, const PaintLayer* paintInvalidationContainer, const PaintInvalidationState
* paintInvalidationState) | 611 LayoutRect PaintLayer::computePaintInvalidationRect(const LayoutObject& layoutOb
ject, const PaintLayer* paintInvalidationContainer, const PaintInvalidationState
* paintInvalidationState) |
| 612 { | 612 { |
| 613 if (!paintInvalidationContainer->groupedMapping()) | 613 if (!paintInvalidationContainer->groupedMapping()) |
| 614 return layoutObject.computePaintInvalidationRect(*paintInvalidationConta
iner->layoutObject(), paintInvalidationState); | 614 return layoutObject.computePaintInvalidationRect(*paintInvalidationConta
iner->layoutObject(), paintInvalidationState); |
| 615 | 615 |
| 616 LayoutRect rect = layoutObject.clippedOverflowRectForPaintInvalidation(paint
InvalidationContainer->layoutObject(), paintInvalidationState); | 616 LayoutRect rect = layoutObject.clippedOverflowRectForPaintInvalidation(paint
InvalidationContainer->layoutObject(), paintInvalidationState); |
| (...skipping 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2835 | 2835 |
| 2836 void showLayerTree(const blink::LayoutObject* layoutObject) | 2836 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2837 { | 2837 { |
| 2838 if (!layoutObject) { | 2838 if (!layoutObject) { |
| 2839 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2839 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2840 return; | 2840 return; |
| 2841 } | 2841 } |
| 2842 showLayerTree(layoutObject->enclosingLayer()); | 2842 showLayerTree(layoutObject->enclosingLayer()); |
| 2843 } | 2843 } |
| 2844 #endif | 2844 #endif |
| OLD | NEW |