Bug 194328 - [LFC][IFC] Move line layout code to a dedicated file
Summary: [LFC][IFC] Move line layout code to a dedicated file
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: 2019-02-05 20:37 PST by zalan
Modified: 2019-02-06 09:15 PST (History)
6 users (show)

See Also:


Attachments
Patch (36.95 KB, patch)
2019-02-05 20:41 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (56.85 KB, patch)
2019-02-05 20:56 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (64.75 KB, patch)
2019-02-06 07:52 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 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>