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" |
11 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 11 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
12 #include "core/animation/DoubleStyleInterpolation.h" | 12 #include "core/animation/DoubleStyleInterpolation.h" |
13 #include "core/animation/ImageStyleInterpolation.h" | 13 #include "core/animation/ImageStyleInterpolation.h" |
14 #include "core/animation/LegacyStyleInterpolation.h" | 14 #include "core/animation/LegacyStyleInterpolation.h" |
15 #include "core/animation/LengthBoxStyleInterpolation.h" | 15 #include "core/animation/LengthBoxStyleInterpolation.h" |
16 #include "core/animation/LengthPairStyleInterpolation.h" | 16 #include "core/animation/LengthPairStyleInterpolation.h" |
17 #include "core/animation/LengthStyleInterpolation.h" | 17 #include "core/animation/LengthStyleInterpolation.h" |
18 #include "core/animation/ListStyleInterpolation.h" | 18 #include "core/animation/ListStyleInterpolation.h" |
19 #include "core/animation/SVGLengthStyleInterpolation.h" | |
20 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" | 19 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" |
21 #include "core/animation/ShadowStyleInterpolation.h" | 20 #include "core/animation/ShadowStyleInterpolation.h" |
22 #include "core/animation/VisibilityStyleInterpolation.h" | 21 #include "core/animation/VisibilityStyleInterpolation.h" |
23 #include "core/animation/css/CSSAnimations.h" | 22 #include "core/animation/css/CSSAnimations.h" |
24 #include "core/css/CSSPropertyMetadata.h" | 23 #include "core/css/CSSPropertyMetadata.h" |
25 #include "core/css/resolver/StyleResolver.h" | 24 #include "core/css/resolver/StyleResolver.h" |
26 #include "core/layout/style/LayoutStyle.h" | 25 #include "core/layout/style/LayoutStyle.h" |
27 | 26 |
28 namespace blink { | 27 namespace blink { |
29 | 28 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 case CSSPropertyMinHeight: | 164 case CSSPropertyMinHeight: |
166 case CSSPropertyMinWidth: | 165 case CSSPropertyMinWidth: |
167 case CSSPropertyMotionOffset: | 166 case CSSPropertyMotionOffset: |
168 case CSSPropertyOutlineWidth: | 167 case CSSPropertyOutlineWidth: |
169 case CSSPropertyPaddingBottom: | 168 case CSSPropertyPaddingBottom: |
170 case CSSPropertyPaddingLeft: | 169 case CSSPropertyPaddingLeft: |
171 case CSSPropertyPaddingRight: | 170 case CSSPropertyPaddingRight: |
172 case CSSPropertyPaddingTop: | 171 case CSSPropertyPaddingTop: |
173 case CSSPropertyPerspective: | 172 case CSSPropertyPerspective: |
174 case CSSPropertyShapeMargin: | 173 case CSSPropertyShapeMargin: |
| 174 case CSSPropertyStrokeWidth: |
175 case CSSPropertyWebkitBorderHorizontalSpacing: | 175 case CSSPropertyWebkitBorderHorizontalSpacing: |
176 case CSSPropertyWebkitBorderVerticalSpacing: | 176 case CSSPropertyWebkitBorderVerticalSpacing: |
177 case CSSPropertyWebkitColumnGap: | 177 case CSSPropertyWebkitColumnGap: |
178 case CSSPropertyWebkitColumnWidth: | 178 case CSSPropertyWebkitColumnWidth: |
179 case CSSPropertyWidth: | 179 case CSSPropertyWidth: |
180 range = RangeNonNegative; | 180 range = RangeNonNegative; |
181 // Fall through | 181 // Fall through |
182 case CSSPropertyBaselineShift: | 182 case CSSPropertyBaselineShift: |
183 case CSSPropertyBottom: | 183 case CSSPropertyBottom: |
184 case CSSPropertyLeft: | 184 case CSSPropertyLeft: |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { | 324 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { |
325 forceDefaultInterpolation = true; | 325 forceDefaultInterpolation = true; |
326 break; | 326 break; |
327 } | 327 } |
328 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); | 328 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); |
329 if (interpolation) | 329 if (interpolation) |
330 return interpolation.release(); | 330 return interpolation.release(); |
331 break; | 331 break; |
332 } | 332 } |
333 | 333 |
334 case CSSPropertyStrokeWidth: { | |
335 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol
ation::maybeCreate(*fromCSSValue, *toCSSValue, property, RangeNonNegative); | |
336 if (interpolation) | |
337 return interpolation.release(); | |
338 | |
339 break; | |
340 } | |
341 case CSSPropertyStrokeDasharray: { | 334 case CSSPropertyStrokeDasharray: { |
342 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); | 335 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); |
343 if (interpolation) | 336 if (interpolation) |
344 return interpolation.release(); | 337 return interpolation.release(); |
345 | 338 |
346 break; | 339 break; |
347 } | 340 } |
| 341 |
348 default: | 342 default: |
349 // Fall back to LegacyStyleInterpolation. | 343 // Fall back to LegacyStyleInterpolation. |
350 fallBackToLegacy = true; | 344 fallBackToLegacy = true; |
351 break; | 345 break; |
352 } | 346 } |
353 | 347 |
354 if (fromCSSValue == toCSSValue) | 348 if (fromCSSValue == toCSSValue) |
355 return ConstantStyleInterpolation::create(fromCSSValue, property); | 349 return ConstantStyleInterpolation::create(fromCSSValue, property); |
356 | 350 |
357 if (forceDefaultInterpolation) | 351 if (forceDefaultInterpolation) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 } | 389 } |
396 | 390 |
397 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 391 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
398 { | 392 { |
399 visitor->trace(m_value); | 393 visitor->trace(m_value); |
400 visitor->trace(m_animatableValueCache); | 394 visitor->trace(m_animatableValueCache); |
401 Keyframe::PropertySpecificKeyframe::trace(visitor); | 395 Keyframe::PropertySpecificKeyframe::trace(visitor); |
402 } | 396 } |
403 | 397 |
404 } | 398 } |
OLD | NEW |