| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 static SVGPaintType normalizeSVGPaintType(SVGPaintType paintType) | 300 static SVGPaintType normalizeSVGPaintType(SVGPaintType paintType) |
| 301 { | 301 { |
| 302 // If the <paint> is 'currentColor', then create an AnimatableSVGPaint with | 302 // If the <paint> is 'currentColor', then create an AnimatableSVGPaint with |
| 303 // a <rgbcolor> type. This is similar in vein to the handling of colors. | 303 // a <rgbcolor> type. This is similar in vein to the handling of colors. |
| 304 return paintType == SVG_PAINTTYPE_CURRENTCOLOR ? SVG_PAINTTYPE_RGBCOLOR : pa
intType; | 304 return paintType == SVG_PAINTTYPE_CURRENTCOLOR ? SVG_PAINTTYPE_RGBCOLOR : pa
intType; |
| 305 } | 305 } |
| 306 | 306 |
| 307 // FIXME: Generate this function. | 307 // FIXME: Generate this function. |
| 308 PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPro
pertyID property, const ComputedStyle& style) | 308 PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPro
pertyID property, const ComputedStyle& style) |
| 309 { | 309 { |
| 310 ASSERT(CSSPropertyMetadata::isAnimatableProperty(property)); | 310 ASSERT(CSSPropertyMetadata::isInterpolableProperty(property)); |
| 311 switch (property) { | 311 switch (property) { |
| 312 case CSSPropertyBackgroundColor: | 312 case CSSPropertyBackgroundColor: |
| 313 return createFromColor(property, style); | 313 return createFromColor(property, style); |
| 314 case CSSPropertyBackgroundImage: | 314 case CSSPropertyBackgroundImage: |
| 315 return createFromFillLayers<CSSPropertyBackgroundImage>(style.background
Layers(), style); | 315 return createFromFillLayers<CSSPropertyBackgroundImage>(style.background
Layers(), style); |
| 316 case CSSPropertyBackgroundPositionX: | 316 case CSSPropertyBackgroundPositionX: |
| 317 return createFromFillLayers<CSSPropertyBackgroundPositionX>(style.backgr
oundLayers(), style); | 317 return createFromFillLayers<CSSPropertyBackgroundPositionX>(style.backgr
oundLayers(), style); |
| 318 case CSSPropertyBackgroundPositionY: | 318 case CSSPropertyBackgroundPositionY: |
| 319 return createFromFillLayers<CSSPropertyBackgroundPositionY>(style.backgr
oundLayers(), style); | 319 return createFromFillLayers<CSSPropertyBackgroundPositionY>(style.backgr
oundLayers(), style); |
| 320 case CSSPropertyBackgroundSize: | 320 case CSSPropertyBackgroundSize: |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 if (style.hasAutoZIndex()) | 582 if (style.hasAutoZIndex()) |
| 583 return AnimatableUnknown::create(CSSValueAuto); | 583 return AnimatableUnknown::create(CSSValueAuto); |
| 584 return createFromDouble(style.zIndex()); | 584 return createFromDouble(style.zIndex()); |
| 585 default: | 585 default: |
| 586 ASSERT_NOT_REACHED(); | 586 ASSERT_NOT_REACHED(); |
| 587 return nullptr; | 587 return nullptr; |
| 588 } | 588 } |
| 589 } | 589 } |
| 590 | 590 |
| 591 } // namespace blink | 591 } // namespace blink |
| OLD | NEW |