Changeset 219543 in webkit
- Timestamp:
- Jul 15, 2017 10:52:30 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r219536 r219543 1 2017-07-15 Myles C. Maxfield <mmaxfield@apple.com> 2 3 line-height: <number> gets visually applied twice when text autosizing is in effect 4 https://bugs.webkit.org/show_bug.cgi?id=174536 5 <rdar://problem/33338259> 6 7 Reviewed by Simon Fraser. 8 9 * fast/text-autosizing/line-height-number-expected.html: Added. 10 * fast/text-autosizing/line-height-number.html: Added. 11 1 12 2017-07-14 Zan Dobersek <zdobersek@igalia.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r219541 r219543 1 2017-07-15 Myles C. Maxfield <mmaxfield@apple.com> 2 3 line-height: <number> gets visually applied twice when text autosizing is in effect 4 https://bugs.webkit.org/show_bug.cgi?id=174536 5 <rdar://problem/33338259> 6 7 Reviewed by Simon Fraser. 8 9 StyleBuilderConverter::convertLineHeight() converts line-height: <number> into a 10 "percentage" length. Then, when layout needs to know what the computed value of 11 line-height is, RenderStyle::computedLineHeight() multiplies this percentage by 12 the computed font size. 13 14 With autosizing, the computed font size already incorporates the autosizing 15 multiplier, so we shouldn't also incorporate this multiplier into the percentage 16 value itself. getComputedStyle()'s lineHeightFromStyle() was compensating for 17 this double application by multiplying the percentage by the font-size's specified 18 value instead of its computed value, which is incorrect. 19 20 Test: fast/text-autosizing/line-height-number.html 21 22 * css/CSSComputedStyleDeclaration.cpp: 23 (WebCore::lineHeightFromStyle): 24 * css/StyleBuilderConverter.h: 25 (WebCore::StyleBuilderConverter::convertLineHeight): 26 1 27 2017-07-15 Wenson Hsieh <wenson_hsieh@apple.com> 2 28 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r219315 r219543 1972 1972 // On the other hand, since font-size doesn't include the zoom factor, we really can't do 1973 1973 // that here either. 1974 return zoomAdjustedPixelValue(static_cast<int>(length.percent() * style.fontDescription(). specifiedSize()) / 100, style);1974 return zoomAdjustedPixelValue(static_cast<int>(length.percent() * style.fontDescription().computedSize()) / 100, style); 1975 1975 } 1976 1976 return zoomAdjustedPixelValue(floatValueForLength(length, 0), style); -
trunk/Source/WebCore/css/StyleBuilderConverter.h
r219539 r219543 1447 1447 } 1448 1448 if (primitiveValue.isNumber()) 1449 return Length(primitiveValue.doubleValue() * multiplier *100.0, Percent);1449 return Length(primitiveValue.doubleValue() * 100.0, Percent); 1450 1450 1451 1451 // FIXME: The parser should only emit the above types, so this should never be reached. We should change the
Note: See TracChangeset
for help on using the changeset viewer.