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/CompositorAnimations.h" | 9 #include "core/animation/CompositorAnimations.h" |
| 10 #include "core/animation/ConstantStyleInterpolation.h" | 10 #include "core/animation/ConstantStyleInterpolation.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 case CSSPropertyFloodOpacity: | 104 case CSSPropertyFloodOpacity: |
| 105 case CSSPropertyStopOpacity: | 105 case CSSPropertyStopOpacity: |
| 106 case CSSPropertyStrokeOpacity: | 106 case CSSPropertyStrokeOpacity: |
| 107 case CSSPropertyShapeImageThreshold: | 107 case CSSPropertyShapeImageThreshold: |
| 108 return RangeZeroToOne; | 108 return RangeZeroToOne; |
| 109 case CSSPropertyFillOpacity: | 109 case CSSPropertyFillOpacity: |
| 110 case CSSPropertyOpacity: | 110 case CSSPropertyOpacity: |
| 111 return RangeOpacityFIXME; | 111 return RangeOpacityFIXME; |
| 112 case CSSPropertyStrokeMiterlimit: | 112 case CSSPropertyStrokeMiterlimit: |
| 113 return RangeGreaterThanOrEqualToOne; | 113 return RangeGreaterThanOrEqualToOne; |
| 114 case CSSPropertyFontSizeAdjust: | |
| 115 return RangeNonNegative; | |
| 114 default: | 116 default: |
| 115 ASSERT_NOT_REACHED(); | 117 ASSERT_NOT_REACHED(); |
| 116 return RangeAll; | 118 return RangeAll; |
| 117 } | 119 } |
| 118 } | 120 } |
| 119 | 121 |
| 120 } // namespace | 122 } // namespace |
| 121 | 123 |
| 122 // FIXME: Refactor this into a generic piece that lives in InterpolationEffect, and a template parameter specific converter. | 124 // FIXME: Refactor this into a generic piece that lives in InterpolationEffect, and a template parameter specific converter. |
| 123 PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe:: maybeCreateInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyfr ame& end, Element* element, const LayoutStyle* baseStyle) const | 125 PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe:: maybeCreateInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyfr ame& end, Element* element, const LayoutStyle* baseStyle) const |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 | 209 |
| 208 // FIXME: Handle keywords e.g. 'smaller', 'larger'. | 210 // FIXME: Handle keywords e.g. 'smaller', 'larger'. |
| 209 if (property == CSSPropertyFontSize) | 211 if (property == CSSPropertyFontSize) |
| 210 fallBackToLegacy = true; | 212 fallBackToLegacy = true; |
| 211 | 213 |
| 212 // FIXME: Handle keywords e.g. 'baseline', 'sub'. | 214 // FIXME: Handle keywords e.g. 'baseline', 'sub'. |
| 213 if (property == CSSPropertyBaselineShift) | 215 if (property == CSSPropertyBaselineShift) |
| 214 fallBackToLegacy = true; | 216 fallBackToLegacy = true; |
| 215 | 217 |
| 216 break; | 218 break; |
| 219 case CSSPropertyFontSizeAdjust: | |
| 220 if (AnimatableValue::usesDefaultInterpolation( | |
|
dstockwell
2015/03/17 23:36:46
Hmm, instead of adding these checks here, we can j
changseok
2015/03/18 09:05:02
Done.
| |
| 221 StyleResolver::createAnimatableValueSnapshot(*element, baseStyle, pr operty, fromCSSValue).get(), | |
| 222 StyleResolver::createAnimatableValueSnapshot(*element, baseStyle, pr operty, toCSSValue).get())) { | |
| 223 forceDefaultInterpolation = true; | |
| 224 break; | |
| 225 } | |
| 217 case CSSPropertyOrphans: | 226 case CSSPropertyOrphans: |
| 218 case CSSPropertyWidows: | 227 case CSSPropertyWidows: |
| 219 case CSSPropertyZIndex: | 228 case CSSPropertyZIndex: |
| 220 case CSSPropertyWebkitColumnCount: | 229 case CSSPropertyWebkitColumnCount: |
| 221 case CSSPropertyShapeImageThreshold: | 230 case CSSPropertyShapeImageThreshold: |
| 222 case CSSPropertyFillOpacity: | 231 case CSSPropertyFillOpacity: |
| 223 case CSSPropertyFloodOpacity: | 232 case CSSPropertyFloodOpacity: |
| 224 case CSSPropertyOpacity: | 233 case CSSPropertyOpacity: |
| 225 case CSSPropertyStopOpacity: | 234 case CSSPropertyStopOpacity: |
| 226 case CSSPropertyStrokeOpacity: | 235 case CSSPropertyStrokeOpacity: |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 398 } | 407 } |
| 399 | 408 |
| 400 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 409 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
| 401 { | 410 { |
| 402 visitor->trace(m_value); | 411 visitor->trace(m_value); |
| 403 visitor->trace(m_animatableValueCache); | 412 visitor->trace(m_animatableValueCache); |
| 404 Keyframe::PropertySpecificKeyframe::trace(visitor); | 413 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 405 } | 414 } |
| 406 | 415 |
| 407 } | 416 } |
| OLD | NEW |