| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/animation/DoubleStyleInterpolation.h" | 6 #include "core/animation/DoubleStyleInterpolation.h" |
| 7 | 7 |
| 8 #include "core/css/CSSCalculationValue.h" | 8 #include "core/css/CSSCalculationValue.h" |
| 9 #include "core/css/resolver/StyleBuilder.h" | 9 #include "core/css/resolver/StyleBuilder.h" |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 for (int i = 0; i < len; i++) { | 95 for (int i = 0; i < len; i++) { |
| 96 const CSSValue* item = list.item(i); | 96 const CSSValue* item = list.item(i); |
| 97 if (!item->isPrimitiveValue()) | 97 if (!item->isPrimitiveValue()) |
| 98 return false; | 98 return false; |
| 99 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item); | 99 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(item); |
| 100 if (primitiveValue->getValueID() == CSSValueAuto) { | 100 if (primitiveValue->getValueID() == CSSValueAuto) { |
| 101 *rotationType = MotionRotationAuto; | 101 *rotationType = MotionRotationAuto; |
| 102 } else if (primitiveValue->getValueID() == CSSValueReverse) { | 102 } else if (primitiveValue->getValueID() == CSSValueReverse) { |
| 103 *rotationType = MotionRotationAuto; | 103 *rotationType = MotionRotationAuto; |
| 104 *rotation += 180; | 104 *rotation += 180; |
| 105 } else if (primitiveValue->isAngle() || primitiveValue->primitiveType()
== CSSPrimitiveValue::CSS_DEG) { | 105 } else if (primitiveValue->isAngle()) { |
| 106 *rotation += primitiveValue->computeDegrees(); | 106 *rotation += primitiveValue->computeDegrees(); |
| 107 } else { | 107 } else { |
| 108 return false; | 108 return false; |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 return true; | 111 return true; |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace | 114 } // namespace |
| 115 | 115 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 142 || startRotationType != endRotationType) | 142 || startRotationType != endRotationType) |
| 143 return nullptr; | 143 return nullptr; |
| 144 | 144 |
| 145 return adoptRefWillBeNoop(new DoubleStyleInterpolation( | 145 return adoptRefWillBeNoop(new DoubleStyleInterpolation( |
| 146 motionRotationToInterpolableValue(start), | 146 motionRotationToInterpolableValue(start), |
| 147 motionRotationToInterpolableValue(end), | 147 motionRotationToInterpolableValue(end), |
| 148 id, true, InterpolationRange::RangeAll, startRotationType == MotionRotat
ionAuto)); | 148 id, true, InterpolationRange::RangeAll, startRotationType == MotionRotat
ionAuto)); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } | 151 } |
| OLD | NEW |