OLD | NEW |
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 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 } | 1574 } |
1575 | 1575 |
1576 bool CompositedLayerMapping::hasVisibleNonCompositingDescendant(RenderLayer* par
ent) | 1576 bool CompositedLayerMapping::hasVisibleNonCompositingDescendant(RenderLayer* par
ent) |
1577 { | 1577 { |
1578 if (!parent->hasVisibleDescendant()) | 1578 if (!parent->hasVisibleDescendant()) |
1579 return false; | 1579 return false; |
1580 | 1580 |
1581 // FIXME: We shouldn't be called with a stale z-order lists. See bug 85512. | 1581 // FIXME: We shouldn't be called with a stale z-order lists. See bug 85512. |
1582 parent->stackingNode()->updateLayerListsIfNeeded(); | 1582 parent->stackingNode()->updateLayerListsIfNeeded(); |
1583 | 1583 |
1584 #if !ASSERT_DISABLED | 1584 #if ASSERT_ENABLED |
1585 LayerListMutationDetector mutationChecker(parent->stackingNode()); | 1585 LayerListMutationDetector mutationChecker(parent->stackingNode()); |
1586 #endif | 1586 #endif |
1587 | 1587 |
1588 RenderLayerStackingNodeIterator normalFlowIterator(*parent->stackingNode(),
AllChildren); | 1588 RenderLayerStackingNodeIterator normalFlowIterator(*parent->stackingNode(),
AllChildren); |
1589 while (RenderLayerStackingNode* curNode = normalFlowIterator.next()) { | 1589 while (RenderLayerStackingNode* curNode = normalFlowIterator.next()) { |
1590 RenderLayer* curLayer = curNode->layer(); | 1590 RenderLayer* curLayer = curNode->layer(); |
1591 if (curLayer->hasCompositedLayerMapping()) | 1591 if (curLayer->hasCompositedLayerMapping()) |
1592 continue; | 1592 continue; |
1593 if (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(
curLayer)) | 1593 if (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(
curLayer)) |
1594 return true; | 1594 return true; |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 return GraphicsLayerUpdater::ForceUpdate; | 1839 return GraphicsLayerUpdater::ForceUpdate; |
1840 return updateType; | 1840 return updateType; |
1841 } | 1841 } |
1842 | 1842 |
1843 void CompositedLayerMapping::clearNeedsGraphicsLayerUpdate() | 1843 void CompositedLayerMapping::clearNeedsGraphicsLayerUpdate() |
1844 { | 1844 { |
1845 m_needToUpdateGraphicsLayer = false; | 1845 m_needToUpdateGraphicsLayer = false; |
1846 m_needToUpdateGraphicsLayerOfAllDecendants = false; | 1846 m_needToUpdateGraphicsLayerOfAllDecendants = false; |
1847 } | 1847 } |
1848 | 1848 |
1849 #if !ASSERT_DISABLED | 1849 #if ASSERT_ENABLED |
1850 | 1850 |
1851 void CompositedLayerMapping::assertNeedsToUpdateGraphicsLayerBitsCleared() | 1851 void CompositedLayerMapping::assertNeedsToUpdateGraphicsLayerBitsCleared() |
1852 { | 1852 { |
1853 ASSERT(!m_needToUpdateGraphicsLayer); | 1853 ASSERT(!m_needToUpdateGraphicsLayer); |
1854 ASSERT(!m_needToUpdateGraphicsLayerOfAllDecendants); | 1854 ASSERT(!m_needToUpdateGraphicsLayerOfAllDecendants); |
1855 } | 1855 } |
1856 | 1856 |
1857 #endif | 1857 #endif |
1858 | 1858 |
1859 struct SetContentsNeedsDisplayFunctor { | 1859 struct SetContentsNeedsDisplayFunctor { |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2212 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2212 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2213 name = "Scrolling Contents Layer"; | 2213 name = "Scrolling Contents Layer"; |
2214 } else { | 2214 } else { |
2215 ASSERT_NOT_REACHED(); | 2215 ASSERT_NOT_REACHED(); |
2216 } | 2216 } |
2217 | 2217 |
2218 return name; | 2218 return name; |
2219 } | 2219 } |
2220 | 2220 |
2221 } // namespace WebCore | 2221 } // namespace WebCore |
OLD | NEW |