Bug 199806

Summary: [Text autosizing] [iPadOS] Product label text is clipped in portrait mode on the front page of sephora.com
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: TextAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, mmaxfield, thorton, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
zalan: review+
Waiting for EWS
none
Actually add test expectation changes (oops) none

Description Wenson Hsieh 2019-07-15 14:05:26 PDT
<rdar://problem/52902482>
Comment 1 Wenson Hsieh 2019-07-15 16:40:41 PDT
Created attachment 374165 [details]
Patch
Comment 2 zalan 2019-07-15 16:49:30 PDT
Comment on attachment 374165 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=374165&action=review

> Source/WebCore/rendering/style/TextSizeAdjustment.cpp:56
> +        Length heightOrMaxHeightAsLength;

Optional<Length> instead of checking Length.isAuto() might reflect the logic better.

> Source/WebCore/rendering/style/TextSizeAdjustment.cpp:74
> +        return approximateNumberOfLines < 6 && approximateNumberOfLines - std::floor(approximateNumberOfLines) < 0.01;

Could you name the constant values please? It improves code readability (and works as comment too).
Comment 3 Wenson Hsieh 2019-07-15 16:53:05 PDT
Comment on attachment 374165 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=374165&action=review

>> Source/WebCore/rendering/style/TextSizeAdjustment.cpp:56
>> +        Length heightOrMaxHeightAsLength;
> 
> Optional<Length> instead of checking Length.isAuto() might reflect the logic better.

Good call! Will change to Optional<Length>

>> Source/WebCore/rendering/style/TextSizeAdjustment.cpp:74
>> +        return approximateNumberOfLines < 6 && approximateNumberOfLines - std::floor(approximateNumberOfLines) < 0.01;
> 
> Could you name the constant values please? It improves code readability (and works as comment too).

Sounds good — will name the constants and remove the big comment (or just make it smaller).
Comment 4 Wenson Hsieh 2019-07-15 17:07:41 PDT
Created attachment 374167 [details]
Waiting for EWS
Comment 5 Wenson Hsieh 2019-07-15 17:26:32 PDT
Created attachment 374170 [details]
Actually add test expectation changes (oops)
Comment 6 WebKit Commit Bot 2019-07-15 19:51:28 PDT
Comment on attachment 374170 [details]
Actually add test expectation changes (oops)

Clearing flags on attachment: 374170

Committed r247467: <https://trac.webkit.org/changeset/247467>
Comment 7 WebKit Commit Bot 2019-07-15 19:51:29 PDT
All reviewed patches have been landed.  Closing bug.