Bug 216881

Summary: [LFC][IFC] Precompute the collapsible trailing width for LineBreaker
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>