Changeset 176490 in webkit
- Timestamp:
- Nov 21, 2014, 5:22:41 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css/line-height-text-autosizing-expected.txt (added)
-
LayoutTests/fast/css/line-height-text-autosizing.html (added)
-
LayoutTests/platform/ios-simulator/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/ios-simulator/fast/css/line-height-text-autosizing-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/StyleBuilderCustom.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r176481 r176490 1 2014-11-21 Chris Dumez <cdumez@apple.com> 2 3 [iOS] Regression(r176202): line-height is wrong on marco.org 4 https://bugs.webkit.org/show_bug.cgi?id=138970 5 6 Reviewed by Simon Fraser. 7 8 Add layout test to cover line-height CSS property and its interaction 9 with -webkit-text-size-adjust. 10 11 * fast/css/line-height-text-autosizing-expected.txt: Added. 12 * fast/css/line-height-text-autosizing.html: Added. 13 * platform/ios-simulator/fast/css/line-height-text-autosizing-expected.txt: Added. 14 1 15 2014-11-21 Chris Fleizach <cfleizach@apple.com> 2 16 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r176433 r176490 152 152 userscripts 153 153 webarchive 154 155 ### 156 # Mark as passing specific tests in folders that were skipped temporarily above. 157 ## 158 webkit.org/b/138970 fast/css/line-height-text-autosizing.html [ Pass ] -
trunk/Source/WebCore/ChangeLog
r176484 r176490 1 2014-11-21 Chris Dumez <cdumez@apple.com> 2 3 [iOS] Regression(r176202): line-height is wrong on marco.org 4 https://bugs.webkit.org/show_bug.cgi?id=138970 5 6 Reviewed by Simon Fraser. 7 8 After r176202, on iOS with IOS_TEXT_AUTOSIZING enabled, we would 9 multiply the lineHeight by RenderStyle::textSizeAdjust()::multiplier() 10 unconditionally. However, we're only supposed to do so if 11 RenderStyle::textSizeAdjust()::isPercentage() returns true. This 12 patch reintroduces the textSizeAdjust().isPercentage() check that was 13 inadvertently dropped when refactoring the code to be shared between 14 iOS and OS X. 15 16 Additionally, the multiplier is only supposed the be applied if the 17 input CSSPrimitiveValue is a Length or a Number. However, after 18 r176202, we would apply the multiplier if the CSSPrimitiveValue is 19 a Percentage or a Number. This patch updates the code to match the 20 behavior prior to r176202. 21 22 Test: fast/css/line-height-text-autosizing.html 23 24 * css/StyleBuilderCustom.h: 25 (WebCore::StyleBuilderFunctions::convertLineHeight): 26 (WebCore::StyleBuilderFunctions::applyValueLineHeight): 27 1 28 2014-11-21 Chris Fleizach <cfleizach@apple.com> 2 29 -
trunk/Source/WebCore/css/StyleBuilderCustom.h
r176383 r176490 522 522 if (primitiveValue.isLength()) { 523 523 length = primitiveValue.computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(styleResolver)); 524 if (multiplier != 1.f) 525 length = Length(length.value() * multiplier, Fixed); 524 526 return true; 525 527 } 526 528 if (primitiveValue.isPercentage()) { 527 529 // FIXME: percentage should not be restricted to an integer here. 528 length = Length((styleResolver.style()->computedFontSize() * primitiveValue.getIntValue()) * multiplier/ 100, Fixed);530 length = Length((styleResolver.style()->computedFontSize() * primitiveValue.getIntValue()) / 100, Fixed); 529 531 return true; 530 532 } … … 572 574 { 573 575 Length lineHeight; 574 if (!convertLineHeight(styleResolver, value, lineHeight, styleResolver.style()->textSizeAdjust().multiplier())) 576 float multiplier = styleResolver.style()->textSizeAdjust().isPercentage() ? styleResolver.style()->textSizeAdjust().multiplier() : 1.f; 577 if (!convertLineHeight(styleResolver, value, lineHeight, multiplier)) 575 578 return; 576 579
Note:
See TracChangeset
for help on using the changeset viewer.