OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/animation/ShadowInterpolationFunctions.h" | 5 #include "core/animation/ShadowInterpolationFunctions.h" |
6 | 6 |
7 #include "core/animation/CSSColorInterpolationType.h" | 7 #include "core/animation/CSSColorInterpolationType.h" |
8 #include "core/animation/InterpolationValue.h" | 8 #include "core/animation/InterpolationValue.h" |
9 #include "core/animation/LengthInterpolationFunctions.h" | 9 #include "core/animation/LengthInterpolationFunctions.h" |
10 #include "core/animation/NonInterpolableValue.h" | 10 #include "core/animation/NonInterpolableValue.h" |
| 11 #include "core/css/CSSIdentifierValue.h" |
11 #include "core/css/CSSShadowValue.h" | 12 #include "core/css/CSSShadowValue.h" |
12 #include "core/css/resolver/StyleResolverState.h" | 13 #include "core/css/resolver/StyleResolverState.h" |
13 #include "core/style/ShadowData.h" | 14 #include "core/style/ShadowData.h" |
14 #include "platform/geometry/FloatPoint.h" | 15 #include "platform/geometry/FloatPoint.h" |
15 #include <memory> | 16 #include <memory> |
16 | 17 |
17 namespace blink { | 18 namespace blink { |
18 | 19 |
19 enum ShadowComponentIndex : unsigned { | 20 enum ShadowComponentIndex : unsigned { |
20 ShadowX, | 21 ShadowX, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 Length shadowY = LengthInterpolationFunctions::createLength(*interpolableLis
t.get(ShadowY), nullptr, conversionData, ValueRangeAll); | 144 Length shadowY = LengthInterpolationFunctions::createLength(*interpolableLis
t.get(ShadowY), nullptr, conversionData, ValueRangeAll); |
144 Length shadowBlur = LengthInterpolationFunctions::createLength(*interpolable
List.get(ShadowBlur), nullptr, conversionData, ValueRangeNonNegative); | 145 Length shadowBlur = LengthInterpolationFunctions::createLength(*interpolable
List.get(ShadowBlur), nullptr, conversionData, ValueRangeNonNegative); |
145 Length shadowSpread = LengthInterpolationFunctions::createLength(*interpolab
leList.get(ShadowSpread), nullptr, conversionData, ValueRangeAll); | 146 Length shadowSpread = LengthInterpolationFunctions::createLength(*interpolab
leList.get(ShadowSpread), nullptr, conversionData, ValueRangeAll); |
146 DCHECK(shadowX.isFixed() && shadowY.isFixed() && shadowBlur.isFixed() && sha
dowSpread.isFixed()); | 147 DCHECK(shadowX.isFixed() && shadowY.isFixed() && shadowBlur.isFixed() && sha
dowSpread.isFixed()); |
147 return ShadowData( | 148 return ShadowData( |
148 FloatPoint(shadowX.value(), shadowY.value()), shadowBlur.value(), shadow
Spread.value(), shadowNonInterpolableValue.style(), | 149 FloatPoint(shadowX.value(), shadowY.value()), shadowBlur.value(), shadow
Spread.value(), shadowNonInterpolableValue.style(), |
149 CSSColorInterpolationType::resolveInterpolableColor(*interpolableList.ge
t(ShadowColor), state)); | 150 CSSColorInterpolationType::resolveInterpolableColor(*interpolableList.ge
t(ShadowColor), state)); |
150 } | 151 } |
151 | 152 |
152 } // namespace blink | 153 } // namespace blink |
OLD | NEW |