| 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/CSSLengthInterpolationType.h" | 5 #include "core/animation/CSSLengthInterpolationType.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "core/animation/LengthInterpolationFunctions.h" | 8 #include "core/animation/LengthInterpolationFunctions.h" |
| 8 #include "core/animation/LengthPropertyFunctions.h" | 9 #include "core/animation/LengthPropertyFunctions.h" |
| 9 #include "core/animation/css/CSSAnimatableValueFactory.h" | 10 #include "core/animation/css/CSSAnimatableValueFactory.h" |
| 10 #include "core/css/CSSCalculationValue.h" | 11 #include "core/css/CSSCalculationValue.h" |
| 11 #include "core/css/CSSIdentifierValue.h" | 12 #include "core/css/CSSIdentifierValue.h" |
| 12 #include "core/css/resolver/StyleBuilder.h" | 13 #include "core/css/resolver/StyleBuilder.h" |
| 13 #include "core/css/resolver/StyleResolverState.h" | 14 #include "core/css/resolver/StyleResolverState.h" |
| 14 #include "platform/LengthFunctions.h" | 15 #include "platform/LengthFunctions.h" |
| 15 #include "wtf/PtrUtil.h" | 16 #include "wtf/PtrUtil.h" |
| 16 #include <memory> | |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 | 19 |
| 20 CSSLengthInterpolationType::CSSLengthInterpolationType(PropertyHandle property) | 20 CSSLengthInterpolationType::CSSLengthInterpolationType(PropertyHandle property) |
| 21 : CSSInterpolationType(property), | 21 : CSSInterpolationType(property), |
| 22 m_valueRange(LengthPropertyFunctions::getValueRange(cssProperty())) {} | 22 m_valueRange(LengthPropertyFunctions::getValueRange(cssProperty())) {} |
| 23 | 23 |
| 24 float CSSLengthInterpolationType::effectiveZoom( | 24 float CSSLengthInterpolationType::effectiveZoom( |
| 25 const ComputedStyle& style) const { | 25 const ComputedStyle& style) const { |
| 26 return LengthPropertyFunctions::isZoomedLength(cssProperty()) | 26 return LengthPropertyFunctions::isZoomedLength(cssProperty()) |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 floatValueForLength(after, 100) - floatValueForLength(before, 100); | 165 floatValueForLength(after, 100) - floatValueForLength(before, 100); |
| 166 DCHECK_LT(std::abs(delta), kSlack); | 166 DCHECK_LT(std::abs(delta), kSlack); |
| 167 #endif | 167 #endif |
| 168 return; | 168 return; |
| 169 } | 169 } |
| 170 StyleBuilder::applyProperty(cssProperty(), state, | 170 StyleBuilder::applyProperty(cssProperty(), state, |
| 171 *CSSValue::create(length, zoom)); | 171 *CSSValue::create(length, zoom)); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| OLD | NEW |