Bug 206861 - [LFC][IFC] Decouple Display::LineBox and Layout::LineBoxBuilder
Summary: [LFC][IFC] Decouple Display::LineBox and Layout::LineBoxBuilder
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-01-27 21:15 PST by zalan
Modified: 2020-01-28 10:26 PST (History)
6 users (show)

See Also:


Attachments
Patch (47.74 KB, patch)
2020-01-27 21:18 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (45.58 KB, patch)
2020-01-28 07:30 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (45.84 KB, patch)
2020-01-28 08:51 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (45.85 KB, patch)
2020-01-28 08:51 PST, 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-01-27 21:15:59 PST
ssia
Comment 1 Radar WebKit Bug Importer 2020-01-27 21:16:21 PST
<rdar://problem/58945284>
Comment 2 zalan 2020-01-27 21:18:55 PST
Created attachment 388964 [details]
Patch
Comment 3 zalan 2020-01-28 07:30:04 PST
Created attachment 388991 [details]
Patch
Comment 4 Antti Koivisto 2020-01-28 08:18:28 PST
Comment on attachment 388991 [details]
Patch

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

> Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp:544
> +    inlineContent.lineBoxes.append(Display::LineBox { lineBox.logicalRect(), lineBox.scrollableOverflow(), lineInkOverflow, { baseline.ascent(), baseline.descent() }, lineBox.baselineOffset(), lineBox.isConsideredEmpty() });

Could have some sort of helper for the conversion.

Type name Display::LineBox is probably not needed.

> Source/WebCore/layout/inlineformatting/InlineLineBox.h:36
> +namespace Layout {
> +
> +class LineBox {

Could this be like LineBoxBuilder or something?
Comment 5 zalan 2020-01-28 08:43:56 PST
(In reply to Antti Koivisto from comment #4)
> Comment on attachment 388991 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=388991&action=review
> 
> > Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp:544
> > +    inlineContent.lineBoxes.append(Display::LineBox { lineBox.logicalRect(), lineBox.scrollableOverflow(), lineInkOverflow, { baseline.ascent(), baseline.descent() }, lineBox.baselineOffset(), lineBox.isConsideredEmpty() });
> 
> Could have some sort of helper for the conversion.
This will eventually turn into a logical -> physical conversion (horizontal flip/vertical transform). I am not yet sure the exact setup for this so I prefer to not do it in this patch.  

> 
> Type name Display::LineBox is probably not needed.
> 
> > Source/WebCore/layout/inlineformatting/InlineLineBox.h:36
> > +namespace Layout {
> > +
> > +class LineBox {
> 
> Could this be like LineBoxBuilder or something?
Sure.
Comment 6 zalan 2020-01-28 08:51:04 PST
Created attachment 389007 [details]
Patch
Comment 7 zalan 2020-01-28 08:51:57 PST
Created attachment 389009 [details]
Patch
Comment 8 WebKit Commit Bot 2020-01-28 10:26:07 PST
Comment on attachment 389009 [details]
Patch

Clearing flags on attachment: 389009

Committed r255257: <https://trac.webkit.org/changeset/255257>
Comment 9 WebKit Commit Bot 2020-01-28 10:26:09 PST
All reviewed patches have been landed.  Closing bug.