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 2020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2031 LayerPaintingInfo transformedPaintingInfo(this, enclosingIntRect(transform.i
nverse().mapRect(paintingInfo.paintDirtyRect)), paintingInfo.paintBehavior, | 2031 LayerPaintingInfo transformedPaintingInfo(this, enclosingIntRect(transform.i
nverse().mapRect(paintingInfo.paintDirtyRect)), paintingInfo.paintBehavior, |
2032 adjustedSubPixelAccumulation, paintingInfo.paintingRoot, paintingInfo.ov
erlapTestRequests); | 2032 adjustedSubPixelAccumulation, paintingInfo.paintingRoot, paintingInfo.ov
erlapTestRequests); |
2033 paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags
); | 2033 paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags
); |
2034 } | 2034 } |
2035 | 2035 |
2036 void RenderLayer::paintChildren(unsigned childrenToVisit, GraphicsContext* conte
xt, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) | 2036 void RenderLayer::paintChildren(unsigned childrenToVisit, GraphicsContext* conte
xt, const LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) |
2037 { | 2037 { |
2038 if (!hasSelfPaintingLayerDescendant()) | 2038 if (!hasSelfPaintingLayerDescendant()) |
2039 return; | 2039 return; |
2040 | 2040 |
2041 #if ASSERT_ENABLED | 2041 #if ENABLE(ASSERT) |
2042 LayerListMutationDetector mutationChecker(m_stackingNode.get()); | 2042 LayerListMutationDetector mutationChecker(m_stackingNode.get()); |
2043 #endif | 2043 #endif |
2044 | 2044 |
2045 RenderLayerStackingNodeIterator iterator(*m_stackingNode, childrenToVisit); | 2045 RenderLayerStackingNodeIterator iterator(*m_stackingNode, childrenToVisit); |
2046 while (RenderLayerStackingNode* child = iterator.next()) { | 2046 while (RenderLayerStackingNode* child = iterator.next()) { |
2047 RenderLayer* childLayer = child->layer(); | 2047 RenderLayer* childLayer = child->layer(); |
2048 | 2048 |
2049 // Squashed RenderLayers should not paint into their ancestor. | 2049 // Squashed RenderLayers should not paint into their ancestor. |
2050 if (childLayer->compositingState() == PaintsIntoGroupedBacking) | 2050 if (childLayer->compositingState() == PaintsIntoGroupedBacking) |
2051 continue; | 2051 continue; |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3174 return result; | 3174 return result; |
3175 } | 3175 } |
3176 | 3176 |
3177 static void expandRectForReflectionAndStackingChildren(const RenderLayer* ancest
orLayer, RenderLayer::CalculateBoundsOptions options, LayoutRect& result) | 3177 static void expandRectForReflectionAndStackingChildren(const RenderLayer* ancest
orLayer, RenderLayer::CalculateBoundsOptions options, LayoutRect& result) |
3178 { | 3178 { |
3179 if (ancestorLayer->reflectionInfo() && !ancestorLayer->reflectionInfo()->ref
lectionLayer()->hasCompositedLayerMapping()) | 3179 if (ancestorLayer->reflectionInfo() && !ancestorLayer->reflectionInfo()->ref
lectionLayer()->hasCompositedLayerMapping()) |
3180 result.unite(ancestorLayer->reflectionInfo()->reflectionLayer()->boundin
gBoxForCompositing(ancestorLayer)); | 3180 result.unite(ancestorLayer->reflectionInfo()->reflectionLayer()->boundin
gBoxForCompositing(ancestorLayer)); |
3181 | 3181 |
3182 ASSERT(ancestorLayer->stackingNode()->isStackingContext() || !ancestorLayer-
>stackingNode()->hasPositiveZOrderList()); | 3182 ASSERT(ancestorLayer->stackingNode()->isStackingContext() || !ancestorLayer-
>stackingNode()->hasPositiveZOrderList()); |
3183 | 3183 |
3184 #if ASSERT_ENABLED | 3184 #if ENABLE(ASSERT) |
3185 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(ancestorL
ayer)->stackingNode()); | 3185 LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(ancestorL
ayer)->stackingNode()); |
3186 #endif | 3186 #endif |
3187 | 3187 |
3188 RenderLayerStackingNodeIterator iterator(*ancestorLayer->stackingNode(), All
Children); | 3188 RenderLayerStackingNodeIterator iterator(*ancestorLayer->stackingNode(), All
Children); |
3189 while (RenderLayerStackingNode* node = iterator.next()) { | 3189 while (RenderLayerStackingNode* node = iterator.next()) { |
3190 // Here we exclude both directly composited layers and squashing layers | 3190 // Here we exclude both directly composited layers and squashing layers |
3191 // because those RenderLayers don't paint into the graphics layer | 3191 // because those RenderLayers don't paint into the graphics layer |
3192 // for this RenderLayer. For example, the bounds of squashed RenderLayer
s | 3192 // for this RenderLayer. For example, the bounds of squashed RenderLayer
s |
3193 // will be included in the computation of the appropriate squashing | 3193 // will be included in the computation of the appropriate squashing |
3194 // GraphicsLayer. | 3194 // GraphicsLayer. |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3786 } | 3786 } |
3787 } | 3787 } |
3788 | 3788 |
3789 void showLayerTree(const WebCore::RenderObject* renderer) | 3789 void showLayerTree(const WebCore::RenderObject* renderer) |
3790 { | 3790 { |
3791 if (!renderer) | 3791 if (!renderer) |
3792 return; | 3792 return; |
3793 showLayerTree(renderer->enclosingLayer()); | 3793 showLayerTree(renderer->enclosingLayer()); |
3794 } | 3794 } |
3795 #endif | 3795 #endif |
OLD | NEW |