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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 { | 149 { |
150 if (value->isLengthSize()) | 150 if (value->isLengthSize()) |
151 fillLayer->setSize(FillSize(SizeLength, animatableValueToLengthSize(valu
e, state, ValueRangeNonNegative))); | 151 fillLayer->setSize(FillSize(SizeLength, animatableValueToLengthSize(valu
e, state, ValueRangeNonNegative))); |
152 else | 152 else |
153 CSSToStyleMap::mapFillSize(state, fillLayer, toAnimatableUnknown(value)-
>toCSSValue().get()); | 153 CSSToStyleMap::mapFillSize(state, fillLayer, toAnimatableUnknown(value)-
>toCSSValue().get()); |
154 } | 154 } |
155 | 155 |
156 template <CSSPropertyID property> | 156 template <CSSPropertyID property> |
157 void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR
esolverState& state) | 157 void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR
esolverState& state) |
158 { | 158 { |
159 const WillBeHeapVector<RefPtrWillBeMember<AnimatableValue>>& values = toAnim
atableRepeatable(value)->values(); | 159 const HeapVector<Member<AnimatableValue>>& values = toAnimatableRepeatable(v
alue)->values(); |
160 ASSERT(!values.isEmpty()); | 160 ASSERT(!values.isEmpty()); |
161 FillLayer* fillLayer = &fillLayers; | 161 FillLayer* fillLayer = &fillLayers; |
162 FillLayer* prev = 0; | 162 FillLayer* prev = 0; |
163 for (size_t i = 0; i < values.size(); ++i) { | 163 for (size_t i = 0; i < values.size(); ++i) { |
164 if (!fillLayer) | 164 if (!fillLayer) |
165 fillLayer = prev->ensureNext(); | 165 fillLayer = prev->ensureNext(); |
166 const AnimatableValue* layerValue = values[i].get(); | 166 const AnimatableValue* layerValue = values[i].get(); |
167 switch (property) { | 167 switch (property) { |
168 case CSSPropertyBackgroundImage: | 168 case CSSPropertyBackgroundImage: |
169 case CSSPropertyWebkitMaskImage: | 169 case CSSPropertyWebkitMaskImage: |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 case CSSPropertyRy: | 682 case CSSPropertyRy: |
683 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative
)); | 683 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative
)); |
684 return; | 684 return; |
685 | 685 |
686 default: | 686 default: |
687 ASSERT_NOT_REACHED(); | 687 ASSERT_NOT_REACHED(); |
688 } | 688 } |
689 } | 689 } |
690 | 690 |
691 } // namespace blink | 691 } // namespace blink |
OLD | NEW |