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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 | 209 |
| 210 // FIXME: Handle keywords e.g. 'smaller', 'larger'. | 210 // FIXME: Handle keywords e.g. 'smaller', 'larger'. |
| 211 if (property == CSSPropertyFontSize) | 211 if (property == CSSPropertyFontSize) |
| 212 fallBackToLegacy = true; | 212 fallBackToLegacy = true; |
| 213 | 213 |
| 214 // FIXME: Handle keywords e.g. 'baseline', 'sub'. | 214 // FIXME: Handle keywords e.g. 'baseline', 'sub'. |
| 215 if (property == CSSPropertyBaselineShift) | 215 if (property == CSSPropertyBaselineShift) |
| 216 fallBackToLegacy = true; | 216 fallBackToLegacy = true; |
| 217 | 217 |
| 218 break; | 218 break; |
| 219 case CSSPropertyFontSizeAdjust: | |
| 220 // FIXME: Requires special handing for 0. | |
| 221 fallBackToLegacy = true; | |
| 222 break; | |
| 223 case CSSPropertyOrphans: | 219 case CSSPropertyOrphans: |
| 224 case CSSPropertyWidows: | 220 case CSSPropertyWidows: |
| 225 case CSSPropertyZIndex: | 221 case CSSPropertyZIndex: |
| 226 case CSSPropertyWebkitColumnCount: | 222 case CSSPropertyWebkitColumnCount: |
| 227 case CSSPropertyShapeImageThreshold: | 223 case CSSPropertyShapeImageThreshold: |
| 228 case CSSPropertyFillOpacity: | 224 case CSSPropertyFillOpacity: |
| 229 case CSSPropertyFloodOpacity: | 225 case CSSPropertyFloodOpacity: |
| 226 case CSSPropertyFontSizeAdjust: | |
| 230 case CSSPropertyOpacity: | 227 case CSSPropertyOpacity: |
| 231 case CSSPropertyStopOpacity: | 228 case CSSPropertyStopOpacity: |
| 232 case CSSPropertyStrokeOpacity: | 229 case CSSPropertyStrokeOpacity: |
| 233 case CSSPropertyStrokeMiterlimit: | 230 case CSSPropertyStrokeMiterlimit: |
| 234 if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyl eInterpolation::canCreateFrom(*toCSSValue)) | 231 if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyl eInterpolation::canCreateFrom(*toCSSValue)) |
| 235 return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, toCSSPrimitiveValue(fromCSSValue)->primitiveType(), setRange(property) ); | 232 return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, toCSSPrimitiveValue(fromCSSValue)->primitiveType(), setRange(property) ); |
| 233 | |
| 234 // FIXME: Handle keywords e.g. 'none'. | |
|
dstockwell
2015/03/20 03:24:29
This shouldn't be necessary now. Does anything bre
changseok
2015/03/20 08:29:39
Nothing. Removed.
| |
| 235 if (property == CSSPropertyFontSizeAdjust) | |
| 236 fallBackToLegacy = true; | |
| 236 break; | 237 break; |
| 237 | 238 |
| 238 case CSSPropertyMotionRotation: { | 239 case CSSPropertyMotionRotation: { |
| 239 RefPtrWillBeRawPtr<Interpolation> interpolation = DoubleStyleInterpolati on::maybeCreateFromMotionRotation(*fromCSSValue, *toCSSValue, property); | 240 RefPtrWillBeRawPtr<Interpolation> interpolation = DoubleStyleInterpolati on::maybeCreateFromMotionRotation(*fromCSSValue, *toCSSValue, property); |
| 240 if (interpolation) | 241 if (interpolation) |
| 241 return interpolation.release(); | 242 return interpolation.release(); |
| 242 break; | 243 break; |
| 243 } | 244 } |
| 244 case CSSPropertyVisibility: | 245 case CSSPropertyVisibility: |
| 245 if (VisibilityStyleInterpolation::canCreateFrom(*fromCSSValue) && Visibi lityStyleInterpolation::canCreateFrom(*toCSSValue) && (VisibilityStyleInterpolat ion::isVisible(*fromCSSValue) || VisibilityStyleInterpolation::isVisible(*toCSSV alue))) | 246 if (VisibilityStyleInterpolation::canCreateFrom(*fromCSSValue) && Visibi lityStyleInterpolation::canCreateFrom(*toCSSValue) && (VisibilityStyleInterpolat ion::isVisible(*fromCSSValue) || VisibilityStyleInterpolation::isVisible(*toCSSV alue))) |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 404 } | 405 } |
| 405 | 406 |
| 406 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 407 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
| 407 { | 408 { |
| 408 visitor->trace(m_value); | 409 visitor->trace(m_value); |
| 409 visitor->trace(m_animatableValueCache); | 410 visitor->trace(m_animatableValueCache); |
| 410 Keyframe::PropertySpecificKeyframe::trace(visitor); | 411 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 411 } | 412 } |
| 412 | 413 |
| 413 } | 414 } |
| OLD | NEW |