| OLD | NEW |
| 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/animation/LegacyStyleInterpolation.h" |
| 8 #include "core/animation/StyleInterpolation.h" | 9 #include "core/animation/StyleInterpolation.h" |
| 9 #include "core/css/CSSValue.h" | 10 #include "core/css/CSSValue.h" |
| 10 | 11 |
| 11 namespace blink { | 12 namespace blink { |
| 12 | 13 |
| 13 class CSSBasicShape; | 14 class CSSBasicShape; |
| 14 class CSSImageValue; | 15 class CSSImageValue; |
| 15 class CSSPrimitiveValue; | 16 class CSSPrimitiveValue; |
| 16 class CSSShadowValue; | 17 class CSSShadowValue; |
| 17 class CSSSVGDocumentValue; | 18 class CSSSVGDocumentValue; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 29 virtual void trace(Visitor*) override; | 30 virtual void trace(Visitor*) override; |
| 30 | 31 |
| 31 static bool interpolationRequiresStyleResolve(const CSSValue&); | 32 static bool interpolationRequiresStyleResolve(const CSSValue&); |
| 32 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&); | 33 static bool interpolationRequiresStyleResolve(const CSSPrimitiveValue&); |
| 33 static bool interpolationRequiresStyleResolve(const CSSImageValue&); | 34 static bool interpolationRequiresStyleResolve(const CSSImageValue&); |
| 34 static bool interpolationRequiresStyleResolve(const CSSShadowValue&); | 35 static bool interpolationRequiresStyleResolve(const CSSShadowValue&); |
| 35 static bool interpolationRequiresStyleResolve(const CSSSVGDocumentValue&); | 36 static bool interpolationRequiresStyleResolve(const CSSSVGDocumentValue&); |
| 36 static bool interpolationRequiresStyleResolve(const CSSValueList&); | 37 static bool interpolationRequiresStyleResolve(const CSSValueList&); |
| 37 static bool interpolationRequiresStyleResolve(const CSSBasicShape&); | 38 static bool interpolationRequiresStyleResolve(const CSSBasicShape&); |
| 38 | 39 |
| 40 void underlyingStyleChanged() { m_outdated = true; } |
| 41 |
| 42 virtual bool isDeferredLegacyStyleInterpolation() const override final { ret
urn true; } |
| 43 |
| 39 private: | 44 private: |
| 40 DeferredLegacyStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, Pas
sRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id) | 45 DeferredLegacyStyleInterpolation(PassRefPtrWillBeRawPtr<CSSValue> start, Pas
sRefPtrWillBeRawPtr<CSSValue> end, CSSPropertyID id) |
| 41 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber::
create(1), id) | 46 : StyleInterpolation(InterpolableNumber::create(0), InterpolableNumber::
create(1), id) |
| 42 , m_startCSSValue(start) | 47 , m_startCSSValue(start) |
| 43 , m_endCSSValue(end) | 48 , m_endCSSValue(end) |
| 49 , m_outdated(true) |
| 44 { | 50 { |
| 45 } | 51 } |
| 46 | 52 |
| 47 RefPtrWillBeMember<CSSValue> m_startCSSValue; | 53 RefPtrWillBeMember<CSSValue> m_startCSSValue; |
| 48 RefPtrWillBeMember<CSSValue> m_endCSSValue; | 54 RefPtrWillBeMember<CSSValue> m_endCSSValue; |
| 55 mutable RefPtrWillBeMember<LegacyStyleInterpolation> m_innerInterpolation; |
| 56 mutable bool m_outdated; |
| 49 }; | 57 }; |
| 50 | 58 |
| 59 DEFINE_TYPE_CASTS(DeferredLegacyStyleInterpolation, StyleInterpolation, value, v
alue->isDeferredLegacyStyleInterpolation(), value.isDeferredLegacyStyleInterpola
tion()); |
| 60 |
| 51 } | 61 } |
| 52 | 62 |
| 53 #endif | 63 #endif |
| OLD | NEW |