Bug 247081

Summary: Top scoreboard of espn.com cutting off team names
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, karlcow, koivisto, ldebeasi, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description zalan 2022-10-26 11:54:26 PDT
<rdar://101519984>
Comment 1 zalan 2022-10-26 11:55:56 PDT
Created attachment 463261 [details]
Patch
Comment 2 Antti Koivisto 2022-10-26 12:01:15 PDT
Comment on attachment 463261 [details]
Patch

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

> Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:585
> -        if (!lineHasOverflow || isInIntrinsicWidthMode)
> +        auto lineHasOverflowAfterTrimmingTrailingContent = horizontalAvailableSpace < m_line.contentLogicalWidth();
> +        if (!lineHasOverflowAfterTrimmingTrailingContent || isInIntrinsicWidthMode)

Maybe this function should be refactored a bit, for example split into before-trimming and after-trimming parts? It is kinda confusing there is a lineHasOverflow variable in the scope that has incorrect value.
Comment 3 zalan 2022-10-26 12:04:05 PDT
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 463261 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=463261&action=review
> 
> > Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:585
> > -        if (!lineHasOverflow || isInIntrinsicWidthMode)
> > +        auto lineHasOverflowAfterTrimmingTrailingContent = horizontalAvailableSpace < m_line.contentLogicalWidth();
> > +        if (!lineHasOverflowAfterTrimmingTrailingContent || isInIntrinsicWidthMode)
> 
> Maybe this function should be refactored a bit, for example split into
> before-trimming and after-trimming parts? It is kinda confusing there is a
> lineHasOverflow variable in the scope that has incorrect value.
yeah I agree, it should be scoped.
Comment 4 zalan 2022-10-26 12:12:24 PDT
Created attachment 463262 [details]
Patch
Comment 5 zalan 2022-10-26 14:26:34 PDT
Created attachment 463264 [details]
Patch
Comment 6 EWS 2022-10-26 19:58:48 PDT
Committed 256045@main (fc54f33c5cd4): <https://commits.webkit.org/256045@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 463264 [details].
Comment 7 Radar WebKit Bug Importer 2022-10-26 19:59:19 PDT
<rdar://problem/101616260>
Comment 8 zalan 2022-12-07 20:01:05 PST
*** Bug 248877 has been marked as a duplicate of this bug. ***