Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositingLayerAssigner.cpp

Issue 1835833005: Don't squash layers with non-translation transforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 if (layer->scrollParent() && layer->hasCompositingDescendant()) 160 if (layer->scrollParent() && layer->hasCompositingDescendant())
161 return SquashingDisallowedReasonScrollChildWithCompositedDescendants; 161 return SquashingDisallowedReasonScrollChildWithCompositedDescendants;
162 162
163 if (layer->opacityAncestor() != squashingLayer.opacityAncestor()) 163 if (layer->opacityAncestor() != squashingLayer.opacityAncestor())
164 return SquashingDisallowedReasonOpacityAncestorMismatch; 164 return SquashingDisallowedReasonOpacityAncestorMismatch;
165 165
166 if (layer->transformAncestor() != squashingLayer.transformAncestor()) 166 if (layer->transformAncestor() != squashingLayer.transformAncestor())
167 return SquashingDisallowedReasonTransformAncestorMismatch; 167 return SquashingDisallowedReasonTransformAncestorMismatch;
168 168
169 if (layer->transform() && !layer->transform()->isIdentityOrTranslation())
170 return SquashingDisallowedReasonNonTranslationTransform;
171
169 if (layer->renderingContextRoot() != squashingLayer.renderingContextRoot()) 172 if (layer->renderingContextRoot() != squashingLayer.renderingContextRoot())
170 return SquashingDisallowedReasonRenderingContextMismatch; 173 return SquashingDisallowedReasonRenderingContextMismatch;
171 174
172 if (layer->hasFilter() || layer->filterAncestor() != squashingLayer.filterAn cestor()) 175 if (layer->hasFilter() || layer->filterAncestor() != squashingLayer.filterAn cestor())
173 return SquashingDisallowedReasonFilterMismatch; 176 return SquashingDisallowedReasonFilterMismatch;
174 177
175 if (layer->nearestFixedPositionLayer() != squashingLayer.nearestFixedPositio nLayer()) 178 if (layer->nearestFixedPositionLayer() != squashingLayer.nearestFixedPositio nLayer())
176 return SquashingDisallowedReasonNearestFixedPositionMismatch; 179 return SquashingDisallowedReasonNearestFixedPositionMismatch;
177 ASSERT(layer->layoutObject()->style()->position() != FixedPosition); 180 ASSERT(layer->layoutObject()->style()->position() != FixedPosition);
178 181
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 309
307 PaintLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowCh ildren | PositiveZOrderChildren); 310 PaintLayerStackingNodeIterator iterator(*layer->stackingNode(), NormalFlowCh ildren | PositiveZOrderChildren);
308 while (PaintLayerStackingNode* curNode = iterator.next()) 311 while (PaintLayerStackingNode* curNode = iterator.next())
309 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN eedingPaintInvalidation); 312 assignLayersToBackingsInternal(curNode->layer(), squashingState, layersN eedingPaintInvalidation);
310 313
311 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping ->owningLayer() == layer) 314 if (squashingState.hasMostRecentMapping && &squashingState.mostRecentMapping ->owningLayer() == layer)
312 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true; 315 squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree = true;
313 } 316 }
314 317
315 } // namespace blink 318 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698