[webkit-reviews] review granted: [Bug 194328] [LFC][IFC] Move line layout code to a dedicated file : [Attachment 361274] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 6 00:48:09 PST 2019


Antti Koivisto <koivisto at iki.fi> has granted zalan <zalan at apple.com>'s request
for review:
Bug 194328: [LFC][IFC] Move line layout code to a dedicated file
https://bugs.webkit.org/show_bug.cgi?id=194328

Attachment 361274: Patch

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




--- Comment #3 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 361274
  --> https://bugs.webkit.org/attachment.cgi?id=361274
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.


More information about the webkit-reviews mailing list