| 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*item); | 743 const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*item); |
| 744 if (primitiveValue.getValueID() == CSSValueAuto) { | 744 if (primitiveValue.getValueID() == CSSValueAuto) { |
| 745 result.type = MotionRotationAuto; | 745 result.type = MotionRotationAuto; |
| 746 } else if (primitiveValue.getValueID() == CSSValueReverse) { | 746 } else if (primitiveValue.getValueID() == CSSValueReverse) { |
| 747 result.type = MotionRotationAuto; | 747 result.type = MotionRotationAuto; |
| 748 result.angle += 180; | 748 result.angle += 180; |
| 749 } else { | 749 } else { |
| 750 result.angle += primitiveValue.computeDegrees(); | 750 result.angle += primitiveValue.computeDegrees(); |
| 751 } | 751 } |
| 752 } | 752 } |
| 753 result.angle = clampTo<float>(result.angle); |
| 753 | 754 |
| 754 return result; | 755 return result; |
| 755 } | 756 } |
| 756 | 757 |
| 757 template <CSSValueID cssValueFor0, CSSValueID cssValueFor100> | 758 template <CSSValueID cssValueFor0, CSSValueID cssValueFor100> |
| 758 Length StyleBuilderConverter::convertPositionLength(StyleResolverState& state, c
onst CSSValue& value) | 759 Length StyleBuilderConverter::convertPositionLength(StyleResolverState& state, c
onst CSSValue& value) |
| 759 { | 760 { |
| 760 if (value.isValuePair()) { | 761 if (value.isValuePair()) { |
| 761 const CSSValuePair& pair = toCSSValuePair(value); | 762 const CSSValuePair& pair = toCSSValuePair(value); |
| 762 Length length = StyleBuilderConverter::convertLength(state, pair.second(
)); | 763 Length length = StyleBuilderConverter::convertLength(state, pair.second(
)); |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 | 1074 |
| 1074 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) | 1075 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) |
| 1075 { | 1076 { |
| 1076 if (value.isPathValue()) | 1077 if (value.isPathValue()) |
| 1077 return toCSSPathValue(value).stylePath(); | 1078 return toCSSPathValue(value).stylePath(); |
| 1078 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 1079 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
| 1079 return nullptr; | 1080 return nullptr; |
| 1080 } | 1081 } |
| 1081 | 1082 |
| 1082 } // namespace blink | 1083 } // namespace blink |
| OLD | NEW |