Bug 216881 - [LFC][IFC] Precompute the collapsible trailing width for LineBreaker
Summary: [LFC][IFC] Precompute the collapsible trailing width for LineBreaker
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: 2020-09-23 08:29 PDT by zalan
Modified: 2020-09-23 12:35 PDT (History)
5 users (show)

See Also:


Attachments
Patch (14.31 KB, patch)
2020-09-23 08:37 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (14.22 KB, patch)
2020-09-23 12:02 PDT, 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 2020-09-23 08:29:34 PDT
instead of looping through the candidate runs in LineBreaker.
Comment 1 zalan 2020-09-23 08:37:31 PDT
Created attachment 409477 [details]
Patch
Comment 2 Antti Koivisto 2020-09-23 11:28:20 PDT
Comment on attachment 409477 [details]
Patch

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

> Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp:240
> +    if (isFullyCollapsible())
> +        m_collapsibleTrailingWidth += logicalWidth;
> +    else {

Can this early return avoiding the else branch?
Comment 3 zalan 2020-09-23 12:02:54 PDT
Created attachment 409493 [details]
Patch
Comment 4 zalan 2020-09-23 12:03:40 PDT
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 409477 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=409477&action=review
> 
> > Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp:240
> > +    if (isFullyCollapsible())
> > +        m_collapsibleTrailingWidth += logicalWidth;
> > +    else {
> 
> Can this early return avoiding the else branch?
absolutely!
Comment 5 EWS 2020-09-23 12:34:49 PDT
Committed r267494: <https://trac.webkit.org/changeset/267494>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409493 [details].
Comment 6 Radar WebKit Bug Importer 2020-09-23 12:35:19 PDT
<rdar://problem/69451507>