Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 453113002: RenderLayer::hasVisibleContent should ASSERT(!m_visibleContentStatusDirty) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Slightly less Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698