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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 // |paintInvalidationContainer| may have a local 2D transform on it, so take
that into account when mapping into the space of the | 529 // |paintInvalidationContainer| may have a local 2D transform on it, so take
that into account when mapping into the space of the |
530 // transformed ancestor. | 530 // transformed ancestor. |
531 rect = LayoutRect(paintInvalidationContainer->localToContainerQuad(FloatRect
(rect), transformedAncestor).boundingBox()); | 531 rect = LayoutRect(paintInvalidationContainer->localToContainerQuad(FloatRect
(rect), transformedAncestor).boundingBox()); |
532 | 532 |
533 rect.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTr
ansformedAncestor()); | 533 rect.moveBy(-paintInvalidationLayer->groupedMapping()->squashingOffsetFromTr
ansformedAncestor()); |
534 } | 534 } |
535 | 535 |
536 void PaintLayer::mapRectToPaintInvalidationBacking(const LayoutObject* layoutObj
ect, const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect& rect, c
onst PaintInvalidationState* paintInvalidationState) | 536 void PaintLayer::mapRectToPaintInvalidationBacking(const LayoutObject* layoutObj
ect, const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect& rect, c
onst PaintInvalidationState* paintInvalidationState) |
537 { | 537 { |
538 if (!paintInvalidationContainer->layer()->groupedMapping()) { | 538 if (!paintInvalidationContainer->layer()->groupedMapping()) { |
539 layoutObject->mapRectToPaintInvalidationBacking(paintInvalidationContain
er, rect, paintInvalidationState); | 539 layoutObject->mapToVisibleRectInContainerSpace(paintInvalidationContaine
r, rect, paintInvalidationState); |
540 return; | 540 return; |
541 } | 541 } |
542 | 542 |
543 // This code adjusts the paint invalidation rectangle to be in the space of
the transformed ancestor of the grouped (i.e. squashed) | 543 // This code adjusts the paint invalidation rectangle to be in the space of
the transformed ancestor of the grouped (i.e. squashed) |
544 // layer. This is because all layers that squash together need to issue pain
t invalidations w.r.t. a single container that is | 544 // layer. This is because all layers that squash together need to issue pain
t invalidations w.r.t. a single container that is |
545 // an ancestor of all of them, in order to properly take into account any lo
cal transforms etc. | 545 // an ancestor of all of them, in order to properly take into account any lo
cal transforms etc. |
546 // FIXME: remove this special-case code that works around the paint invalida
tion code structure. | 546 // FIXME: remove this special-case code that works around the paint invalida
tion code structure. |
547 layoutObject->mapRectToPaintInvalidationBacking(paintInvalidationContainer,
rect, paintInvalidationState); | 547 layoutObject->mapToVisibleRectInContainerSpace(paintInvalidationContainer, r
ect, paintInvalidationState); |
548 | 548 |
549 mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect); | 549 mapRectToPaintBackingCoordinates(paintInvalidationContainer, rect); |
550 } | 550 } |
551 | 551 |
552 LayoutRect PaintLayer::computePaintInvalidationRect(const LayoutObject& layoutOb
ject, const PaintLayer* paintInvalidationContainer, const PaintInvalidationState
* paintInvalidationState) | 552 LayoutRect PaintLayer::computePaintInvalidationRect(const LayoutObject& layoutOb
ject, const PaintLayer* paintInvalidationContainer, const PaintInvalidationState
* paintInvalidationState) |
553 { | 553 { |
554 if (!paintInvalidationContainer->groupedMapping()) | 554 if (!paintInvalidationContainer->groupedMapping()) |
555 return layoutObject.computePaintInvalidationRect(*paintInvalidationConta
iner->layoutObject(), paintInvalidationState); | 555 return layoutObject.computePaintInvalidationRect(*paintInvalidationConta
iner->layoutObject(), paintInvalidationState); |
556 | 556 |
557 LayoutRect rect = layoutObject.clippedOverflowRectForPaintInvalidation(paint
InvalidationContainer->layoutObject(), paintInvalidationState); | 557 LayoutRect rect = layoutObject.clippedOverflowRectForPaintInvalidation(paint
InvalidationContainer->layoutObject(), paintInvalidationState); |
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2780 | 2780 |
2781 void showLayerTree(const blink::LayoutObject* layoutObject) | 2781 void showLayerTree(const blink::LayoutObject* layoutObject) |
2782 { | 2782 { |
2783 if (!layoutObject) { | 2783 if (!layoutObject) { |
2784 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2784 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2785 return; | 2785 return; |
2786 } | 2786 } |
2787 showLayerTree(layoutObject->enclosingLayer()); | 2787 showLayerTree(layoutObject->enclosingLayer()); |
2788 } | 2788 } |
2789 #endif | 2789 #endif |
OLD | NEW |