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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2888703002: Revert "Incorporate ComputedStyle::hasTransform when diffing transform styles." (Closed)
Patch Set: Created 3 years, 7 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) 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
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 // It's possible for the old and new style transform data to be equivalent 392 if (oldStyle && newStyle.transformDataEquivalent(*oldStyle))
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)) {
397 return; 393 return;
398 }
399 394
400 // hasTransform() on the layoutObject is also true when there is 395 // hasTransform() on the layoutObject is also true when there is
401 // transform-style: preserve-3d or perspective set, so check style too. 396 // transform-style: preserve-3d or perspective set, so check style too.
402 bool hasTransform = 397 bool hasTransform =
403 layoutObject().hasTransformRelatedProperty() && newStyle.hasTransform(); 398 layoutObject().hasTransformRelatedProperty() && newStyle.hasTransform();
404 bool had3DTransform = has3DTransform(); 399 bool had3DTransform = has3DTransform();
405 400
406 bool hadTransform = transform(); 401 bool hadTransform = transform();
407 if (hasTransform != hadTransform) { 402 if (hasTransform != hadTransform) {
408 if (hasTransform) 403 if (hasTransform)
(...skipping 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after
3255 } 3250 }
3256 3251
3257 void showLayerTree(const blink::LayoutObject* layoutObject) { 3252 void showLayerTree(const blink::LayoutObject* layoutObject) {
3258 if (!layoutObject) { 3253 if (!layoutObject) {
3259 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; 3254 LOG(INFO) << "Cannot showLayerTree. Root is (nil)";
3260 return; 3255 return;
3261 } 3256 }
3262 showLayerTree(layoutObject->enclosingLayer()); 3257 showLayerTree(layoutObject->enclosingLayer());
3263 } 3258 }
3264 #endif 3259 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698