Bug 218043 - [LFC][IFC] Apply font line-spacing to <br> inline level box
Summary: [LFC][IFC] Apply font line-spacing to <br> inline level box
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-10-21 11:55 PDT by zalan
Modified: 2020-10-21 14:22 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.73 KB, patch)
2020-10-21 12:10 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (5.05 KB, patch)
2020-10-21 13:18 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-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>