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

Side by Side Diff: Source/core/animation/DeferredLegacyStyleInterpolation.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef DeferredLegacyStyleInterpolation_h 5 #ifndef DeferredLegacyStyleInterpolation_h
6 #define DeferredLegacyStyleInterpolation_h 6 #define DeferredLegacyStyleInterpolation_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/animation/LegacyStyleInterpolation.h" 9 #include "core/animation/LegacyStyleInterpolation.h"
10 #include "core/animation/StyleInterpolation.h" 10 #include "core/animation/StyleInterpolation.h"
11 #include "core/css/CSSValue.h" 11 #include "core/css/CSSValue.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class CSSBasicShape; 15 class CSSBasicShape;
16 class CSSImageValue; 16 class CSSImageValue;
17 class CSSPrimitiveValue; 17 class CSSPrimitiveValue;
18 class CSSShadowValue; 18 class CSSShadowValue;
19 class CSSSVGDocumentValue; 19 class CSSSVGDocumentValue;
20 class CSSValueList; 20 class CSSValueList;
21 21
22 class CORE_EXPORT DeferredLegacyStyleInterpolation : public StyleInterpolation { 22 class CORE_EXPORT DeferredLegacyStyleInterpolation : public StyleInterpolation {
23 public: 23 public:
24 static PassRefPtrWillBeRawPtr<DeferredLegacyStyleInterpolation> create(PassR efPtrWillBeRawPtr<CSSValue> start, PassRefPtrWillBeRawPtr<CSSValue> end, CSSProp ertyID id) 24 static DeferredLegacyStyleInterpolation* create(PassRefPtrWillBeRawPtr<CSSVa lue> start, PassRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id)
25 { 25 {
26 return adoptRefWillBeNoop(new DeferredLegacyStyleInterpolation(start, en d, id)); 26 return new DeferredLegacyStyleInterpolation(start, end, id);
27 } 27 }
28 28
29 void apply(StyleResolverState&) const override; 29 void apply(StyleResolverState&) const override;
30 30
31 DECLARE_VIRTUAL_TRACE(); 31 DECLARE_VIRTUAL_TRACE();
32 32
33 static bool interpolationRequiresStyleResolve(const CSSValue&); 33 static bool interpolationRequiresStyleResolve(const CSSValue&);
34 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&); 34 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&);
35 static bool interpolationRequiresStyleResolve(const CSSImageValue&); 35 static bool interpolationRequiresStyleResolve(const CSSImageValue&);
36 static bool interpolationRequiresStyleResolve(const CSSShadowValue&); 36 static bool interpolationRequiresStyleResolve(const CSSShadowValue&);
37 static bool interpolationRequiresStyleResolve(const CSSSVGDocumentValue&); 37 static bool interpolationRequiresStyleResolve(const CSSSVGDocumentValue&);
38 static bool interpolationRequiresStyleResolve(const CSSValueList&); 38 static bool interpolationRequiresStyleResolve(const CSSValueList&);
39 static bool interpolationRequiresStyleResolve(const CSSBasicShape&); 39 static bool interpolationRequiresStyleResolve(const CSSBasicShape&);
40 40
41 void underlyingStyleChanged() { m_outdated = true; } 41 void underlyingStyleChanged() { m_outdated = true; }
42 42
43 bool isDeferredLegacyStyleInterpolation() const final { return true; } 43 bool isDeferredLegacyStyleInterpolation() const final { return true; }
44 44
45 private: 45 private:
46 DeferredLegacyStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, Pas sRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id) 46 DeferredLegacyStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, Pas sRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id)
47 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber:: create(1), id) 47 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber:: create(1), id)
48 , m_startCSSValue(start) 48 , m_startCSSValue(start)
49 , m_endCSSValue(end) 49 , m_endCSSValue(end)
50 , m_outdated(true) 50 , m_outdated(true)
51 { 51 {
52 } 52 }
53 53
54 RefPtrWillBeMember<CSSValue> m_startCSSValue; 54 RefPtrWillBeMember<CSSValue> m_startCSSValue;
55 RefPtrWillBeMember<CSSValue> m_endCSSValue; 55 RefPtrWillBeMember<CSSValue> m_endCSSValue;
56 mutable RefPtrWillBeMember<LegacyStyleInterpolation> m_innerInterpolation; 56 mutable Member<LegacyStyleInterpolation> m_innerInterpolation;
57 mutable bool m_outdated; 57 mutable bool m_outdated;
58 }; 58 };
59 59
60 DEFINE_TYPE_CASTS(DeferredLegacyStyleInterpolation, StyleInterpolation, value, v alue->isDeferredLegacyStyleInterpolation(), value.isDeferredLegacyStyleInterpola tion()); 60 DEFINE_TYPE_CASTS(DeferredLegacyStyleInterpolation, StyleInterpolation, value, v alue->isDeferredLegacyStyleInterpolation(), value.isDeferredLegacyStyleInterpola tion());
61 61
62 } 62 }
63 63
64 #endif 64 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/DefaultSVGInterpolation.h ('k') | Source/core/animation/DeferredLegacyStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698