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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 PassRefPtr<RotateTransformOperation> StyleBuilderConverter::convertRotate( | 1240 PassRefPtr<RotateTransformOperation> StyleBuilderConverter::convertRotate( |
1241 StyleResolverState& state, | 1241 StyleResolverState& state, |
1242 const CSSValue& value) { | 1242 const CSSValue& value) { |
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 if (value.isIdentifierValue()) { |
| 1251 DCHECK_EQ(toCSSIdentifierValue(value).getValueID(), CSSValueNone); |
| 1252 return nullptr; |
| 1253 } |
| 1254 |
1250 const CSSValueList& list = toCSSValueList(value); | 1255 const CSSValueList& list = toCSSValueList(value); |
1251 ASSERT(list.length() <= 3); | 1256 ASSERT(list.length() <= 3); |
1252 double sx = toCSSPrimitiveValue(list.item(0)).getDoubleValue(); | 1257 double sx = toCSSPrimitiveValue(list.item(0)).getDoubleValue(); |
1253 double sy = 1; | 1258 double sy = 1; |
1254 double sz = 1; | 1259 double sz = 1; |
1255 if (list.length() >= 2) | 1260 if (list.length() >= 2) |
1256 sy = toCSSPrimitiveValue(list.item(1)).getDoubleValue(); | 1261 sy = toCSSPrimitiveValue(list.item(1)).getDoubleValue(); |
1257 if (list.length() == 3) | 1262 if (list.length() == 3) |
1258 sz = toCSSPrimitiveValue(list.item(2)).getDoubleValue(); | 1263 sz = toCSSPrimitiveValue(list.item(2)).getDoubleValue(); |
1259 | 1264 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 // Instead of the actual zoom, use 1 to avoid potential rounding errors | 1304 // Instead of the actual zoom, use 1 to avoid potential rounding errors |
1300 Length length = primitiveValue.convertToLength( | 1305 Length length = primitiveValue.convertToLength( |
1301 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); | 1306 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); |
1302 return *CSSPrimitiveValue::create(length, 1); | 1307 return *CSSPrimitiveValue::create(length, 1); |
1303 } | 1308 } |
1304 } | 1309 } |
1305 return value; | 1310 return value; |
1306 } | 1311 } |
1307 | 1312 |
1308 } // namespace blink | 1313 } // namespace blink |
OLD | NEW |