| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 return SquashingDisallowedReasonFilterMismatch; | 176 return SquashingDisallowedReasonFilterMismatch; |
| 177 | 177 |
| 178 if (layer->nearestFixedPositionLayer() != squashingLayer.nearestFixedPositio
nLayer()) | 178 if (layer->nearestFixedPositionLayer() != squashingLayer.nearestFixedPositio
nLayer()) |
| 179 return SquashingDisallowedReasonNearestFixedPositionMismatch; | 179 return SquashingDisallowedReasonNearestFixedPositionMismatch; |
| 180 ASSERT(layer->layoutObject()->style()->position() != FixedPosition); | 180 ASSERT(layer->layoutObject()->style()->position() != FixedPosition); |
| 181 | 181 |
| 182 if ((squashingLayer.layoutObject()->style()->subtreeWillChangeContents() &&
squashingLayer.layoutObject()->style()->isRunningAnimationOnCompositor()) | 182 if ((squashingLayer.layoutObject()->style()->subtreeWillChangeContents() &&
squashingLayer.layoutObject()->style()->isRunningAnimationOnCompositor()) |
| 183 || squashingLayer.layoutObject()->style()->shouldCompositeForCurrentAnim
ations()) | 183 || squashingLayer.layoutObject()->style()->shouldCompositeForCurrentAnim
ations()) |
| 184 return SquashingDisallowedReasonSquashingLayerIsAnimating; | 184 return SquashingDisallowedReasonSquashingLayerIsAnimating; |
| 185 | 185 |
| 186 if (layer->enclosingPaginationLayer()) |
| 187 return SquashingDisallowedReasonFragmentedContent; |
| 188 |
| 186 return SquashingDisallowedReasonsNone; | 189 return SquashingDisallowedReasonsNone; |
| 187 } | 190 } |
| 188 | 191 |
| 189 void CompositingLayerAssigner::updateSquashingAssignment(PaintLayer* layer, Squa
shingState& squashingState, const CompositingStateTransitionType compositedLayer
Update, | 192 void CompositingLayerAssigner::updateSquashingAssignment(PaintLayer* layer, Squa
shingState& squashingState, const CompositingStateTransitionType compositedLayer
Update, |
| 190 Vector<PaintLayer*>& layersNeedingPaintInvalidation) | 193 Vector<PaintLayer*>& layersNeedingPaintInvalidation) |
| 191 { | 194 { |
| 192 // NOTE: In the future as we generalize this, the background of this layer m
ay need to be assigned to a different backing than | 195 // NOTE: In the future as we generalize this, the background of this layer m
ay need to be assigned to a different backing than |
| 193 // the squashed PaintLayer's own primary contents. This would happen when we
have a composited negative z-index element that needs | 196 // the squashed PaintLayer's own primary contents. This would happen when we
have a composited negative z-index element that needs |
| 194 // to paint on top of the background, but below the layer's main contents. F
or now, because we always composite layers | 197 // to paint on top of the background, but below the layer's main contents. F
or now, because we always composite layers |
| 195 // when they have a composited negative z-index child, such layers will neve
r need squashing so it is not yet an issue. | 198 // when they have a composited negative z-index child, such layers will neve
r need squashing so it is not yet an issue. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 312 |
| 310 PaintLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowCh
ildren | PositiveZOrderChildren); | 313 PaintLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowCh
ildren | PositiveZOrderChildren); |
| 311 while (PaintLayerStackingNode* curNode = iterator.next()) | 314 while (PaintLayerStackingNode* curNode = iterator.next()) |
| 312 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN
eedingPaintInvalidation); | 315 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN
eedingPaintInvalidation); |
| 313 | 316 |
| 314 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping
->owningLayer() == layer) | 317 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping
->owningLayer() == layer) |
| 315 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; | 318 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; |
| 316 } | 319 } |
| 317 | 320 |
| 318 } // namespace blink | 321 } // namespace blink |
| OLD | NEW |