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

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

Issue 644953003: Store [-webkit-]transform-origin as a TransformOrigin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Almost forgot: drop unused ctor. (+ rebase). Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/Source/core/css/resolver/StyleBuilderConverter.cpp b/Source/core/css/resolver/StyleBuilderConverter.cpp
index 43d2023e9e7872e03309715a326e1cfa5cf4b015..4ffe88db3b55529bdcd101c287699562f702ea21 100644
--- a/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -780,4 +780,20 @@ float StyleBuilderConverter::convertTextStrokeWidth(StyleResolverState& state, C
return primitiveValue->computeLength<float>(state.cssToLengthConversionData());
}
+TransformOrigin StyleBuilderConverter::convertTransformOrigin(StyleResolverState& state, CSSValue* value)
+{
+ CSSValueList* list = toCSSValueList(value);
+ ASSERT(list->length() == 3);
+
+ CSSPrimitiveValue* primitiveValueX = toCSSPrimitiveValue(list->item(0));
+ CSSPrimitiveValue* primitiveValueY = toCSSPrimitiveValue(list->item(1));
+ CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2));
+
+ return TransformOrigin(
+ convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX),
+ convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY),
+ StyleBuilderConverter::convertComputedLength<float>(state, primitiveValueZ)
+ );
+}
+
} // namespace blink
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698