| 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/LengthBoxStyleInterpolation.h" | 6 #include "core/animation/LengthBoxStyleInterpolation.h" |
| 7 | 7 |
| 8 #include "core/css/resolver/StyleBuilder.h" | 8 #include "core/css/resolver/StyleBuilder.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 const CSSPrimitiveValue& startValue = toCSSPrimitiveValue(start); | 63 const CSSPrimitiveValue& startValue = toCSSPrimitiveValue(start); |
| 64 const CSSPrimitiveValue& endValue = toCSSPrimitiveValue(end); | 64 const CSSPrimitiveValue& endValue = toCSSPrimitiveValue(end); |
| 65 if ((startValue.isValueID() && startValue.getValueID() == CSSValueAuto) | 65 if ((startValue.isValueID() && startValue.getValueID() == CSSValueAuto) |
| 66 || (endValue.isValueID() && endValue.getValueID() == CSSValueAuto)) | 66 || (endValue.isValueID() && endValue.getValueID() == CSSValueAuto)) |
| 67 return true; | 67 return true; |
| 68 return onlyInterpolateBetweenLengthAndCSSValueAuto(*startValue.getRectValue(
), *endValue.getRectValue()); | 68 return onlyInterpolateBetweenLengthAndCSSValueAuto(*startValue.getRectValue(
), *endValue.getRectValue()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 namespace { | 71 namespace { |
| 72 | 72 |
| 73 PassRefPtr<CSSPrimitiveValue> indexedValueToLength(InterpolableList& lengthBox,
size_t i, CSSPrimitiveValue* start[], CSSPrimitiveValue* end[]) | 73 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> indexedValueToLength(InterpolableList&
lengthBox, size_t i, CSSPrimitiveValue* start[], CSSPrimitiveValue* end[]) |
| 74 { | 74 { |
| 75 if (lengthBox.get(i)->isBool()) { | 75 if (lengthBox.get(i)->isBool()) { |
| 76 if (toInterpolableBool(lengthBox.get(i))->value()) | 76 if (toInterpolableBool(lengthBox.get(i))->value()) |
| 77 return end[i]; | 77 return end[i]; |
| 78 return start[i]; | 78 return start[i]; |
| 79 } | 79 } |
| 80 return LengthStyleInterpolation::fromInterpolableValue(*lengthBox.get(i), Ra
ngeAll); | 80 return LengthStyleInterpolation::fromInterpolableValue(*lengthBox.get(i), Ra
ngeAll); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } | 83 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 137 } |
| 138 | 138 |
| 139 void LengthBoxStyleInterpolation::trace(Visitor* visitor) | 139 void LengthBoxStyleInterpolation::trace(Visitor* visitor) |
| 140 { | 140 { |
| 141 StyleInterpolation::trace(visitor); | 141 StyleInterpolation::trace(visitor); |
| 142 visitor->trace(m_startCSSValue); | 142 visitor->trace(m_startCSSValue); |
| 143 visitor->trace(m_endCSSValue); | 143 visitor->trace(m_endCSSValue); |
| 144 } | 144 } |
| 145 | 145 |
| 146 } | 146 } |
| OLD | NEW |