| 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 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2175 LayerPaintingInfo transformedPaintingInfo(this, enclosingIntRect(transform.i
nverse().mapRect(paintingInfo.paintDirtyRect)), paintingInfo.paintBehavior, | 2175 LayerPaintingInfo transformedPaintingInfo(this, enclosingIntRect(transform.i
nverse().mapRect(paintingInfo.paintDirtyRect)), paintingInfo.paintBehavior, |
| 2176 adjustedSubPixelAccumulation, paintingInfo.paintingRoot, paintingInfo.ov
erlapTestRequests); | 2176 adjustedSubPixelAccumulation, paintingInfo.paintingRoot, paintingInfo.ov
erlapTestRequests); |
| 2177 paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags
); | 2177 paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags
); |
| 2178 } | 2178 } |
| 2179 | 2179 |
| 2180 void RenderLayer::paintChildren(unsigned childrenToVisit, GraphicsContext* conte
xt, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) | 2180 void RenderLayer::paintChildren(unsigned childrenToVisit, GraphicsContext* conte
xt, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) |
| 2181 { | 2181 { |
| 2182 if (!hasSelfPaintingLayerDescendant()) | 2182 if (!hasSelfPaintingLayerDescendant()) |
| 2183 return; | 2183 return; |
| 2184 | 2184 |
| 2185 #if !ASSERT_DISABLED | 2185 #if ASSERT_ENABLED |
| 2186 LayerListMutationDetector mutationChecker(m_stackingNode.get()); | 2186 LayerListMutationDetector mutationChecker(m_stackingNode.get()); |
| 2187 #endif | 2187 #endif |
| 2188 | 2188 |
| 2189 RenderLayerStackingNodeIterator iterator(*m_stackingNode, childrenToVisit); | 2189 RenderLayerStackingNodeIterator iterator(*m_stackingNode, childrenToVisit); |
| 2190 while (RenderLayerStackingNode* child = iterator.next()) { | 2190 while (RenderLayerStackingNode* child = iterator.next()) { |
| 2191 RenderLayer* childLayer = child->layer(); | 2191 RenderLayer* childLayer = child->layer(); |
| 2192 | 2192 |
| 2193 // Squashed RenderLayers should not paint into their ancestor. | 2193 // Squashed RenderLayers should not paint into their ancestor. |
| 2194 if (childLayer->compositingState() == PaintsIntoGroupedBacking) | 2194 if (childLayer->compositingState() == PaintsIntoGroupedBacking) |
| 2195 continue; | 2195 continue; |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3299 LayoutPoint origin; | 3299 LayoutPoint origin; |
| 3300 LayoutRect result = physicalBoundingBox(ancestorLayer, &origin); | 3300 LayoutRect result = physicalBoundingBox(ancestorLayer, &origin); |
| 3301 | 3301 |
| 3302 if (m_reflectionInfo && !m_reflectionInfo->reflectionLayer()->hasCompositedL
ayerMapping()) | 3302 if (m_reflectionInfo && !m_reflectionInfo->reflectionLayer()->hasCompositedL
ayerMapping()) |
| 3303 result.unite(m_reflectionInfo->reflectionLayer()->physicalBoundingBox(th
is)); | 3303 result.unite(m_reflectionInfo->reflectionLayer()->physicalBoundingBox(th
is)); |
| 3304 | 3304 |
| 3305 ASSERT(m_stackingNode->isStackingContext() || !m_stackingNode->hasPositiveZO
rderList()); | 3305 ASSERT(m_stackingNode->isStackingContext() || !m_stackingNode->hasPositiveZO
rderList()); |
| 3306 | 3306 |
| 3307 const_cast<RenderLayer*>(this)->stackingNode()->updateLayerListsIfNeeded(); | 3307 const_cast<RenderLayer*>(this)->stackingNode()->updateLayerListsIfNeeded(); |
| 3308 | 3308 |
| 3309 #if !ASSERT_DISABLED | 3309 #if ASSERT_ENABLED |
| 3310 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this)->st
ackingNode()); | 3310 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this)->st
ackingNode()); |
| 3311 #endif | 3311 #endif |
| 3312 | 3312 |
| 3313 RenderLayerStackingNodeIterator iterator(*m_stackingNode.get(), AllChildren)
; | 3313 RenderLayerStackingNodeIterator iterator(*m_stackingNode.get(), AllChildren)
; |
| 3314 while (RenderLayerStackingNode* node = iterator.next()) { | 3314 while (RenderLayerStackingNode* node = iterator.next()) { |
| 3315 if (node->layer()->hasCompositedLayerMapping()) | 3315 if (node->layer()->hasCompositedLayerMapping()) |
| 3316 continue; | 3316 continue; |
| 3317 // FIXME: Can we call physicalBoundingBoxIncludingReflectionAndStackingC
hildren instead of boundingBoxForCompositing? | 3317 // FIXME: Can we call physicalBoundingBoxIncludingReflectionAndStackingC
hildren instead of boundingBoxForCompositing? |
| 3318 result.unite(node->layer()->boundingBoxForCompositing(this)); | 3318 result.unite(node->layer()->boundingBoxForCompositing(this)); |
| 3319 } | 3319 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3369 LayoutPoint origin; | 3369 LayoutPoint origin; |
| 3370 LayoutRect result = physicalBoundingBox(ancestorLayer, &origin); | 3370 LayoutRect result = physicalBoundingBox(ancestorLayer, &origin); |
| 3371 | 3371 |
| 3372 const_cast<RenderLayer*>(this)->stackingNode()->updateLayerListsIfNeeded(); | 3372 const_cast<RenderLayer*>(this)->stackingNode()->updateLayerListsIfNeeded(); |
| 3373 | 3373 |
| 3374 if (m_reflectionInfo && !m_reflectionInfo->reflectionLayer()->hasCompositedL
ayerMapping()) | 3374 if (m_reflectionInfo && !m_reflectionInfo->reflectionLayer()->hasCompositedL
ayerMapping()) |
| 3375 result.unite(m_reflectionInfo->reflectionLayer()->boundingBoxForComposit
ing(this)); | 3375 result.unite(m_reflectionInfo->reflectionLayer()->boundingBoxForComposit
ing(this)); |
| 3376 | 3376 |
| 3377 ASSERT(m_stackingNode->isStackingContext() || !m_stackingNode->hasPositiveZO
rderList()); | 3377 ASSERT(m_stackingNode->isStackingContext() || !m_stackingNode->hasPositiveZO
rderList()); |
| 3378 | 3378 |
| 3379 #if !ASSERT_DISABLED | 3379 #if ASSERT_ENABLED |
| 3380 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this)->st
ackingNode()); | 3380 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this)->st
ackingNode()); |
| 3381 #endif | 3381 #endif |
| 3382 | 3382 |
| 3383 // Reflections are implemented with RenderLayers that hang off of the reflec
ted layer. However, | 3383 // Reflections are implemented with RenderLayers that hang off of the reflec
ted layer. However, |
| 3384 // the reflection layer subtree does not include the subtree of the parent R
enderLayer, so | 3384 // the reflection layer subtree does not include the subtree of the parent R
enderLayer, so |
| 3385 // a recursive computation of stacking children yields no results. This brea
ks cases when there are stacking | 3385 // a recursive computation of stacking children yields no results. This brea
ks cases when there are stacking |
| 3386 // children of the parent, that need to be included in reflected composited
bounds. | 3386 // children of the parent, that need to be included in reflected composited
bounds. |
| 3387 // Fix this by including composited bounds of stacking children of the refle
cted RenderLayer. | 3387 // Fix this by including composited bounds of stacking children of the refle
cted RenderLayer. |
| 3388 if (parent() && parent()->reflectionInfo() && parent()->reflectionInfo()->re
flectionLayer() == this) | 3388 if (parent() && parent()->reflectionInfo() && parent()->reflectionInfo()->re
flectionLayer() == this) |
| 3389 expandCompositingRectForStackingChildren(parent(), options, result); | 3389 expandCompositingRectForStackingChildren(parent(), options, result); |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3864 } | 3864 } |
| 3865 } | 3865 } |
| 3866 | 3866 |
| 3867 void showLayerTree(const WebCore::RenderObject* renderer) | 3867 void showLayerTree(const WebCore::RenderObject* renderer) |
| 3868 { | 3868 { |
| 3869 if (!renderer) | 3869 if (!renderer) |
| 3870 return; | 3870 return; |
| 3871 showLayerTree(renderer->enclosingLayer()); | 3871 showLayerTree(renderer->enclosingLayer()); |
| 3872 } | 3872 } |
| 3873 #endif | 3873 #endif |
| OLD | NEW |