[iOS] Regression(r176202): line-height is wrong on marco.org
https://bugs.webkit.org/show_bug.cgi?id=138970
Reviewed by Simon Fraser.
Source/WebCore:
After r176202, on iOS with IOS_TEXT_AUTOSIZING enabled, we would
multiply the lineHeight by RenderStyle::textSizeAdjust()::multiplier()
unconditionally. However, we're only supposed to do so if
RenderStyle::textSizeAdjust()::isPercentage() returns true. This
patch reintroduces the textSizeAdjust().isPercentage() check that was
inadvertently dropped when refactoring the code to be shared between
iOS and OS X.
Additionally, the multiplier is only supposed the be applied if the
input CSSPrimitiveValue is a Length or a Number. However, after
r176202, we would apply the multiplier if the CSSPrimitiveValue is
a Percentage or a Number. This patch updates the code to match the
behavior prior to r176202.
Test: fast/css/line-height-text-autosizing.html
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::convertLineHeight):
(WebCore::StyleBuilderFunctions::applyValueLineHeight):
LayoutTests:
Add layout test to cover line-height CSS property and its interaction
with -webkit-text-size-adjust.
* fast/css/line-height-text-autosizing-expected.txt: Added.
* fast/css/line-height-text-autosizing.html: Added.
* platform/ios-simulator/fast/css/line-height-text-autosizing-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176490
268f45cc-cd09-0410-ab3c-
d52691b4dbfc