Changeset 247484 in webkit
- Timestamp:
- Jul 16, 2019 9:52:21 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247481 r247484 1 2019-07-16 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [Text autosizing] [iPadOS] Paragraph text on the front page of LinkedIn.com is not boosted 4 https://bugs.webkit.org/show_bug.cgi?id=199827 5 <rdar://problem/53152660> 6 7 Reviewed by Zalan Bujtas. 8 9 Add a new test case, inspired by paragraph text in a post on linkedin.com. This text should get autosized. 10 11 * fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates-expected.txt: 12 * fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html: 13 1 14 2019-07-16 Rob Buis <rbuis@igalia.com> 2 15 -
trunk/LayoutTests/fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates-expected.txt
r247467 r247484 35 35 Checking target18: 36 36 PASS result is 12 37 Checking target19: 38 PASS result is >= 13 37 39 PASS successfullyParsed is true 38 40 … … 57 59 Test 58 60 Test 61 Test -
trunk/LayoutTests/fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html
r247467 r247484 36 36 <span>Test</span> 37 37 </div> 38 <div style="background: green; line-height: 20px; max-height: 20px; font-size: 12px;" id="target19">Test</div> 38 39 <script> 39 40 let result; … … 78 79 check("target17", false); 79 80 check("target18", false); 81 check("target19", true); 80 82 </script> 81 83 <script src="../../../../resources/js-test-post.js"></script> -
trunk/Source/WebCore/ChangeLog
r247483 r247484 1 2019-07-16 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [Text autosizing] [iPadOS] Paragraph text on the front page of LinkedIn.com is not boosted 4 https://bugs.webkit.org/show_bug.cgi?id=199827 5 <rdar://problem/53152660> 6 7 Reviewed by Zalan Bujtas. 8 9 After r247467, we try to avoid boosting some text that might cause vertical overflow due to line height 10 increasing inside a container that expects a fixed integer number of lines. However, in the case of 11 linkedin.com, the line height specified is a fixed value of 26px, which greatly exceeds the specified font size 12 of 14px. In this case, it's safe to boost font size, since doing so would not affect the line height at all. 13 14 To handle this case, don't avoid text autosizing due to the "fixed number of lines" heuristic if the line height 15 is fixed, and is much larger than the font size. 16 17 Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html 18 19 * rendering/style/TextSizeAdjustment.cpp: 20 (WebCore::AutosizeStatus::updateStatus): 21 1 22 2019-07-16 Zalan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/rendering/style/TextSizeAdjustment.cpp
r247467 r247484 52 52 53 53 if (!style.lineHeight().isSpecified() || style.whiteSpace() == WhiteSpace::NoWrap) 54 return false; 55 56 const float maximumDifferenceBetweenFixedLineHeightAndFontSize = 6; 57 if (style.lineHeight().isFixed() && style.lineHeight().value() - style.fontDescription().specifiedSize() > maximumDifferenceBetweenFixedLineHeightAndFontSize) 54 58 return false; 55 59
Note: See TracChangeset
for help on using the changeset viewer.