Chromium Code Reviews| 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() && | |
|
alancutter (OOO until 2018)
2017/03/22 00:31:08
Perhaps hasTransform() would be better named hasTr
wkorman
2017/03/22 01:28:01
Some kind of rename would definitely be helpful. E
| |
| 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 2820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3222 } | 3227 } |
| 3223 | 3228 |
| 3224 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3229 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3225 if (!layoutObject) { | 3230 if (!layoutObject) { |
| 3226 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3231 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
| 3227 return; | 3232 return; |
| 3228 } | 3233 } |
| 3229 showLayerTree(layoutObject->enclosingLayer()); | 3234 showLayerTree(layoutObject->enclosingLayer()); |
| 3230 } | 3235 } |
| 3231 #endif | 3236 #endif |
| OLD | NEW |