Bug 199806 - [Text autosizing] [iPadOS] Product label text is clipped in portrait mode on the front page of sephora.com
Summary: [Text autosizing] [iPadOS] Product label text is clipped in portrait mode on ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-15 14:05 PDT by Wenson Hsieh
Modified: 2019-07-15 19:51 PDT (History)
6 users (show)

See Also:


Attachments
Patch (7.35 KB, patch)
2019-07-15 16:40 PDT, Wenson Hsieh
zalan: review+
Details | Formatted Diff | Diff
Waiting for EWS (7.31 KB, patch)
2019-07-15 17:07 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Actually add test expectation changes (oops) (8.15 KB, patch)
2019-07-15 17:26 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.