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

Side by Side Diff: sky/engine/core/css/resolver/TransformBuilder.cpp

Issue 711203002: Remove zoom() and effectiveZoom(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/dom/Element.cpp » ('j') | 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) 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. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return TransformOperation::None; 79 return TransformOperation::None;
80 } 80 }
81 81
82 bool TransformBuilder::createTransformOperations(CSSValue* inValue, const CSSToL engthConversionData& conversionData, TransformOperations& outOperations) 82 bool TransformBuilder::createTransformOperations(CSSValue* inValue, const CSSToL engthConversionData& conversionData, TransformOperations& outOperations)
83 { 83 {
84 if (!inValue || !inValue->isValueList()) { 84 if (!inValue || !inValue->isValueList()) {
85 outOperations.clear(); 85 outOperations.clear();
86 return false; 86 return false;
87 } 87 }
88 88
89 float zoomFactor = conversionData.zoom();
90 TransformOperations operations; 89 TransformOperations operations;
91 for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) { 90 for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) {
92 CSSValue* currValue = i.value(); 91 CSSValue* currValue = i.value();
93 92
94 if (!currValue->isTransformValue()) 93 if (!currValue->isTransformValue())
95 continue; 94 continue;
96 95
97 CSSTransformValue* transformValue = toCSSTransformValue(i.value()); 96 CSSTransformValue* transformValue = toCSSTransformValue(i.value());
98 if (!transformValue->length()) 97 if (!transformValue->length())
99 continue; 98 continue;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 operations.operations().append(SkewTransformOperation::create(angleX , angleY, getTransformOperationType(transformValue->operationType()))); 257 operations.operations().append(SkewTransformOperation::create(angleX , angleY, getTransformOperationType(transformValue->operationType())));
259 break; 258 break;
260 } 259 }
261 case CSSTransformValue::MatrixTransformOperation: { 260 case CSSTransformValue::MatrixTransformOperation: {
262 if (transformValue->length() < 6) 261 if (transformValue->length() < 6)
263 break; 262 break;
264 double a = firstValue->getDoubleValue(); 263 double a = firstValue->getDoubleValue();
265 double b = toCSSPrimitiveValue(transformValue->item(1))->getDoubleVa lue(); 264 double b = toCSSPrimitiveValue(transformValue->item(1))->getDoubleVa lue();
266 double c = toCSSPrimitiveValue(transformValue->item(2))->getDoubleVa lue(); 265 double c = toCSSPrimitiveValue(transformValue->item(2))->getDoubleVa lue();
267 double d = toCSSPrimitiveValue(transformValue->item(3))->getDoubleVa lue(); 266 double d = toCSSPrimitiveValue(transformValue->item(3))->getDoubleVa lue();
268 double e = zoomFactor * toCSSPrimitiveValue(transformValue->item(4)) ->getDoubleValue(); 267 double e = toCSSPrimitiveValue(transformValue->item(4))->getDoubleVa lue();
269 double f = zoomFactor * toCSSPrimitiveValue(transformValue->item(5)) ->getDoubleValue(); 268 double f = toCSSPrimitiveValue(transformValue->item(5))->getDoubleVa lue();
270 operations.operations().append(MatrixTransformOperation::create(a, b , c, d, e, f)); 269 operations.operations().append(MatrixTransformOperation::create(a, b , c, d, e, f));
271 break; 270 break;
272 } 271 }
273 case CSSTransformValue::Matrix3DTransformOperation: { 272 case CSSTransformValue::Matrix3DTransformOperation: {
274 if (transformValue->length() < 16) 273 if (transformValue->length() < 16)
275 break; 274 break;
276 TransformationMatrix matrix(toCSSPrimitiveValue(transformValue->item (0))->getDoubleValue(), 275 TransformationMatrix matrix(toCSSPrimitiveValue(transformValue->item (0))->getDoubleValue(),
277 toCSSPrimitiveValue(transformValue->item(1))->getDoubleValue(), 276 toCSSPrimitiveValue(transformValue->item(1))->getDoubleValue(),
278 toCSSPrimitiveValue(transformValue->item(2))->getDoubleValue(), 277 toCSSPrimitiveValue(transformValue->item(2))->getDoubleValue(),
279 toCSSPrimitiveValue(transformValue->item(3))->getDoubleValue(), 278 toCSSPrimitiveValue(transformValue->item(3))->getDoubleValue(),
280 toCSSPrimitiveValue(transformValue->item(4))->getDoubleValue(), 279 toCSSPrimitiveValue(transformValue->item(4))->getDoubleValue(),
281 toCSSPrimitiveValue(transformValue->item(5))->getDoubleValue(), 280 toCSSPrimitiveValue(transformValue->item(5))->getDoubleValue(),
282 toCSSPrimitiveValue(transformValue->item(6))->getDoubleValue(), 281 toCSSPrimitiveValue(transformValue->item(6))->getDoubleValue(),
283 toCSSPrimitiveValue(transformValue->item(7))->getDoubleValue(), 282 toCSSPrimitiveValue(transformValue->item(7))->getDoubleValue(),
284 toCSSPrimitiveValue(transformValue->item(8))->getDoubleValue(), 283 toCSSPrimitiveValue(transformValue->item(8))->getDoubleValue(),
285 toCSSPrimitiveValue(transformValue->item(9))->getDoubleValue(), 284 toCSSPrimitiveValue(transformValue->item(9))->getDoubleValue(),
286 toCSSPrimitiveValue(transformValue->item(10))->getDoubleValue(), 285 toCSSPrimitiveValue(transformValue->item(10))->getDoubleValue(),
287 toCSSPrimitiveValue(transformValue->item(11))->getDoubleValue(), 286 toCSSPrimitiveValue(transformValue->item(11))->getDoubleValue(),
288 zoomFactor * toCSSPrimitiveValue(transformValue->item(12))->getD oubleValue(), 287 toCSSPrimitiveValue(transformValue->item(12))->getDoubleValue(),
289 zoomFactor * toCSSPrimitiveValue(transformValue->item(13))->getD oubleValue(), 288 toCSSPrimitiveValue(transformValue->item(13))->getDoubleValue(),
290 toCSSPrimitiveValue(transformValue->item(14))->getDoubleValue(), 289 toCSSPrimitiveValue(transformValue->item(14))->getDoubleValue(),
291 toCSSPrimitiveValue(transformValue->item(15))->getDoubleValue()) ; 290 toCSSPrimitiveValue(transformValue->item(15))->getDoubleValue()) ;
292 operations.operations().append(Matrix3DTransformOperation::create(ma trix)); 291 operations.operations().append(Matrix3DTransformOperation::create(ma trix));
293 break; 292 break;
294 } 293 }
295 case CSSTransformValue::PerspectiveTransformOperation: { 294 case CSSTransformValue::PerspectiveTransformOperation: {
296 double p; 295 double p;
297 if (firstValue->isLength()) 296 if (firstValue->isLength())
298 p = firstValue->computeLength<double>(conversionData); 297 p = firstValue->computeLength<double>(conversionData);
299 else { 298 else {
(...skipping 11 matching lines...) Expand all
311 ASSERT_NOT_REACHED(); 310 ASSERT_NOT_REACHED();
312 break; 311 break;
313 } 312 }
314 } 313 }
315 314
316 outOperations = operations; 315 outOperations = operations;
317 return true; 316 return true;
318 } 317 }
319 318
320 } // namespace blink 319 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.cpp ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698