Bug 194328

Summary: [LFC][IFC] Move line layout code to a dedicated file
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, 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
Patch none

Description zalan 2019-02-05 20:37:31 PST
ssia
Comment 1 zalan 2019-02-05 20:41:41 PST
Created attachment 361271 [details]
Patch
Comment 2 zalan 2019-02-05 20:56:43 PST
Created attachment 361274 [details]
Patch
Comment 3 Antti Koivisto 2019-02-06 00:48:09 PST
Comment on attachment 361274 [details]
Patch

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

> Source/WebCore/Sources.txt:1346
> +layout/inlineformatting/InlineLineLayout.cpp

Since you are keeping LineLayout in InlineFormattingContext namespace you might also consider longer 'InlineFormattingContextLineLayout.cpp'.

Or just LineLayout.cpp, especially if the plan is to move it outside of the namespace.

> Source/WebCore/layout/inlineformatting/InlineFormattingContext.h:61
> +        class Line {
> +        public:
> +            void init(const LayoutPoint& topLeft, LayoutUnit availableWidth, LayoutUnit minimalHeight);
> +            void close();

LineLayout::Line seems like a line layout internal thing so, maybe you can also move its definition to the new cpp file. You can forward declare a nested class (class Line;) here and define it later

class LineLayout::Line {
public:
   ...

The same pattern might work for the LineLayout type itself too.
Comment 4 zalan 2019-02-06 07:52:20 PST
Created attachment 361295 [details]
Patch
Comment 5 WebKit Commit Bot 2019-02-06 09:04:50 PST
Comment on attachment 361295 [details]
Patch

Clearing flags on attachment: 361295

Committed r241023: <https://trac.webkit.org/changeset/241023>
Comment 6 WebKit Commit Bot 2019-02-06 09:04:51 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-02-06 09:15:49 PST
<rdar://problem/47851839>