OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 class AnimatableLengthSize final : public AnimatableValue { | 38 class AnimatableLengthSize final : public AnimatableValue { |
39 public: | 39 public: |
40 ~AnimatableLengthSize() override {} | 40 ~AnimatableLengthSize() override {} |
41 static PassRefPtr<AnimatableLengthSize> create( | 41 static PassRefPtr<AnimatableLengthSize> create( |
42 PassRefPtr<AnimatableValue> width, | 42 PassRefPtr<AnimatableValue> width, |
43 PassRefPtr<AnimatableValue> height) { | 43 PassRefPtr<AnimatableValue> height) { |
44 return adoptRef( | 44 return adoptRef( |
45 new AnimatableLengthSize(std::move(width), std::move(height))); | 45 new AnimatableLengthSize(std::move(width), std::move(height))); |
46 } | 46 } |
47 const AnimatableValue* width() const { return m_width.get(); } | |
48 const AnimatableValue* height() const { return m_height.get(); } | |
49 | |
50 bool usesDefaultInterpolationWith(const AnimatableValue*) const override; | |
51 | |
52 protected: | |
53 PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, | |
54 double fraction) const override; | |
55 | 47 |
56 private: | 48 private: |
57 AnimatableLengthSize(PassRefPtr<AnimatableValue> width, | 49 AnimatableLengthSize(PassRefPtr<AnimatableValue> width, |
58 PassRefPtr<AnimatableValue> height) | 50 PassRefPtr<AnimatableValue> height) |
59 : m_width(width), m_height(height) {} | 51 : m_width(width), m_height(height) {} |
60 AnimatableType type() const override { return TypeLengthSize; } | 52 AnimatableType type() const override { return TypeLengthSize; } |
61 bool equalTo(const AnimatableValue*) const override; | 53 bool equalTo(const AnimatableValue*) const override; |
62 | 54 |
63 RefPtr<AnimatableValue> m_width; | 55 RefPtr<AnimatableValue> m_width; |
64 RefPtr<AnimatableValue> m_height; | 56 RefPtr<AnimatableValue> m_height; |
65 }; | 57 }; |
66 | 58 |
67 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableLengthSize, isLengthSize()); | 59 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableLengthSize, isLengthSize()); |
68 | 60 |
69 } // namespace blink | 61 } // namespace blink |
70 | 62 |
71 #endif // AnimatableLengthSize_h | 63 #endif // AnimatableLengthSize_h |
OLD | NEW |