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

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

Issue 2531753002: CSS Independent Transform Properties: support rotate: <axes> <angle> (Closed)
Patch Set: tests 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
index 3bbcc2e917661d6565f3324356e66679f12d6269..5093c1b602851c7ec5f7e801855c0c66266e8fd2 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -1216,15 +1216,16 @@ PassRefPtr<TranslateTransformOperation> StyleBuilderConverter::convertTranslate(
Rotation StyleBuilderConverter::convertRotation(const CSSValue& value) {
const CSSValueList& list = toCSSValueList(value);
ASSERT(list.length() == 1 || list.length() == 4);
- double angle = toCSSPrimitiveValue(list.item(0)).computeDegrees();
double x = 0;
double y = 0;
double z = 1;
if (list.length() == 4) {
- x = toCSSPrimitiveValue(list.item(1)).getDoubleValue();
- y = toCSSPrimitiveValue(list.item(2)).getDoubleValue();
- z = toCSSPrimitiveValue(list.item(3)).getDoubleValue();
+ x = toCSSPrimitiveValue(list.item(0)).getDoubleValue();
+ y = toCSSPrimitiveValue(list.item(1)).getDoubleValue();
+ z = toCSSPrimitiveValue(list.item(2)).getDoubleValue();
}
+ double angle =
+ toCSSPrimitiveValue(list.item(list.length() - 1)).computeDegrees();
return Rotation(FloatPoint3D(x, y, z), angle);
}
« 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