| 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..d20a4abcb1487cd7f85366140ba1143a490f8111 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h
|
| +++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h
|
| @@ -135,15 +135,15 @@ T StyleBuilderConverter::convertLineWidth(StyleResolverState& state, const CSSVa
|
| if (valueID == CSSValueThick)
|
| return 5;
|
| 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());
|
| - if (state.style()->effectiveZoom() < 1.0f && result < 1.0) {
|
| - T originalLength = primitiveValue.computeLength<T>(state.cssToLengthConversionData().copyWithAdjustedZoom(1.0));
|
| - if (originalLength >= 1.0)
|
| - return 1.0;
|
| - }
|
| - return result;
|
| + // FIXME: We are moving to use the full page zoom implementation to handle high-dpi.
|
| + // In that case specyfing a border-width of less than 1px would result in a border that is one device pixel thick.
|
| + // With this change that would instead be rounded up to 2 device pixels.
|
| + // Consider clamping it to device pixels or zoom adjusted CSS pixels instead of raw CSS pixels.
|
| + // Reference crbug.com/485650 and crbug.com/382483
|
| + double result = primitiveValue.computeLength<double>(state.cssToLengthConversionData());
|
| + if (result > 0.0 && result < 1.0)
|
| + return 1.0;
|
| + return clampTo<T>(roundForImpreciseConversion<T>(result), defaultMinimumForClamp<T>(), defaultMaximumForClamp<T>());
|
| }
|
| ASSERT_NOT_REACHED();
|
| return 0;
|
|
|