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

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

Issue 2625313002: CSS: Rotate support for none and fixed responsive-test.js (Closed)
Patch Set: Created 3 years, 11 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/Source/core/css/parser/CSSPropertyParser.cpp ('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) 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 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 z = toCSSPrimitiveValue(list.item(2)).getDoubleValue(); 1233 z = toCSSPrimitiveValue(list.item(2)).getDoubleValue();
1234 } 1234 }
1235 double angle = 1235 double angle =
1236 toCSSPrimitiveValue(list.item(list.length() - 1)).computeDegrees(); 1236 toCSSPrimitiveValue(list.item(list.length() - 1)).computeDegrees();
1237 return Rotation(FloatPoint3D(x, y, z), angle); 1237 return Rotation(FloatPoint3D(x, y, z), angle);
1238 } 1238 }
1239 1239
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 if (value.isIdentifierValue()) {
1244 DCHECK_EQ(toCSSIdentifierValue(value).getValueID(), CSSValueNone);
1245 return nullptr;
1246 }
1247
1243 return RotateTransformOperation::create(convertRotation(value), 1248 return RotateTransformOperation::create(convertRotation(value),
1244 TransformOperation::Rotate3D); 1249 TransformOperation::Rotate3D);
1245 } 1250 }
1246 1251
1247 PassRefPtr<ScaleTransformOperation> StyleBuilderConverter::convertScale( 1252 PassRefPtr<ScaleTransformOperation> StyleBuilderConverter::convertScale(
1248 StyleResolverState& state, 1253 StyleResolverState& state,
1249 const CSSValue& value) { 1254 const CSSValue& value) {
1250 if (value.isIdentifierValue()) { 1255 if (value.isIdentifierValue()) {
1251 DCHECK_EQ(toCSSIdentifierValue(value).getValueID(), CSSValueNone); 1256 DCHECK_EQ(toCSSIdentifierValue(value).getValueID(), CSSValueNone);
1252 return nullptr; 1257 return nullptr;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 // Instead of the actual zoom, use 1 to avoid potential rounding errors 1309 // Instead of the actual zoom, use 1 to avoid potential rounding errors
1305 Length length = primitiveValue.convertToLength( 1310 Length length = primitiveValue.convertToLength(
1306 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); 1311 state.cssToLengthConversionData().copyWithAdjustedZoom(1));
1307 return *CSSPrimitiveValue::create(length, 1); 1312 return *CSSPrimitiveValue::create(length, 1);
1308 } 1313 }
1309 } 1314 }
1310 return value; 1315 return value;
1311 } 1316 }
1312 1317
1313 } // namespace blink 1318 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698