OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "core/animation/CSSShadowListInterpolationType.h" | 5 #include "core/animation/CSSShadowListInterpolationType.h" |
6 | 6 |
7 #include "core/animation/ListInterpolationFunctions.h" | 7 #include "core/animation/ListInterpolationFunctions.h" |
8 #include "core/animation/ShadowInterpolationFunctions.h" | 8 #include "core/animation/ShadowInterpolationFunctions.h" |
9 #include "core/animation/ShadowListPropertyFunctions.h" | 9 #include "core/animation/ShadowListPropertyFunctions.h" |
10 #include "core/css/CSSIdentifierValue.h" | 10 #include "core/css/CSSIdentifierValue.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 static std::unique_ptr<InheritedShadowListChecker> create( | 52 static std::unique_ptr<InheritedShadowListChecker> create( |
53 CSSPropertyID property, | 53 CSSPropertyID property, |
54 PassRefPtr<ShadowList> shadowList) { | 54 PassRefPtr<ShadowList> shadowList) { |
55 return WTF::wrapUnique( | 55 return WTF::wrapUnique( |
56 new InheritedShadowListChecker(property, std::move(shadowList))); | 56 new InheritedShadowListChecker(property, std::move(shadowList))); |
57 } | 57 } |
58 | 58 |
59 private: | 59 private: |
60 InheritedShadowListChecker(CSSPropertyID property, | 60 InheritedShadowListChecker(CSSPropertyID property, |
61 PassRefPtr<ShadowList> shadowList) | 61 PassRefPtr<ShadowList> shadowList) |
62 : m_property(property), m_shadowList(shadowList) {} | 62 : m_property(property), m_shadowList(std::move(shadowList)) {} |
63 | 63 |
64 bool isValid(const InterpolationEnvironment& environment, | 64 bool isValid(const InterpolationEnvironment& environment, |
65 const InterpolationValue& underlying) const final { | 65 const InterpolationValue& underlying) const final { |
66 const ShadowList* inheritedShadowList = | 66 const ShadowList* inheritedShadowList = |
67 ShadowListPropertyFunctions::getShadowList( | 67 ShadowListPropertyFunctions::getShadowList( |
68 m_property, *environment.state().parentStyle()); | 68 m_property, *environment.state().parentStyle()); |
69 if (!inheritedShadowList && !m_shadowList) | 69 if (!inheritedShadowList && !m_shadowList) |
70 return true; | 70 return true; |
71 if (!inheritedShadowList || !m_shadowList) | 71 if (!inheritedShadowList || !m_shadowList) |
72 return false; | 72 return false; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 void CSSShadowListInterpolationType::applyStandardPropertyValue( | 159 void CSSShadowListInterpolationType::applyStandardPropertyValue( |
160 const InterpolableValue& interpolableValue, | 160 const InterpolableValue& interpolableValue, |
161 const NonInterpolableValue* nonInterpolableValue, | 161 const NonInterpolableValue* nonInterpolableValue, |
162 StyleResolverState& state) const { | 162 StyleResolverState& state) const { |
163 ShadowListPropertyFunctions::setShadowList( | 163 ShadowListPropertyFunctions::setShadowList( |
164 cssProperty(), *state.style(), | 164 cssProperty(), *state.style(), |
165 createShadowList(interpolableValue, nonInterpolableValue, state)); | 165 createShadowList(interpolableValue, nonInterpolableValue, state)); |
166 } | 166 } |
167 | 167 |
168 } // namespace blink | 168 } // namespace blink |
OLD | NEW |