| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 PassRefPtr<SVGLength> animatableValueToNonNegativeSVGLength(const AnimatableValu
e* value) | 138 PassRefPtr<SVGLength> animatableValueToNonNegativeSVGLength(const AnimatableValu
e* value) |
| 139 { | 139 { |
| 140 RefPtr<SVGLength> length = toAnimatableSVGLength(value)->toSVGLength(); | 140 RefPtr<SVGLength> length = toAnimatableSVGLength(value)->toSVGLength(); |
| 141 if (length->valueInSpecifiedUnits() < 0) | 141 if (length->valueInSpecifiedUnits() < 0) |
| 142 length->setValueInSpecifiedUnits(0); | 142 length->setValueInSpecifiedUnits(0); |
| 143 return length.release(); | 143 return length.release(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 template <CSSPropertyID property> | 146 template <CSSPropertyID property> |
| 147 void setOnFillLayers(FillLayer* fillLayer, const AnimatableValue* value, StyleRe
solverState& state) | 147 void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR
esolverState& state) |
| 148 { | 148 { |
| 149 const WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> >& values = toAni
matableRepeatable(value)->values(); | 149 const WillBeHeapVector<RefPtrWillBeMember<AnimatableValue> >& values = toAni
matableRepeatable(value)->values(); |
| 150 ASSERT(!values.isEmpty()); | 150 ASSERT(!values.isEmpty()); |
| 151 FillLayer* fillLayer = &fillLayers; |
| 151 FillLayer* prev = 0; | 152 FillLayer* prev = 0; |
| 152 for (size_t i = 0; i < values.size(); ++i) { | 153 for (size_t i = 0; i < values.size(); ++i) { |
| 153 if (!fillLayer) { | 154 if (!fillLayer) { |
| 154 switch (property) { | 155 switch (property) { |
| 155 case CSSPropertyBackgroundImage: | 156 case CSSPropertyBackgroundImage: |
| 156 case CSSPropertyBackgroundPositionX: | 157 case CSSPropertyBackgroundPositionX: |
| 157 case CSSPropertyBackgroundPositionY: | 158 case CSSPropertyBackgroundPositionY: |
| 158 case CSSPropertyBackgroundSize: | 159 case CSSPropertyBackgroundSize: |
| 159 case CSSPropertyWebkitBackgroundSize: | 160 case CSSPropertyWebkitBackgroundSize: |
| 160 fillLayer = new FillLayer(BackgroundFillLayer); | 161 fillLayer = new FillLayer(BackgroundFillLayer); |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 return; | 631 return; |
| 631 case CSSPropertyZoom: | 632 case CSSPropertyZoom: |
| 632 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std
::numeric_limits<float>::denorm_min())); | 633 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std
::numeric_limits<float>::denorm_min())); |
| 633 return; | 634 return; |
| 634 default: | 635 default: |
| 635 ASSERT_NOT_REACHED(); | 636 ASSERT_NOT_REACHED(); |
| 636 } | 637 } |
| 637 } | 638 } |
| 638 | 639 |
| 639 } // namespace WebCore | 640 } // namespace WebCore |
| OLD | NEW |