| 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..166efd8cd26aa89402296abca4c49b62b0969b6d 100644
|
| --- a/third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/NumberPropertyFunctions.cpp
|
| @@ -88,33 +88,37 @@ bool NumberPropertyFunctions::getNumber(CSSPropertyID property, const ComputedSt
|
| double NumberPropertyFunctions::clampNumber(CSSPropertyID property, double value)
|
| {
|
| switch (property) {
|
| - case CSSPropertyOrphans:
|
| - case CSSPropertyWebkitColumnCount:
|
| - case CSSPropertyWidows:
|
| - return clampTo<double>(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 CSSPropertyOrphans:
|
| + case CSSPropertyWidows:
|
| + return clampTo<short>(round(value), 1);
|
| +
|
| + case CSSPropertyWebkitColumnCount:
|
| + return clampTo<unsigned short>(round(value), 1);
|
|
|
| case CSSPropertyWebkitColumnRuleWidth:
|
| + return clampTo<unsigned short>(round(value));
|
| +
|
| case CSSPropertyZIndex:
|
| - return round(value);
|
| + return clampTo<int>(round(value));
|
|
|
| default:
|
| ASSERT_NOT_REACHED();
|
|
|