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