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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 129 } |
130 | 130 |
131 LengthSize animatableValueToLengthSize(const AnimatableValue* value, const Style
ResolverState& state, ValueRange range) | 131 LengthSize animatableValueToLengthSize(const AnimatableValue* value, const Style
ResolverState& state, ValueRange range) |
132 { | 132 { |
133 const AnimatableLengthSize* animatableLengthSize = toAnimatableLengthSize(va
lue); | 133 const AnimatableLengthSize* animatableLengthSize = toAnimatableLengthSize(va
lue); |
134 return LengthSize( | 134 return LengthSize( |
135 animatableValueToLength(animatableLengthSize->width(), state, range), | 135 animatableValueToLength(animatableLengthSize->width(), state, range), |
136 animatableValueToLength(animatableLengthSize->height(), state, range)); | 136 animatableValueToLength(animatableLengthSize->height(), state, range)); |
137 } | 137 } |
138 | 138 |
139 void setFillSize(FillLayer* fillLayer, const AnimatableValue* value, const Style
ResolverState& state) | 139 void setFillSize(FillLayer* fillLayer, const AnimatableValue* value, StyleResolv
erState& state) |
140 { | 140 { |
141 if (value->isLengthSize()) | 141 if (value->isLengthSize()) |
142 fillLayer->setSize(FillSize(SizeLength, animatableValueToLengthSize(valu
e, state, ValueRangeNonNegative))); | 142 fillLayer->setSize(FillSize(SizeLength, animatableValueToLengthSize(valu
e, state, ValueRangeNonNegative))); |
143 else | 143 else |
144 state.styleMap().mapFillSize(fillLayer, toAnimatableUnknown(value)->toCS
SValue().get()); | 144 CSSToStyleMap::mapFillSize(state, fillLayer, toAnimatableUnknown(value)-
>toCSSValue().get()); |
145 } | 145 } |
146 | 146 |
147 PassRefPtrWillBeRawPtr<SVGLength> animatableValueToNonNegativeSVGLength(const An
imatableValue* value) | 147 PassRefPtrWillBeRawPtr<SVGLength> animatableValueToNonNegativeSVGLength(const An
imatableValue* value) |
148 { | 148 { |
149 RefPtrWillBeRawPtr<SVGLength> length = toAnimatableSVGLength(value)->toSVGLe
ngth(); | 149 RefPtrWillBeRawPtr<SVGLength> length = toAnimatableSVGLength(value)->toSVGLe
ngth(); |
150 if (length->valueInSpecifiedUnits() < 0) | 150 if (length->valueInSpecifiedUnits() < 0) |
151 length->setValueInSpecifiedUnits(0); | 151 length->setValueInSpecifiedUnits(0); |
152 return length.release(); | 152 return length.release(); |
153 } | 153 } |
154 | 154 |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 return; | 621 return; |
622 case CSSPropertyZoom: | 622 case CSSPropertyZoom: |
623 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std
::numeric_limits<float>::denorm_min())); | 623 style->setZoom(clampTo<float>(toAnimatableDouble(value)->toDouble(), std
::numeric_limits<float>::denorm_min())); |
624 return; | 624 return; |
625 default: | 625 default: |
626 ASSERT_NOT_REACHED(); | 626 ASSERT_NOT_REACHED(); |
627 } | 627 } |
628 } | 628 } |
629 | 629 |
630 } // namespace blink | 630 } // namespace blink |
OLD | NEW |