| 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/CSSNumberInterpolationType.h" | 5 #include "core/animation/CSSNumberInterpolationType.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "core/animation/NumberPropertyFunctions.h" | 8 #include "core/animation/NumberPropertyFunctions.h" |
| 8 #include "core/css/resolver/StyleBuilder.h" | 9 #include "core/css/resolver/StyleBuilder.h" |
| 9 #include "core/css/resolver/StyleResolverState.h" | 10 #include "core/css/resolver/StyleResolverState.h" |
| 10 #include "wtf/PtrUtil.h" | 11 #include "wtf/PtrUtil.h" |
| 11 #include <memory> | |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class InheritedNumberChecker : public InterpolationType::ConversionChecker { | 15 class InheritedNumberChecker : public InterpolationType::ConversionChecker { |
| 16 public: | 16 public: |
| 17 static std::unique_ptr<InheritedNumberChecker> create(CSSPropertyID property, | 17 static std::unique_ptr<InheritedNumberChecker> create(CSSPropertyID property, |
| 18 double number) { | 18 double number) { |
| 19 return WTF::wrapUnique(new InheritedNumberChecker(property, number)); | 19 return WTF::wrapUnique(new InheritedNumberChecker(property, number)); |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 cssProperty(), toInterpolableNumber(interpolableValue).value()); | 97 cssProperty(), toInterpolableNumber(interpolableValue).value()); |
| 98 if (!NumberPropertyFunctions::setNumber(cssProperty(), *state.style(), | 98 if (!NumberPropertyFunctions::setNumber(cssProperty(), *state.style(), |
| 99 clampedNumber)) | 99 clampedNumber)) |
| 100 StyleBuilder::applyProperty( | 100 StyleBuilder::applyProperty( |
| 101 cssProperty(), state, | 101 cssProperty(), state, |
| 102 *CSSPrimitiveValue::create(clampedNumber, | 102 *CSSPrimitiveValue::create(clampedNumber, |
| 103 CSSPrimitiveValue::UnitType::Number)); | 103 CSSPrimitiveValue::UnitType::Number)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace blink | 106 } // namespace blink |
| OLD | NEW |