OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2014 Google Inc. All rights reserved. | 3 * Copyright (C) 2014 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 if (layer->renderer()->isVideo()) | 123 if (layer->renderer()->isVideo()) |
124 return false; | 124 return false; |
125 | 125 |
126 if (squashingWouldExceedSparsityTolerance(layer, squashingState)) | 126 if (squashingWouldExceedSparsityTolerance(layer, squashingState)) |
127 return false; | 127 return false; |
128 | 128 |
129 // FIXME: this is not efficient, since it walks up the tree . We should stor
e these values on the AncestorDependentPropertiesCache. | 129 // FIXME: this is not efficient, since it walks up the tree . We should stor
e these values on the AncestorDependentPropertiesCache. |
130 ASSERT(squashingState.hasMostRecentMapping); | 130 ASSERT(squashingState.hasMostRecentMapping); |
131 const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owning
Layer(); | 131 const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owning
Layer(); |
132 | 132 |
133 if (layer->renderer()->clippingContainer() != squashingLayer.renderer()->cli
ppingContainer()) | 133 if (layer->renderer()->clippingContainer() != squashingLayer.renderer()->cli
ppingContainer()) { |
134 return false; | 134 if (!squashingLayer.compositedLayerMapping()->containingSquashedLayer(la
yer->renderer()->clippingContainer())) |
| 135 return false; |
| 136 } |
135 | 137 |
136 // Composited descendants need to be clipped by a child contianment graphics
layer, which would not be available if the layer is | 138 // Composited descendants need to be clipped by a child contianment graphics
layer, which would not be available if the layer is |
137 if (m_compositor->clipsCompositingDescendants(layer)) | 139 if (m_compositor->clipsCompositingDescendants(layer)) |
138 return false; | 140 return false; |
139 | 141 |
140 if (layer->scrollsWithRespectTo(&squashingLayer)) | 142 if (layer->scrollsWithRespectTo(&squashingLayer)) |
141 return false; | 143 return false; |
142 | 144 |
143 const RenderLayer::AncestorDependentProperties& ancestorDependentProperties
= layer->ancestorDependentProperties(); | 145 const RenderLayer::AncestorDependentProperties& ancestorDependentProperties
= layer->ancestorDependentProperties(); |
144 const RenderLayer::AncestorDependentProperties& squashingLayerAncestorDepend
entProperties = squashingLayer.ancestorDependentProperties(); | 146 const RenderLayer::AncestorDependentProperties& squashingLayerAncestorDepend
entProperties = squashingLayer.ancestorDependentProperties(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 squashingState.updateSquashingStateForNewMapping(layer->compositedLa
yerMapping(), layer->hasCompositedLayerMapping(), offsetFromTransformedAncestorF
orSquashingCLM); | 273 squashingState.updateSquashingStateForNewMapping(layer->compositedLa
yerMapping(), layer->hasCompositedLayerMapping(), offsetFromTransformedAncestorF
orSquashingCLM); |
272 } | 274 } |
273 } | 275 } |
274 | 276 |
275 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC
hildren | PositiveZOrderChildren); | 277 RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowC
hildren | PositiveZOrderChildren); |
276 while (RenderLayerStackingNode* curNode = iterator.next()) | 278 while (RenderLayerStackingNode* curNode = iterator.next()) |
277 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersC
hanged); | 279 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersC
hanged); |
278 } | 280 } |
279 | 281 |
280 } | 282 } |
OLD | NEW |