Bug 204594 - [LFC][IFC] Use FontCascade::spaceWidth to measure single or collapsed whitespace content
Summary: [LFC][IFC] Use FontCascade::spaceWidth to measure single or collapsed whitesp...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-25 14:52 PST by zalan
Modified: 2019-11-25 16:28 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.06 KB, patch)
2019-11-25 14:54 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (3.06 KB, patch)
2019-11-25 15:44 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2019-11-25 14:52:49 PST
ssia
Comment 1 Radar WebKit Bug Importer 2019-11-25 14:53:13 PST
<rdar://problem/57478360>
Comment 2 zalan 2019-11-25 14:54:38 PST
Created attachment 384318 [details]
Patch
Comment 3 Antti Koivisto 2019-11-25 15:02:12 PST
Comment on attachment 384318 [details]
Patch

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

> Source/WebCore/layout/inlineformatting/InlineTextItem.cpp:118
> +            auto width = simpleSingleWhitespaceContent ? Optional<LayoutUnit>(LayoutUnit { font.spaceWidth() }) : inlineItemWidth(currentPosition, length);

Shorter:

makeOptional(LayoutUnit { font.spaceWidth() })
Comment 4 zalan 2019-11-25 15:44:20 PST
Created attachment 384319 [details]
Patch
Comment 5 WebKit Commit Bot 2019-11-25 16:28:25 PST
Comment on attachment 384319 [details]
Patch

Clearing flags on attachment: 384319

Committed r252869: <https://trac.webkit.org/changeset/252869>
Comment 6 WebKit Commit Bot 2019-11-25 16:28:27 PST
All reviewed patches have been landed.  Closing bug.