| Index: third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
|
| index ef9d7145afca6bc040bb3210fda0089bd630156e..a8ea7e23937d818664e4c1e73e58890876bbae5c 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
|
| +++ b/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp
|
| @@ -96,7 +96,6 @@ BorderImageLength animatableValueToBorderImageLength(const AnimatableValue* valu
|
|
|
| template<typename T> T animatableValueClampTo(const AnimatableValue* value, T min = defaultMinimumForClamp<T>(), T max = defaultMaximumForClamp<T>())
|
| {
|
| - static_assert(std::is_integral<T>::value, "should use integral type T when rounding values");
|
| return clampTo<T>(roundForImpreciseConversion<T>(toAnimatableDouble(value)->toDouble()), min, max);
|
| }
|
|
|
| @@ -104,7 +103,7 @@ template<typename T> T animatableLineWidthClamp(const AnimatableValue* value)
|
| {
|
| double doubleValue = toAnimatableDouble(value)->toDouble();
|
| // This matches StyleBuilderConverter::convertLineWidth().
|
| - return (doubleValue > 0 && doubleValue < 1) ? 1 : animatableValueClampTo<T>(value);
|
| + return (doubleValue > 0 && doubleValue < 1) ? 1 : animatableValueClampTo<T>(value, 0);
|
| }
|
|
|
| LengthBox animatableValueToLengthBox(const AnimatableValue* value, const StyleResolverState& state, ValueRange range = ValueRangeAll)
|
| @@ -323,7 +322,7 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
|
| style->setBorderBottomRightRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
|
| return;
|
| case CSSPropertyBorderBottomWidth:
|
| - style->setBorderBottomWidth(animatableLineWidthClamp<unsigned>(value));
|
| + style->setBorderBottomWidth(animatableLineWidthClamp<float>(value));
|
| return;
|
| case CSSPropertyBorderImageOutset:
|
| style->setBorderImageOutset(animatableValueToBorderImageLengthBox(value, state));
|
| @@ -343,14 +342,14 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
|
| style->setVisitedLinkBorderLeftColor(toAnimatableColor(value)->visitedLinkColor());
|
| return;
|
| case CSSPropertyBorderLeftWidth:
|
| - style->setBorderLeftWidth(animatableLineWidthClamp<unsigned>(value));
|
| + style->setBorderLeftWidth(animatableLineWidthClamp<float>(value));
|
| return;
|
| case CSSPropertyBorderRightColor:
|
| style->setBorderRightColor(toAnimatableColor(value)->color());
|
| style->setVisitedLinkBorderRightColor(toAnimatableColor(value)->visitedLinkColor());
|
| return;
|
| case CSSPropertyBorderRightWidth:
|
| - style->setBorderRightWidth(animatableLineWidthClamp<unsigned>(value));
|
| + style->setBorderRightWidth(animatableLineWidthClamp<float>(value));
|
| return;
|
| case CSSPropertyBorderTopColor:
|
| style->setBorderTopColor(toAnimatableColor(value)->color());
|
| @@ -363,7 +362,7 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
|
| style->setBorderTopRightRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
|
| return;
|
| case CSSPropertyBorderTopWidth:
|
| - style->setBorderTopWidth(animatableLineWidthClamp<unsigned>(value));
|
| + style->setBorderTopWidth(animatableLineWidthClamp<float>(value));
|
| return;
|
| case CSSPropertyBottom:
|
| style->setBottom(animatableValueToLength(value, state));
|
|
|