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

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

Powered by Google App Engine
This is Rietveld 408576698