| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 | 586 |
| 587 LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderO
bject, const RenderLayer* paintInvalidationContainer, const PaintInvalidationSta
te* paintInvalidationState) | 587 LayoutRect RenderLayer::computePaintInvalidationRect(const RenderObject* renderO
bject, const RenderLayer* paintInvalidationContainer, const PaintInvalidationSta
te* paintInvalidationState) |
| 588 { | 588 { |
| 589 if (!paintInvalidationContainer->groupedMapping()) | 589 if (!paintInvalidationContainer->groupedMapping()) |
| 590 return renderObject->computePaintInvalidationRect(paintInvalidationConta
iner->renderer(), paintInvalidationState); | 590 return renderObject->computePaintInvalidationRect(paintInvalidationConta
iner->renderer(), paintInvalidationState); |
| 591 LayoutRect rect = renderObject->clippedOverflowRectForPaintInvalidation(pain
tInvalidationContainer->renderer()); | 591 LayoutRect rect = renderObject->clippedOverflowRectForPaintInvalidation(pain
tInvalidationContainer->renderer()); |
| 592 mapRectToPaintInvalidationBacking(paintInvalidationContainer->renderer(), pa
intInvalidationContainer->renderer(), rect, paintInvalidationState); | 592 mapRectToPaintInvalidationBacking(paintInvalidationContainer->renderer(), pa
intInvalidationContainer->renderer(), rect, paintInvalidationState); |
| 593 return rect; | 593 return rect; |
| 594 } | 594 } |
| 595 | 595 |
| 596 void RenderLayer::setHasVisibleContent() | |
| 597 { | |
| 598 if (m_hasVisibleContent && !m_visibleContentStatusDirty) { | |
| 599 ASSERT(!parent() || parent()->m_visibleDescendantStatusDirty || parent()
->hasVisibleDescendant()); | |
| 600 return; | |
| 601 } | |
| 602 | |
| 603 m_hasVisibleContent = true; | |
| 604 m_visibleContentStatusDirty = false; | |
| 605 | |
| 606 setNeedsCompositingInputsUpdate(); | |
| 607 m_renderer->setPreviousPaintInvalidationRect(m_renderer->boundsRectForPaintI
nvalidation(m_renderer->containerForPaintInvalidation())); | |
| 608 | |
| 609 if (parent()) | |
| 610 parent()->dirtyAncestorChainVisibleDescendantStatus(); | |
| 611 } | |
| 612 | |
| 613 void RenderLayer::dirtyVisibleContentStatus() | 596 void RenderLayer::dirtyVisibleContentStatus() |
| 614 { | 597 { |
| 615 m_visibleContentStatusDirty = true; | 598 m_visibleContentStatusDirty = true; |
| 616 if (parent()) | 599 if (parent()) |
| 617 parent()->dirtyAncestorChainVisibleDescendantStatus(); | 600 parent()->dirtyAncestorChainVisibleDescendantStatus(); |
| 618 } | 601 } |
| 619 | 602 |
| 620 void RenderLayer::potentiallyDirtyVisibleContentStatus(EVisibility visibility) | 603 void RenderLayer::potentiallyDirtyVisibleContentStatus(EVisibility visibility) |
| 621 { | 604 { |
| 622 if (m_visibleContentStatusDirty) | 605 if (m_visibleContentStatusDirty) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 if (r == renderer()) | 721 if (r == renderer()) |
| 739 r = 0; | 722 r = 0; |
| 740 } while (r && !r->nextSibling()); | 723 } while (r && !r->nextSibling()); |
| 741 if (r) | 724 if (r) |
| 742 r = r->nextSibling(); | 725 r = r->nextSibling(); |
| 743 } | 726 } |
| 744 } | 727 } |
| 745 } | 728 } |
| 746 m_visibleContentStatusDirty = false; | 729 m_visibleContentStatusDirty = false; |
| 747 | 730 |
| 748 // FIXME: We can remove this code once we remove the recursive tree | 731 if (hasVisibleContent() != previouslyHasVisibleContent) { |
| 749 // walk inside updateGraphicsLayerGeometry. | |
| 750 if (hasVisibleContent() != previouslyHasVisibleContent) | |
| 751 setNeedsCompositingInputsUpdate(); | 732 setNeedsCompositingInputsUpdate(); |
| 733 // We need to tell m_renderer to recheck its rect because we |
| 734 // pretend that invisible RenderObjects have 0x0 rects. Changing |
| 735 // visibility therefore changes our rect and we need to visit |
| 736 // this RenderObject during the invalidateTreeIfNeeded walk. |
| 737 m_renderer->setMayNeedPaintInvalidation(true); |
| 738 } |
| 752 } | 739 } |
| 753 } | 740 } |
| 754 | 741 |
| 755 void RenderLayer::dirty3DTransformedDescendantStatus() | 742 void RenderLayer::dirty3DTransformedDescendantStatus() |
| 756 { | 743 { |
| 757 RenderLayerStackingNode* stackingNode = m_stackingNode->ancestorStackingCont
extNode(); | 744 RenderLayerStackingNode* stackingNode = m_stackingNode->ancestorStackingCont
extNode(); |
| 758 if (!stackingNode) | 745 if (!stackingNode) |
| 759 return; | 746 return; |
| 760 | 747 |
| 761 stackingNode->layer()->m_3DTransformedDescendantStatusDirty = true; | 748 stackingNode->layer()->m_3DTransformedDescendantStatusDirty = true; |
| (...skipping 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3758 } | 3745 } |
| 3759 } | 3746 } |
| 3760 | 3747 |
| 3761 void showLayerTree(const blink::RenderObject* renderer) | 3748 void showLayerTree(const blink::RenderObject* renderer) |
| 3762 { | 3749 { |
| 3763 if (!renderer) | 3750 if (!renderer) |
| 3764 return; | 3751 return; |
| 3765 showLayerTree(renderer->enclosingLayer()); | 3752 showLayerTree(renderer->enclosingLayer()); |
| 3766 } | 3753 } |
| 3767 #endif | 3754 #endif |
| OLD | NEW |