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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 PassRefPtr<TranslateTransformOperation> StyleBuilderConverter::convertTranslate(
StyleResolverState& state, const CSSValue& value) | 904 PassRefPtr<TranslateTransformOperation> StyleBuilderConverter::convertTranslate(
StyleResolverState& state, const CSSValue& value) |
905 { | 905 { |
906 const CSSValueList& list = toCSSValueList(value); | 906 const CSSValueList& list = toCSSValueList(value); |
907 ASSERT(list.length() <= 3); | 907 ASSERT(list.length() <= 3); |
908 Length tx = convertLength(state, *list.item(0)); | 908 Length tx = convertLength(state, *list.item(0)); |
909 Length ty(0, Fixed); | 909 Length ty(0, Fixed); |
910 double tz = 0; | 910 double tz = 0; |
911 if (list.length() >= 2) | 911 if (list.length() >= 2) |
912 ty = convertLength(state, *list.item(1)); | 912 ty = convertLength(state, *list.item(1)); |
913 if (list.length() == 3) | 913 if (list.length() == 3) |
914 tz = toCSSPrimitiveValue(list.item(2))->getDoubleValue(); | 914 tz = toCSSPrimitiveValue(list.item(2))->computeLength<double>(state.cssT
oLengthConversionData()); |
915 | 915 |
916 return TranslateTransformOperation::create(tx, ty, tz, TransformOperation::T
ranslate3D); | 916 return TranslateTransformOperation::create(tx, ty, tz, TransformOperation::T
ranslate3D); |
917 } | 917 } |
918 | 918 |
919 PassRefPtr<RotateTransformOperation> StyleBuilderConverter::convertRotate(StyleR
esolverState& state, const CSSValue& value) | 919 PassRefPtr<RotateTransformOperation> StyleBuilderConverter::convertRotate(StyleR
esolverState& state, const CSSValue& value) |
920 { | 920 { |
921 const CSSValueList& list = toCSSValueList(value); | 921 const CSSValueList& list = toCSSValueList(value); |
922 ASSERT(list.length() == 1 || list.length() == 4); | 922 ASSERT(list.length() == 1 || list.length() == 4); |
923 double angle = toCSSPrimitiveValue(list.item(0))->computeDegrees(); | 923 double angle = toCSSPrimitiveValue(list.item(0))->computeDegrees(); |
924 double x = 0; | 924 double x = 0; |
(...skipping 28 matching lines...) Expand all Loading... |
953 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value); | 953 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value); |
954 return primitiveValue.getValueID() == CSSValueFromImage ? RespectImageOrient
ation : DoNotRespectImageOrientation; | 954 return primitiveValue.getValueID() == CSSValueFromImage ? RespectImageOrient
ation : DoNotRespectImageOrientation; |
955 } | 955 } |
956 | 956 |
957 PassRefPtr<StylePath> StyleBuilderConverter::convertPath(StyleResolverState&, CS
SValue& value) | 957 PassRefPtr<StylePath> StyleBuilderConverter::convertPath(StyleResolverState&, CS
SValue& value) |
958 { | 958 { |
959 return toCSSPathValue(value).cachedPath(); | 959 return toCSSPathValue(value).cachedPath(); |
960 } | 960 } |
961 | 961 |
962 } // namespace blink | 962 } // namespace blink |
OLD | NEW |