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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2543913002: Generalize visible descendant dirty bits to prepare for more properties. (Closed)
Patch Set: none Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 m_layerForHorizontalScrollbar, false, 1765 m_layerForHorizontalScrollbar, false,
1766 CompositingReasonLayerForHorizontalScrollbar); 1766 CompositingReasonLayerForHorizontalScrollbar);
1767 if (m_layerForVerticalScrollbar && needsVerticalScrollbarLayer && 1767 if (m_layerForVerticalScrollbar && needsVerticalScrollbarLayer &&
1768 scrollableArea->shouldRebuildVerticalScrollbarLayer()) 1768 scrollableArea->shouldRebuildVerticalScrollbarLayer())
1769 toggleScrollbarLayerIfNeeded(m_layerForVerticalScrollbar, false, 1769 toggleScrollbarLayerIfNeeded(m_layerForVerticalScrollbar, false,
1770 CompositingReasonLayerForVerticalScrollbar); 1770 CompositingReasonLayerForVerticalScrollbar);
1771 scrollableArea->resetRebuildScrollbarLayerFlags(); 1771 scrollableArea->resetRebuildScrollbarLayerFlags();
1772 } 1772 }
1773 1773
1774 // If the subtree is invisible, we don't actually need scrollbar layers. 1774 // If the subtree is invisible, we don't actually need scrollbar layers.
1775 bool invisible = m_owningLayer.subtreeIsInvisible(); 1775 // Only do this check if at least one of the bits is currently true.
1776 needsHorizontalScrollbarLayer &= !invisible; 1776 // This is important because this method is called during the destructor
1777 needsVerticalScrollbarLayer &= !invisible; 1777 // of CompositedLayerMapping, which may happen during style recalc,
1778 needsScrollCornerLayer &= !invisible; 1778 // and therefore visible content status may be invalid.
1779 if (needsHorizontalScrollbarLayer || needsVerticalScrollbarLayer ||
1780 needsScrollCornerLayer) {
1781 bool invisible = m_owningLayer.subtreeIsInvisible();
1782 needsHorizontalScrollbarLayer &= !invisible;
1783 needsVerticalScrollbarLayer &= !invisible;
1784 needsScrollCornerLayer &= !invisible;
1785 }
1779 1786
1780 bool horizontalScrollbarLayerChanged = toggleScrollbarLayerIfNeeded( 1787 bool horizontalScrollbarLayerChanged = toggleScrollbarLayerIfNeeded(
1781 m_layerForHorizontalScrollbar, needsHorizontalScrollbarLayer, 1788 m_layerForHorizontalScrollbar, needsHorizontalScrollbarLayer,
1782 CompositingReasonLayerForHorizontalScrollbar); 1789 CompositingReasonLayerForHorizontalScrollbar);
1783 bool verticalScrollbarLayerChanged = toggleScrollbarLayerIfNeeded( 1790 bool verticalScrollbarLayerChanged = toggleScrollbarLayerIfNeeded(
1784 m_layerForVerticalScrollbar, needsVerticalScrollbarLayer, 1791 m_layerForVerticalScrollbar, needsVerticalScrollbarLayer,
1785 CompositingReasonLayerForVerticalScrollbar); 1792 CompositingReasonLayerForVerticalScrollbar);
1786 bool scrollCornerLayerChanged = toggleScrollbarLayerIfNeeded( 1793 bool scrollCornerLayerChanged = toggleScrollbarLayerIfNeeded(
1787 m_layerForScrollCorner, needsScrollCornerLayer, 1794 m_layerForScrollCorner, needsScrollCornerLayer,
1788 CompositingReasonLayerForScrollCorner); 1795 CompositingReasonLayerForScrollCorner);
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
3358 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { 3365 } else if (graphicsLayer == m_decorationOutlineLayer.get()) {
3359 name = "Decoration Layer"; 3366 name = "Decoration Layer";
3360 } else { 3367 } else {
3361 ASSERT_NOT_REACHED(); 3368 ASSERT_NOT_REACHED();
3362 } 3369 }
3363 3370
3364 return name; 3371 return name;
3365 } 3372 }
3366 3373
3367 } // namespace blink 3374 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698