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 51b57acc58112a500006a6602df1a74ad91874fd..5da06f170947e9b2028d6e8e8680b4f33ee6df74 100644 |
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp |
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp |
@@ -655,7 +655,7 @@ StyleMotionRotation StyleBuilderConverter::convertMotionRotation(const CSSValue& |
} |
template <CSSValueID cssValueFor0, CSSValueID cssValueFor100> |
-static Length convertPositionLength(StyleResolverState& state, const CSSValue& value) |
+Length StyleBuilderConverter::convertPositionLength(StyleResolverState& state, const CSSValue& value) |
{ |
if (value.isValuePair()) { |
const CSSValuePair& pair = toCSSValuePair(value); |
@@ -706,25 +706,6 @@ float StyleBuilderConverter::convertPerspective(StyleResolverState& state, const |
return convertPerspectiveLength(state, primitiveValue); |
} |
-template <CSSValueID cssValueFor0, CSSValueID cssValueFor100> |
-static Length convertOriginLength(StyleResolverState& state, const CSSPrimitiveValue& primitiveValue) |
-{ |
- if (primitiveValue.isValueID()) { |
- switch (primitiveValue.getValueID()) { |
- case cssValueFor0: |
- return Length(0, Percent); |
- case cssValueFor100: |
- return Length(100, Percent); |
- case CSSValueCenter: |
- return Length(50, Percent); |
- default: |
- ASSERT_NOT_REACHED(); |
- } |
- } |
- |
- return StyleBuilderConverter::convertLength(state, primitiveValue); |
-} |
- |
EPaintOrder StyleBuilderConverter::convertPaintOrder(StyleResolverState&, const CSSValue& cssPaintOrder) |
{ |
if (cssPaintOrder.isValueList()) { |
@@ -882,8 +863,8 @@ TransformOrigin StyleBuilderConverter::convertTransformOrigin(StyleResolverState |
const CSSPrimitiveValue& primitiveValueZ = toCSSPrimitiveValue(*list.item(2)); |
return TransformOrigin( |
- convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX), |
- convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY), |
+ convertPositionLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX), |
+ convertPositionLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY), |
StyleBuilderConverter::convertComputedLength<float>(state, primitiveValueZ) |
); |
} |