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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp

Issue 2482753002: Fix matrix3d transform under page zoom (Closed)
Patch Set: Created 4 years, 1 month 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 toCSSPrimitiveValue(transformValue->item(5)).getDoubleValue(); 289 toCSSPrimitiveValue(transformValue->item(5)).getDoubleValue();
290 operations.operations().append( 290 operations.operations().append(
291 MatrixTransformOperation::create(a, b, c, d, e, f)); 291 MatrixTransformOperation::create(a, b, c, d, e, f));
292 break; 292 break;
293 } 293 }
294 case TransformOperation::Matrix3D: { 294 case TransformOperation::Matrix3D: {
295 TransformationMatrix matrix( 295 TransformationMatrix matrix(
296 toCSSPrimitiveValue(transformValue->item(0)).getDoubleValue(), 296 toCSSPrimitiveValue(transformValue->item(0)).getDoubleValue(),
297 toCSSPrimitiveValue(transformValue->item(1)).getDoubleValue(), 297 toCSSPrimitiveValue(transformValue->item(1)).getDoubleValue(),
298 toCSSPrimitiveValue(transformValue->item(2)).getDoubleValue(), 298 toCSSPrimitiveValue(transformValue->item(2)).getDoubleValue(),
299 toCSSPrimitiveValue(transformValue->item(3)).getDoubleValue(), 299 toCSSPrimitiveValue(transformValue->item(3)).getDoubleValue() /
300 zoomFactor,
300 toCSSPrimitiveValue(transformValue->item(4)).getDoubleValue(), 301 toCSSPrimitiveValue(transformValue->item(4)).getDoubleValue(),
301 toCSSPrimitiveValue(transformValue->item(5)).getDoubleValue(), 302 toCSSPrimitiveValue(transformValue->item(5)).getDoubleValue(),
302 toCSSPrimitiveValue(transformValue->item(6)).getDoubleValue(), 303 toCSSPrimitiveValue(transformValue->item(6)).getDoubleValue(),
303 toCSSPrimitiveValue(transformValue->item(7)).getDoubleValue(), 304 toCSSPrimitiveValue(transformValue->item(7)).getDoubleValue() /
305 zoomFactor,
304 toCSSPrimitiveValue(transformValue->item(8)).getDoubleValue(), 306 toCSSPrimitiveValue(transformValue->item(8)).getDoubleValue(),
305 toCSSPrimitiveValue(transformValue->item(9)).getDoubleValue(), 307 toCSSPrimitiveValue(transformValue->item(9)).getDoubleValue(),
306 toCSSPrimitiveValue(transformValue->item(10)).getDoubleValue(), 308 toCSSPrimitiveValue(transformValue->item(10)).getDoubleValue(),
307 toCSSPrimitiveValue(transformValue->item(11)).getDoubleValue(), 309 toCSSPrimitiveValue(transformValue->item(11)).getDoubleValue() /
310 zoomFactor,
308 zoomFactor * 311 zoomFactor *
309 toCSSPrimitiveValue(transformValue->item(12)).getDoubleValue(), 312 toCSSPrimitiveValue(transformValue->item(12)).getDoubleValue(),
310 zoomFactor * 313 zoomFactor *
311 toCSSPrimitiveValue(transformValue->item(13)).getDoubleValue(), 314 toCSSPrimitiveValue(transformValue->item(13)).getDoubleValue(),
312 toCSSPrimitiveValue(transformValue->item(14)).getDoubleValue(), 315 zoomFactor *
pdr. 2016/11/08 07:04:08 WDYT of extracting this out of the loop and only a
Franklin Ta 2016/11/08 07:52:18 You also have to refactor the zoom adjustment in t
Franklin Ta 2016/11/08 16:47:02 Btw @alancutter if you're not the owner for this,
316 toCSSPrimitiveValue(transformValue->item(14)).getDoubleValue(),
313 toCSSPrimitiveValue(transformValue->item(15)).getDoubleValue()); 317 toCSSPrimitiveValue(transformValue->item(15)).getDoubleValue());
314 operations.operations().append( 318 operations.operations().append(
315 Matrix3DTransformOperation::create(matrix)); 319 Matrix3DTransformOperation::create(matrix));
316 break; 320 break;
317 } 321 }
318 case TransformOperation::Perspective: { 322 case TransformOperation::Perspective: {
319 double p = firstValue.computeLength<double>(conversionData); 323 double p = firstValue.computeLength<double>(conversionData);
320 ASSERT(p >= 0); 324 ASSERT(p >= 0);
321 operations.operations().append( 325 operations.operations().append(
322 PerspectiveTransformOperation::create(p)); 326 PerspectiveTransformOperation::create(p));
323 break; 327 break;
324 } 328 }
325 default: 329 default:
326 ASSERT_NOT_REACHED(); 330 ASSERT_NOT_REACHED();
327 break; 331 break;
328 } 332 }
329 } 333 }
330 return operations; 334 return operations;
331 } 335 }
332 336
333 } // namespace blink 337 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698