OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef LengthInterpolationFunctions_h |
| 6 #define LengthInterpolationFunctions_h |
| 7 |
| 8 #include "core/animation/InterpolationValue.h" |
| 9 #include "core/animation/PairwiseInterpolationValue.h" |
| 10 #include "platform/Length.h" |
| 11 #include <memory> |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class CSSToLengthConversionData; |
| 16 |
| 17 class LengthInterpolationFunctions { |
| 18 STATIC_ONLY(LengthInterpolationFunctions); |
| 19 public: |
| 20 static std::unique_ptr<InterpolableValue> createInterpolablePixels(double pi
xels); |
| 21 static InterpolationValue createInterpolablePercent(double percent); |
| 22 static std::unique_ptr<InterpolableList> createNeutralInterpolableValue(); |
| 23 |
| 24 static InterpolationValue maybeConvertCSSValue(const CSSValue&); |
| 25 static InterpolationValue maybeConvertLength(const Length&, float zoom); |
| 26 static PairwiseInterpolationValue mergeSingles(InterpolationValue&& start, I
nterpolationValue&& end); |
| 27 static bool nonInterpolableValuesAreCompatible(const NonInterpolableValue*,
const NonInterpolableValue*); |
| 28 static void composite(std::unique_ptr<InterpolableValue>&, RefPtr<NonInterpo
lableValue>&, double underlyingFraction, const InterpolableValue&, const NonInte
rpolableValue*); |
| 29 static Length createLength(const InterpolableValue&, const NonInterpolableVa
lue*, const CSSToLengthConversionData&, ValueRange); |
| 30 |
| 31 static void subtractFromOneHundredPercent(InterpolationValue& result); |
| 32 }; |
| 33 |
| 34 } // namespace blink |
| 35 |
| 36 #endif // LengthInterpolationFunctions_h |
OLD | NEW |