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/CSSFontWeightInterpolationType.h" | 5 #include "core/animation/CSSFontWeightInterpolationType.h" |
6 | 6 |
7 #include "core/css/CSSPrimitiveValueMappings.h" | 7 #include "core/css/CSSPrimitiveValueMappings.h" |
8 #include "core/css/resolver/StyleResolverState.h" | 8 #include "core/css/resolver/StyleResolverState.h" |
9 #include "wtf/PtrUtil.h" | 9 #include "wtf/PtrUtil.h" |
10 #include <memory> | 10 #include <memory> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 return createFontWeightValue(FontDescription::lighterWeight(inheritedFon
tWeight)); | 122 return createFontWeightValue(FontDescription::lighterWeight(inheritedFon
tWeight)); |
123 } | 123 } |
124 | 124 |
125 default: | 125 default: |
126 return createFontWeightValue(primitiveValue.convertTo<FontWeight>()); | 126 return createFontWeightValue(primitiveValue.convertTo<FontWeight>()); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 InterpolationValue CSSFontWeightInterpolationType::maybeConvertUnderlyingValue(c
onst InterpolationEnvironment& environment) const | 130 InterpolationValue CSSFontWeightInterpolationType::maybeConvertUnderlyingValue(c
onst InterpolationEnvironment& environment) const |
131 { | 131 { |
132 return createFontWeightValue(environment.state().style()->fontWeight()); | 132 return createFontWeightValue(environment.style().fontWeight()); |
133 } | 133 } |
134 | 134 |
135 void CSSFontWeightInterpolationType::apply(const InterpolableValue& interpolable
Value, const NonInterpolableValue*, InterpolationEnvironment& environment) const | 135 void CSSFontWeightInterpolationType::apply(const InterpolableValue& interpolable
Value, const NonInterpolableValue*, InterpolationEnvironment& environment) const |
136 { | 136 { |
137 environment.state().fontBuilder().setWeight(doubleToFontWeight(toInterpolabl
eNumber(interpolableValue).value())); | 137 environment.state().fontBuilder().setWeight(doubleToFontWeight(toInterpolabl
eNumber(interpolableValue).value())); |
138 } | 138 } |
139 | 139 |
140 } // namespace blink | 140 } // namespace blink |
OLD | NEW |