| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 box->style()->applyTransform( | 382 box->style()->applyTransform( |
| 383 *transform, box->size(), ComputedStyle::IncludeTransformOrigin, | 383 *transform, box->size(), ComputedStyle::IncludeTransformOrigin, |
| 384 ComputedStyle::IncludeMotionPath, | 384 ComputedStyle::IncludeMotionPath, |
| 385 ComputedStyle::IncludeIndependentTransformProperties); | 385 ComputedStyle::IncludeIndependentTransformProperties); |
| 386 makeMatrixRenderable(*transform, compositor()->hasAcceleratedCompositing()); | 386 makeMatrixRenderable(*transform, compositor()->hasAcceleratedCompositing()); |
| 387 } | 387 } |
| 388 } | 388 } |
| 389 | 389 |
| 390 void PaintLayer::updateTransform(const ComputedStyle* oldStyle, | 390 void PaintLayer::updateTransform(const ComputedStyle* oldStyle, |
| 391 const ComputedStyle& newStyle) { | 391 const ComputedStyle& newStyle) { |
| 392 if (oldStyle && newStyle.transformDataEquivalent(*oldStyle)) | 392 // It's possible for the old and new style transform data to be equivalent |
| 393 // while hasTransform() differs, as it checks a number of conditions aside |
| 394 // from just the matrix, including but not limited to animation state. |
| 395 if (oldStyle && oldStyle->hasTransform() == newStyle.hasTransform() && |
| 396 newStyle.transformDataEquivalent(*oldStyle)) { |
| 393 return; | 397 return; |
| 398 } |
| 394 | 399 |
| 395 // hasTransform() on the layoutObject is also true when there is | 400 // hasTransform() on the layoutObject is also true when there is |
| 396 // transform-style: preserve-3d or perspective set, so check style too. | 401 // transform-style: preserve-3d or perspective set, so check style too. |
| 397 bool hasTransform = | 402 bool hasTransform = |
| 398 layoutObject().hasTransformRelatedProperty() && newStyle.hasTransform(); | 403 layoutObject().hasTransformRelatedProperty() && newStyle.hasTransform(); |
| 399 bool had3DTransform = has3DTransform(); | 404 bool had3DTransform = has3DTransform(); |
| 400 | 405 |
| 401 bool hadTransform = transform(); | 406 bool hadTransform = transform(); |
| 402 if (hasTransform != hadTransform) { | 407 if (hasTransform != hadTransform) { |
| 403 if (hasTransform) | 408 if (hasTransform) |
| (...skipping 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3250 } | 3255 } |
| 3251 | 3256 |
| 3252 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3257 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3253 if (!layoutObject) { | 3258 if (!layoutObject) { |
| 3254 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3259 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
| 3255 return; | 3260 return; |
| 3256 } | 3261 } |
| 3257 showLayerTree(layoutObject->enclosingLayer()); | 3262 showLayerTree(layoutObject->enclosingLayer()); |
| 3258 } | 3263 } |
| 3259 #endif | 3264 #endif |
| OLD | NEW |