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

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

Issue 2386263002: Don't pixel-snap box size before applying transform to it. (Closed)
Patch Set: none Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/transforms/percentage-transform-fractional-box-size-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 !child->isPaintInvalidationContainer()); 386 !child->isPaintInvalidationContainer());
387 } 387 }
388 } 388 }
389 389
390 void PaintLayer::updateTransformationMatrix() { 390 void PaintLayer::updateTransformationMatrix() {
391 if (TransformationMatrix* transform = this->transform()) { 391 if (TransformationMatrix* transform = this->transform()) {
392 LayoutBox* box = layoutBox(); 392 LayoutBox* box = layoutBox();
393 ASSERT(box); 393 ASSERT(box);
394 transform->makeIdentity(); 394 transform->makeIdentity();
395 box->style()->applyTransform( 395 box->style()->applyTransform(
396 *transform, LayoutSize(box->pixelSnappedSize()), 396 *transform, box->size(), ComputedStyle::IncludeTransformOrigin,
397 ComputedStyle::IncludeTransformOrigin, ComputedStyle::IncludeMotionPath, 397 ComputedStyle::IncludeMotionPath,
398 ComputedStyle::IncludeIndependentTransformProperties); 398 ComputedStyle::IncludeIndependentTransformProperties);
399 makeMatrixRenderable(*transform, compositor()->hasAcceleratedCompositing()); 399 makeMatrixRenderable(*transform, compositor()->hasAcceleratedCompositing());
400 } 400 }
401 } 401 }
402 402
403 void PaintLayer::updateTransform(const ComputedStyle* oldStyle, 403 void PaintLayer::updateTransform(const ComputedStyle* oldStyle,
404 const ComputedStyle& newStyle) { 404 const ComputedStyle& newStyle) {
405 if (oldStyle && newStyle.transformDataEquivalent(*oldStyle)) 405 if (oldStyle && newStyle.transformDataEquivalent(*oldStyle))
406 return; 406 return;
407 407
(...skipping 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after
3207 } 3207 }
3208 3208
3209 void showLayerTree(const blink::LayoutObject* layoutObject) { 3209 void showLayerTree(const blink::LayoutObject* layoutObject) {
3210 if (!layoutObject) { 3210 if (!layoutObject) {
3211 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 3211 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
3212 return; 3212 return;
3213 } 3213 }
3214 showLayerTree(layoutObject->enclosingLayer()); 3214 showLayerTree(layoutObject->enclosingLayer());
3215 } 3215 }
3216 #endif 3216 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/transforms/percentage-transform-fractional-box-size-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698