| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 case CSSPropertyMaxWidth: | 163 case CSSPropertyMaxWidth: |
| 164 case CSSPropertyMinHeight: | 164 case CSSPropertyMinHeight: |
| 165 case CSSPropertyMinWidth: | 165 case CSSPropertyMinWidth: |
| 166 case CSSPropertyMotionOffset: | 166 case CSSPropertyMotionOffset: |
| 167 case CSSPropertyOutlineWidth: | 167 case CSSPropertyOutlineWidth: |
| 168 case CSSPropertyPaddingBottom: | 168 case CSSPropertyPaddingBottom: |
| 169 case CSSPropertyPaddingLeft: | 169 case CSSPropertyPaddingLeft: |
| 170 case CSSPropertyPaddingRight: | 170 case CSSPropertyPaddingRight: |
| 171 case CSSPropertyPaddingTop: | 171 case CSSPropertyPaddingTop: |
| 172 case CSSPropertyPerspective: | 172 case CSSPropertyPerspective: |
| 173 case CSSPropertyR: |
| 174 case CSSPropertyRx: |
| 175 case CSSPropertyRy: |
| 173 case CSSPropertyShapeMargin: | 176 case CSSPropertyShapeMargin: |
| 174 case CSSPropertyStrokeWidth: | 177 case CSSPropertyStrokeWidth: |
| 175 case CSSPropertyWebkitBorderHorizontalSpacing: | 178 case CSSPropertyWebkitBorderHorizontalSpacing: |
| 176 case CSSPropertyWebkitBorderVerticalSpacing: | 179 case CSSPropertyWebkitBorderVerticalSpacing: |
| 177 case CSSPropertyWebkitColumnGap: | 180 case CSSPropertyWebkitColumnGap: |
| 178 case CSSPropertyWebkitColumnWidth: | 181 case CSSPropertyWebkitColumnWidth: |
| 179 case CSSPropertyWidth: | 182 case CSSPropertyWidth: |
| 180 range = RangeNonNegative; | 183 range = RangeNonNegative; |
| 181 // Fall through | 184 // Fall through |
| 182 case CSSPropertyBaselineShift: | 185 case CSSPropertyBaselineShift: |
| 183 case CSSPropertyBottom: | 186 case CSSPropertyBottom: |
| 187 case CSSPropertyCx: |
| 188 case CSSPropertyCy: |
| 184 case CSSPropertyLeft: | 189 case CSSPropertyLeft: |
| 185 case CSSPropertyLetterSpacing: | 190 case CSSPropertyLetterSpacing: |
| 186 case CSSPropertyMarginBottom: | 191 case CSSPropertyMarginBottom: |
| 187 case CSSPropertyMarginLeft: | 192 case CSSPropertyMarginLeft: |
| 188 case CSSPropertyMarginRight: | 193 case CSSPropertyMarginRight: |
| 189 case CSSPropertyMarginTop: | 194 case CSSPropertyMarginTop: |
| 190 case CSSPropertyOutlineOffset: | 195 case CSSPropertyOutlineOffset: |
| 191 case CSSPropertyRight: | 196 case CSSPropertyRight: |
| 192 case CSSPropertyStrokeDashoffset: | 197 case CSSPropertyStrokeDashoffset: |
| 193 case CSSPropertyTop: | 198 case CSSPropertyTop: |
| 194 case CSSPropertyVerticalAlign: | 199 case CSSPropertyVerticalAlign: |
| 195 case CSSPropertyWordSpacing: | 200 case CSSPropertyWordSpacing: |
| 196 case CSSPropertyWebkitColumnRuleWidth: | 201 case CSSPropertyWebkitColumnRuleWidth: |
| 202 case CSSPropertyX: |
| 203 case CSSPropertyY: |
| 197 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue, property) &&
LengthStyleInterpolation::canCreateFrom(*toCSSValue, property)) | 204 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue, property) &&
LengthStyleInterpolation::canCreateFrom(*toCSSValue, property)) |
| 198 return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue,
property, range); | 205 return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue,
property, range); |
| 199 | 206 |
| 200 // FIXME: Handle keywords e.g. 'smaller', 'larger'. | 207 // FIXME: Handle keywords e.g. 'smaller', 'larger'. |
| 201 if (property == CSSPropertyFontSize) | 208 if (property == CSSPropertyFontSize) |
| 202 fallBackToLegacy = true; | 209 fallBackToLegacy = true; |
| 203 | 210 |
| 204 // FIXME: Handle keywords e.g. 'baseline', 'sub'. | 211 // FIXME: Handle keywords e.g. 'baseline', 'sub'. |
| 205 if (property == CSSPropertyBaselineShift) | 212 if (property == CSSPropertyBaselineShift) |
| 206 fallBackToLegacy = true; | 213 fallBackToLegacy = true; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 388 } |
| 382 | 389 |
| 383 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 390 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
| 384 { | 391 { |
| 385 visitor->trace(m_value); | 392 visitor->trace(m_value); |
| 386 visitor->trace(m_animatableValueCache); | 393 visitor->trace(m_animatableValueCache); |
| 387 Keyframe::PropertySpecificKeyframe::trace(visitor); | 394 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 388 } | 395 } |
| 389 | 396 |
| 390 } | 397 } |
| OLD | NEW |