Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: Source/core/animation/animatable/AnimatableRepeatable.h

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
37 37
38 namespace blink { 38 namespace blink {
39 39
40 // This class represents collections of values that animate in a repeated fashio n as described by the CSS Transitions spec: 40 // This class represents collections of values that animate in a repeated fashio n as described by the CSS Transitions spec:
41 // http://www.w3.org/TR/css3-transitions/#animtype-repeatable-list 41 // http://www.w3.org/TR/css3-transitions/#animtype-repeatable-list
42 class CORE_EXPORT AnimatableRepeatable : public AnimatableValue { 42 class CORE_EXPORT AnimatableRepeatable : public AnimatableValue {
43 public: 43 public:
44 ~AnimatableRepeatable() override { } 44 ~AnimatableRepeatable() override { }
45 45
46 // This will consume the vector passed into it. 46 // This will consume the vector passed into it.
47 static PassRefPtrWillBeRawPtr<AnimatableRepeatable> create(WillBeHeapVector< RefPtrWillBeMember<AnimatableValue>>& values) 47 static AnimatableRepeatable* create(HeapVector<Member<AnimatableValue>>& val ues)
48 { 48 {
49 return adoptRefWillBeNoop(new AnimatableRepeatable(values)); 49 return new AnimatableRepeatable(values);
50 } 50 }
51 51
52 const WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>>& values() const { return m_values; } 52 const HeapVector<Member<AnimatableValue>>& values() const { return m_values; }
53 53
54 DECLARE_VIRTUAL_TRACE(); 54 DECLARE_VIRTUAL_TRACE();
55 55
56 protected: 56 protected:
57 AnimatableRepeatable() 57 AnimatableRepeatable()
58 { 58 {
59 } 59 }
60 AnimatableRepeatable(WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>>& values) 60 AnimatableRepeatable(HeapVector<Member<AnimatableValue>>& values)
61 { 61 {
62 ASSERT(!values.isEmpty()); 62 ASSERT(!values.isEmpty());
63 m_values.swap(values); 63 m_values.swap(values);
64 } 64 }
65 65
66 static bool interpolateLists(const WillBeHeapVector<RefPtrWillBeMember<Anima tableValue>>& fromValues, const WillBeHeapVector<RefPtrWillBeMember<AnimatableVa lue>>& toValues, double fraction, WillBeHeapVector<RefPtrWillBeMember<Animatable Value>>& interpolatedValues); 66 static bool interpolateLists(const HeapVector<Member<AnimatableValue>>& from Values, const HeapVector<Member<AnimatableValue>>& toValues, double fraction, He apVector<Member<AnimatableValue>>& interpolatedValues);
67 67
68 bool usesDefaultInterpolationWith(const AnimatableValue*) const override; 68 bool usesDefaultInterpolationWith(const AnimatableValue*) const override;
69 69
70 WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>> m_values; 70 HeapVector<Member<AnimatableValue>> m_values;
71 71
72 private: 72 private:
73 PassRefPtrWillBeRawPtr<AnimatableValue> interpolateTo(const AnimatableValue* , double fraction) const override; 73 AnimatableValue* interpolateTo(const AnimatableValue*, double fraction) cons t override;
74 74
75 AnimatableType type() const override { return TypeRepeatable; } 75 AnimatableType type() const override { return TypeRepeatable; }
76 bool equalTo(const AnimatableValue*) const final; 76 bool equalTo(const AnimatableValue*) const final;
77 }; 77 };
78 78
79 DEFINE_TYPE_CASTS(AnimatableRepeatable, AnimatableValue, value, (value->isRepeat able() || value->isStrokeDasharrayList()), (value.isRepeatable() || value.isStro keDasharrayList())); 79 DEFINE_TYPE_CASTS(AnimatableRepeatable, AnimatableValue, value, (value->isRepeat able() || value->isStrokeDasharrayList()), (value.isRepeatable() || value.isStro keDasharrayList()));
80 80
81 } // namespace blink 81 } // namespace blink
82 82
83 #endif // AnimatableRepeatable_h 83 #endif // AnimatableRepeatable_h
OLDNEW
« no previous file with comments | « Source/core/animation/animatable/AnimatableNeutral.h ('k') | Source/core/animation/animatable/AnimatableRepeatable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698