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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 parent()->dirtyAncestorChainVisibleDescendantStatus(); | 610 parent()->dirtyAncestorChainVisibleDescendantStatus(); |
611 } | 611 } |
612 | 612 |
613 void RenderLayer::dirtyVisibleContentStatus() | 613 void RenderLayer::dirtyVisibleContentStatus() |
614 { | 614 { |
615 m_visibleContentStatusDirty = true; | 615 m_visibleContentStatusDirty = true; |
616 if (parent()) | 616 if (parent()) |
617 parent()->dirtyAncestorChainVisibleDescendantStatus(); | 617 parent()->dirtyAncestorChainVisibleDescendantStatus(); |
618 } | 618 } |
619 | 619 |
| 620 void RenderLayer::potentiallyDirtyVisibleContentStatus(EVisibility visibility) |
| 621 { |
| 622 if (m_visibleContentStatusDirty) |
| 623 return; |
| 624 if (hasVisibleContent() == (visibility == VISIBLE)) |
| 625 return; |
| 626 dirtyVisibleContentStatus(); |
| 627 } |
| 628 |
620 void RenderLayer::dirtyAncestorChainVisibleDescendantStatus() | 629 void RenderLayer::dirtyAncestorChainVisibleDescendantStatus() |
621 { | 630 { |
622 for (RenderLayer* layer = this; layer; layer = layer->parent()) { | 631 for (RenderLayer* layer = this; layer; layer = layer->parent()) { |
623 if (layer->m_visibleDescendantStatusDirty) | 632 if (layer->m_visibleDescendantStatusDirty) |
624 break; | 633 break; |
625 | 634 |
626 layer->m_visibleDescendantStatusDirty = true; | 635 layer->m_visibleDescendantStatusDirty = true; |
627 } | 636 } |
628 } | 637 } |
629 | 638 |
(...skipping 3119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3749 } | 3758 } |
3750 } | 3759 } |
3751 | 3760 |
3752 void showLayerTree(const blink::RenderObject* renderer) | 3761 void showLayerTree(const blink::RenderObject* renderer) |
3753 { | 3762 { |
3754 if (!renderer) | 3763 if (!renderer) |
3755 return; | 3764 return; |
3756 showLayerTree(renderer->enclosingLayer()); | 3765 showLayerTree(renderer->enclosingLayer()); |
3757 } | 3766 } |
3758 #endif | 3767 #endif |
OLD | NEW |