Chromium Code Reviews| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/animation/StringKeyframe.h" | 6 #include "core/animation/StringKeyframe.h" |
| 7 | 7 |
| 8 #include "core/animation/ColorStyleInterpolation.h" | 8 #include "core/animation/ColorStyleInterpolation.h" |
| 9 #include "core/animation/DefaultStyleInterpolation.h" | 9 #include "core/animation/DefaultStyleInterpolation.h" |
| 10 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 10 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 case CSSPropertyColor: | 130 case CSSPropertyColor: |
| 131 case CSSPropertyFloodColor: | 131 case CSSPropertyFloodColor: |
| 132 case CSSPropertyLightingColor: | 132 case CSSPropertyLightingColor: |
| 133 case CSSPropertyOutlineColor: | 133 case CSSPropertyOutlineColor: |
| 134 case CSSPropertyStopColor: | 134 case CSSPropertyStopColor: |
| 135 case CSSPropertyTextDecorationColor: | 135 case CSSPropertyTextDecorationColor: |
| 136 case CSSPropertyWebkitColumnRuleColor: | 136 case CSSPropertyWebkitColumnRuleColor: |
| 137 case CSSPropertyWebkitTextStrokeColor: | 137 case CSSPropertyWebkitTextStrokeColor: |
| 138 if (ColorStyleInterpolation::canCreateFrom(*fromCSSValue) && ColorStyleI nterpolation::canCreateFrom(*toCSSValue)) | 138 if (ColorStyleInterpolation::canCreateFrom(*fromCSSValue) && ColorStyleI nterpolation::canCreateFrom(*toCSSValue)) |
| 139 return ColorStyleInterpolation::create(*fromCSSValue, *toCSSValue, p roperty); | 139 return ColorStyleInterpolation::create(*fromCSSValue, *toCSSValue, p roperty); |
| 140 case CSSPropertyBorderBottomLeftRadius: | |
| 141 case CSSPropertyBorderBottomRightRadius: | |
| 142 case CSSPropertyBorderTopLeftRadius: | |
| 143 case CSSPropertyBorderTopRightRadius: | |
| 144 case CSSPropertyPerspectiveOrigin: | |
|
Eric Willigers
2014/12/19 05:05:52
PerspectiveOrigin can be negative:
MDN - https://d
evemj (not active)
2014/12/20 05:57:45
Done.
| |
| 145 range = ValueRangeNonNegative; | |
| 146 // Fall through | |
| 147 case CSSPropertyObjectPosition: | |
| 148 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue)) | |
| 149 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, range); | |
| 150 break; | |
| 140 default: | 151 default: |
| 141 break; | 152 break; |
| 142 } | 153 } |
| 143 | 154 |
| 144 if (DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(*fro mCSSValue) || DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolv e(*toCSSValue)) | 155 if (DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(*fro mCSSValue) || DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolv e(*toCSSValue)) |
| 145 return DeferredLegacyStyleInterpolation::create(fromCSSValue, toCSSValue , property); | 156 return DeferredLegacyStyleInterpolation::create(fromCSSValue, toCSSValue , property); |
| 146 | 157 |
| 147 // FIXME: Remove the use of AnimatableValues, RenderStyles and Elements here . | 158 // FIXME: Remove the use of AnimatableValues, RenderStyles and Elements here . |
| 148 // FIXME: Remove this cache | 159 // FIXME: Remove this cache |
| 149 ASSERT(element); | 160 ASSERT(element); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 169 } | 180 } |
| 170 | 181 |
| 171 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) | 182 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) |
| 172 { | 183 { |
| 173 visitor->trace(m_value); | 184 visitor->trace(m_value); |
| 174 visitor->trace(m_animatableValueCache); | 185 visitor->trace(m_animatableValueCache); |
| 175 Keyframe::PropertySpecificKeyframe::trace(visitor); | 186 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 176 } | 187 } |
| 177 | 188 |
| 178 } | 189 } |
| OLD | NEW |