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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } else { | 61 } else { |
62 ASSERT(LengthStyleInterpolation::canCreateFrom(*side[i])); | 62 ASSERT(LengthStyleInterpolation::canCreateFrom(*side[i])); |
63 result->set(i, LengthStyleInterpolation::toInterpolableValue(*side[i
])); | 63 result->set(i, LengthStyleInterpolation::toInterpolableValue(*side[i
])); |
64 } | 64 } |
65 } | 65 } |
66 return result.release(); | 66 return result.release(); |
67 } | 67 } |
68 | 68 |
69 namespace { | 69 namespace { |
70 | 70 |
71 PassRefPtr<CSSPrimitiveValue> findValue(InterpolableList* lengthBox, size_t i, C
SSPrimitiveValue* start[], CSSPrimitiveValue* end[]) | 71 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> findValue(InterpolableList* lengthBox,
size_t i, CSSPrimitiveValue* start[], CSSPrimitiveValue* end[]) |
72 { | 72 { |
73 if (lengthBox->get(i)->isBool()) { | 73 if (lengthBox->get(i)->isBool()) { |
74 if (toInterpolableBool(lengthBox->get(i))->value()) | 74 if (toInterpolableBool(lengthBox->get(i))->value()) |
75 return end[i]; | 75 return end[i]; |
76 return start[i]; | 76 return start[i]; |
77 } | 77 } |
78 return LengthStyleInterpolation::fromInterpolableValue(*lengthBox->get(i), R
angeAll); | 78 return LengthStyleInterpolation::fromInterpolableValue(*lengthBox->get(i), R
angeAll); |
79 } | 79 } |
80 | 80 |
81 } | 81 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 void LengthBoxStyleInterpolation::trace(Visitor* visitor) | 137 void LengthBoxStyleInterpolation::trace(Visitor* visitor) |
138 { | 138 { |
139 StyleInterpolation::trace(visitor); | 139 StyleInterpolation::trace(visitor); |
140 visitor->trace(m_startCSSValue); | 140 visitor->trace(m_startCSSValue); |
141 visitor->trace(m_endCSSValue); | 141 visitor->trace(m_endCSSValue); |
142 } | 142 } |
143 | 143 |
144 } | 144 } |
OLD | NEW |