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/CompositorAnimations.h" | 9 #include "core/animation/CompositorAnimations.h" |
10 #include "core/animation/ConstantStyleInterpolation.h" | 10 #include "core/animation/ConstantStyleInterpolation.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 case CSSPropertyBaselineShift: | 181 case CSSPropertyBaselineShift: |
182 case CSSPropertyBottom: | 182 case CSSPropertyBottom: |
183 case CSSPropertyLeft: | 183 case CSSPropertyLeft: |
184 case CSSPropertyLetterSpacing: | 184 case CSSPropertyLetterSpacing: |
185 case CSSPropertyMarginBottom: | 185 case CSSPropertyMarginBottom: |
186 case CSSPropertyMarginLeft: | 186 case CSSPropertyMarginLeft: |
187 case CSSPropertyMarginRight: | 187 case CSSPropertyMarginRight: |
188 case CSSPropertyMarginTop: | 188 case CSSPropertyMarginTop: |
189 case CSSPropertyOutlineOffset: | 189 case CSSPropertyOutlineOffset: |
190 case CSSPropertyRight: | 190 case CSSPropertyRight: |
| 191 case CSSPropertyStrokeDashoffset: |
191 case CSSPropertyTop: | 192 case CSSPropertyTop: |
192 case CSSPropertyVerticalAlign: | 193 case CSSPropertyVerticalAlign: |
193 case CSSPropertyWordSpacing: | 194 case CSSPropertyWordSpacing: |
194 case CSSPropertyWebkitColumnRuleWidth: | 195 case CSSPropertyWebkitColumnRuleWidth: |
195 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyl
eInterpolation::canCreateFrom(*toCSSValue)) | 196 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyl
eInterpolation::canCreateFrom(*toCSSValue)) |
196 return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue,
property, range); | 197 return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue,
property, range); |
197 | 198 |
198 // FIXME: Handle keywords e.g. 'none'. | 199 // FIXME: Handle keywords e.g. 'none'. |
199 if (property == CSSPropertyPerspective) | 200 if (property == CSSPropertyPerspective) |
200 fallBackToLegacy = true; | 201 fallBackToLegacy = true; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { | 326 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { |
326 forceDefaultInterpolation = true; | 327 forceDefaultInterpolation = true; |
327 break; | 328 break; |
328 } | 329 } |
329 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); | 330 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); |
330 if (interpolation) | 331 if (interpolation) |
331 return interpolation.release(); | 332 return interpolation.release(); |
332 break; | 333 break; |
333 } | 334 } |
334 | 335 |
335 case CSSPropertyStrokeWidth: | 336 case CSSPropertyStrokeWidth: { |
336 range = RangeNonNegative; | 337 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol
ation::maybeCreate(*fromCSSValue, *toCSSValue, property, RangeNonNegative); |
337 // Fall through | |
338 case CSSPropertyStrokeDashoffset: { | |
339 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol
ation::maybeCreate(*fromCSSValue, *toCSSValue, property, range); | |
340 if (interpolation) | 338 if (interpolation) |
341 return interpolation.release(); | 339 return interpolation.release(); |
342 | 340 |
343 break; | 341 break; |
344 } | 342 } |
345 case CSSPropertyStrokeDasharray: { | 343 case CSSPropertyStrokeDasharray: { |
346 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); | 344 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); |
347 if (interpolation) | 345 if (interpolation) |
348 return interpolation.release(); | 346 return interpolation.release(); |
349 | 347 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 } | 412 } |
415 | 413 |
416 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 414 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
417 { | 415 { |
418 visitor->trace(m_value); | 416 visitor->trace(m_value); |
419 visitor->trace(m_animatableValueCache); | 417 visitor->trace(m_animatableValueCache); |
420 Keyframe::PropertySpecificKeyframe::trace(visitor); | 418 Keyframe::PropertySpecificKeyframe::trace(visitor); |
421 } | 419 } |
422 | 420 |
423 } | 421 } |
OLD | NEW |