Bug 218043

Summary: [LFC][IFC] Apply font line-spacing to <br> inline level box
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-10-21 11:55:51 PDT
ssia
Comment 1 zalan 2020-10-21 12:10:39 PDT
Created attachment 412014 [details]
Patch
Comment 2 Antti Koivisto 2020-10-21 12:20:41 PDT
Comment on attachment 412014 [details]
Patch

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

> Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp:183
> +        auto lineSpacing = isRootInlineBox(inlineLevelBox) || inlineLevelBox.isLineBreakBox() ? fontMetrics.lineSpacing() - logicalHeight : InlineLayoutUnit();

I usually put parenthesis around this sort of things `(a || b) ? :` since it can be difficult to parse otherwise (or just put the condition to a temporary).
Comment 3 zalan 2020-10-21 12:25:18 PDT
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 412014 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=412014&action=review
> 
> > Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp:183
> > +        auto lineSpacing = isRootInlineBox(inlineLevelBox) || inlineLevelBox.isLineBreakBox() ? fontMetrics.lineSpacing() - logicalHeight : InlineLayoutUnit();
> 
> I usually put parenthesis around this sort of things `(a || b) ? :` since it
> can be difficult to parse otherwise (or just put the condition to a
> temporary).
good point. will fix.
Comment 4 zalan 2020-10-21 13:18:51 PDT
Created attachment 412021 [details]
Patch
Comment 5 EWS 2020-10-21 14:21:26 PDT
Committed r268823: <https://trac.webkit.org/changeset/268823>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412021 [details].
Comment 6 Radar WebKit Bug Importer 2020-10-21 14:22:19 PDT
<rdar://problem/70545083>