| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright |
| 5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. |
| 6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above |
| 7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer |
| 8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the |
| 9 * distribution. | 9 * distribution. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 return RotateTransformOperation::create(convertRotation(value), | 1243 return RotateTransformOperation::create(convertRotation(value), |
| 1244 TransformOperation::Rotate3D); | 1244 TransformOperation::Rotate3D); |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 PassRefPtr<ScaleTransformOperation> StyleBuilderConverter::convertScale( | 1247 PassRefPtr<ScaleTransformOperation> StyleBuilderConverter::convertScale( |
| 1248 StyleResolverState& state, | 1248 StyleResolverState& state, |
| 1249 const CSSValue& value) { | 1249 const CSSValue& value) { |
| 1250 const CSSValueList& list = toCSSValueList(value); | 1250 const CSSValueList& list = toCSSValueList(value); |
| 1251 ASSERT(list.length() <= 3); | 1251 ASSERT(list.length() <= 3); |
| 1252 double sx = toCSSPrimitiveValue(list.item(0)).getDoubleValue(); | 1252 double sx = toCSSPrimitiveValue(list.item(0)).getDoubleValue(); |
| 1253 double sy = sx; | 1253 double sy = 1; |
| 1254 double sz = 1; | 1254 double sz = 1; |
| 1255 if (list.length() >= 2) | 1255 if (list.length() >= 2) |
| 1256 sy = toCSSPrimitiveValue(list.item(1)).getDoubleValue(); | 1256 sy = toCSSPrimitiveValue(list.item(1)).getDoubleValue(); |
| 1257 if (list.length() == 3) | 1257 if (list.length() == 3) |
| 1258 sz = toCSSPrimitiveValue(list.item(2)).getDoubleValue(); | 1258 sz = toCSSPrimitiveValue(list.item(2)).getDoubleValue(); |
| 1259 | 1259 |
| 1260 return ScaleTransformOperation::create(sx, sy, sz, | 1260 return ScaleTransformOperation::create(sx, sy, sz, |
| 1261 TransformOperation::Scale3D); | 1261 TransformOperation::Scale3D); |
| 1262 } | 1262 } |
| 1263 | 1263 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 // Instead of the actual zoom, use 1 to avoid potential rounding errors | 1299 // Instead of the actual zoom, use 1 to avoid potential rounding errors |
| 1300 Length length = primitiveValue.convertToLength( | 1300 Length length = primitiveValue.convertToLength( |
| 1301 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); | 1301 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); |
| 1302 return *CSSPrimitiveValue::create(length, 1); | 1302 return *CSSPrimitiveValue::create(length, 1); |
| 1303 } | 1303 } |
| 1304 } | 1304 } |
| 1305 return value; | 1305 return value; |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 } // namespace blink | 1308 } // namespace blink |
| OLD | NEW |