| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 box->style()->applyTransform( | 380 box->style()->applyTransform( |
| 381 *transform, box->size(), ComputedStyle::IncludeTransformOrigin, | 381 *transform, box->size(), ComputedStyle::IncludeTransformOrigin, |
| 382 ComputedStyle::IncludeMotionPath, | 382 ComputedStyle::IncludeMotionPath, |
| 383 ComputedStyle::IncludeIndependentTransformProperties); | 383 ComputedStyle::IncludeIndependentTransformProperties); |
| 384 makeMatrixRenderable(*transform, compositor()->hasAcceleratedCompositing()); | 384 makeMatrixRenderable(*transform, compositor()->hasAcceleratedCompositing()); |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 | 387 |
| 388 void PaintLayer::updateTransform(const ComputedStyle* oldStyle, | 388 void PaintLayer::updateTransform(const ComputedStyle* oldStyle, |
| 389 const ComputedStyle& newStyle) { | 389 const ComputedStyle& newStyle) { |
| 390 if (oldStyle && newStyle.transformDataEquivalent(*oldStyle)) | 390 // It's possible for the old and new style transform data to be equivalent |
| 391 // while hasTransform() differs, as it checks a number of conditions aside |
| 392 // from just the matrix, including but not limited to animation state. |
| 393 if (oldStyle && oldStyle->hasTransform() == newStyle.hasTransform() && |
| 394 newStyle.transformDataEquivalent(*oldStyle)) { |
| 391 return; | 395 return; |
| 396 } |
| 392 | 397 |
| 393 // hasTransform() on the layoutObject is also true when there is | 398 // hasTransform() on the layoutObject is also true when there is |
| 394 // transform-style: preserve-3d or perspective set, so check style too. | 399 // transform-style: preserve-3d or perspective set, so check style too. |
| 395 bool hasTransform = | 400 bool hasTransform = |
| 396 layoutObject().hasTransformRelatedProperty() && newStyle.hasTransform(); | 401 layoutObject().hasTransformRelatedProperty() && newStyle.hasTransform(); |
| 397 bool had3DTransform = has3DTransform(); | 402 bool had3DTransform = has3DTransform(); |
| 398 | 403 |
| 399 bool hadTransform = transform(); | 404 bool hadTransform = transform(); |
| 400 if (hasTransform != hadTransform) { | 405 if (hasTransform != hadTransform) { |
| 401 if (hasTransform) | 406 if (hasTransform) |
| (...skipping 2843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3245 } | 3250 } |
| 3246 | 3251 |
| 3247 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3252 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3248 if (!layoutObject) { | 3253 if (!layoutObject) { |
| 3249 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3254 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
| 3250 return; | 3255 return; |
| 3251 } | 3256 } |
| 3252 showLayerTree(layoutObject->enclosingLayer()); | 3257 showLayerTree(layoutObject->enclosingLayer()); |
| 3253 } | 3258 } |
| 3254 #endif | 3259 #endif |
| OLD | NEW |