Chromium Code Reviews| Index: third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp |
| diff --git a/third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp b/third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp |
| index 89c4c8ec56336a3cf9eae4112f1ea53291bdbcac..c6728e57b50a082bc0807a79e78e01f6b38c2e0b 100644 |
| --- a/third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp |
| +++ b/third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp |
| @@ -89,32 +89,34 @@ double NumberPropertyFunctions::clampNumber(CSSPropertyID property, double value |
| { |
| switch (property) { |
| case CSSPropertyOrphans: |
| - case CSSPropertyWebkitColumnCount: |
| case CSSPropertyWidows: |
| - return clampTo<double>(round(value), 1); |
| + return clampTo<short>(round(value), 1); |
| + |
| + case CSSPropertyWebkitColumnCount: |
| + return clampTo<unsigned short>(round(value), 1); |
| case CSSPropertyStrokeMiterlimit: |
| - return clampTo<double>(value, 1); |
| + return clampTo<float>(value, 1); |
| case CSSPropertyFloodOpacity: |
| case CSSPropertyStopOpacity: |
| case CSSPropertyStrokeOpacity: |
| case CSSPropertyShapeImageThreshold: |
| - return clampTo<double>(value, 0, 1); |
| + return clampTo<float>(value, 0, 1); |
| case CSSPropertyFillOpacity: |
| case CSSPropertyOpacity: |
| - return clampTo<double>(value, 0, nextafterf(1, 0)); |
| + return clampTo<float>(value, 0, nextafterf(1, 0)); |
| case CSSPropertyFlexGrow: |
| case CSSPropertyFlexShrink: |
| case CSSPropertyFontSizeAdjust: |
| case CSSPropertyLineHeight: |
| - return clampTo<double>(value, 0); |
| + return clampTo<float>(value, 0); |
| case CSSPropertyWebkitColumnRuleWidth: |
|
Eric Willigers
2015/11/18 00:18:54
AnimatedStyleBuilder::applyProperty and ComputedSt
alancutter (OOO until 2018)
2015/11/18 00:33:28
Updated, also fixed AnimatedStyleBuilder calls to
|
| case CSSPropertyZIndex: |
| - return round(value); |
| + return clampTo<int>(round(value)); |
| default: |
| ASSERT_NOT_REACHED(); |