Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h |
| diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h |
| index e404ef65c614cd2cb476a38b9f45699938cc5675..0f7707acfb889cdd7bd2c5a175950a2aaff5ff34 100644 |
| --- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h |
| +++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h |
| @@ -137,13 +137,15 @@ T StyleBuilderConverter::convertLineWidth(StyleResolverState& state, const CSSVa |
| if (valueID == CSSValueInvalid) { |
| // Any original result that was >= 1 should not be allowed to fall below 1. |
| // This keeps border lines from vanishing. |
| - T result = primitiveValue.computeLength<T>(state.cssToLengthConversionData()); |
| + double result = primitiveValue.computeLength<double>(state.cssToLengthConversionData()); |
| if (state.style()->effectiveZoom() < 1.0f && result < 1.0) { |
|
alancutter (OOO until 2018)
2015/10/27 04:10:32
Is this code path redundant now?
nainar
2015/10/27 05:30:18
Done.
|
| T originalLength = primitiveValue.computeLength<T>(state.cssToLengthConversionData().copyWithAdjustedZoom(1.0)); |
| if (originalLength >= 1.0) |
| return 1.0; |
| } |
| - return result; |
| + if (result > 0.0 && result < 1.0) |
| + return 1.0; |
| + return primitiveValue.computeLength<T>(state.cssToLengthConversionData()); |
|
alancutter (OOO until 2018)
2015/10/27 04:10:32
Can we just call clampTo<T>() instead of calling c
nainar
2015/10/27 05:30:18
Done.
|
| } |
| ASSERT_NOT_REACHED(); |
| return 0; |