| Summary: | [LFC][FFC] FlexLayout should return a set of logical LayoutRects | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | zalan <zalan> | ||||
| Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bfulgham, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
zalan
2022-07-09 16:19:55 PDT
Created attachment 460779 [details]
Patch
Comment on attachment 460779 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=460779&action=review > COMMIT_MESSAGE:9 > +This patch decouples the input and the output types, where the incoming LogicalFlexItems only has width/height values, while layout() returns a list of rectangles. Noice > Source/WebCore/layout/formattingContexts/flex/FlexLayout.h:88 > + void computeLogicalWidthForFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > + void computeLogicalWidthForStretchingFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > + void computeLogicalWidthForShrinkingFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > + void computeLogicalHeightForFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > + void alignFlexItems(const LogicalFlexItems&, const LineRange&, VerticalConstraints, LogicalFlexItemRects&); > + void justifyFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); Is LogicalFlexItemRects not a return value for efficiency reasons? (In reply to Antti Koivisto from comment #2) > Comment on attachment 460779 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=460779&action=review > > > COMMIT_MESSAGE:9 > > +This patch decouples the input and the output types, where the incoming LogicalFlexItems only has width/height values, while layout() returns a list of rectangles. > > Noice > > > Source/WebCore/layout/formattingContexts/flex/FlexLayout.h:88 > > + void computeLogicalWidthForFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > > + void computeLogicalWidthForStretchingFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > > + void computeLogicalWidthForShrinkingFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > > + void computeLogicalHeightForFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > > + void alignFlexItems(const LogicalFlexItems&, const LineRange&, VerticalConstraints, LogicalFlexItemRects&); > > + void justifyFlexItems(const LogicalFlexItems&, const LineRange&, LayoutUnit availableSpace, LogicalFlexItemRects&); > > Is LogicalFlexItemRects not a return value for efficiency reasons? Yeah, that's the idea. Committed 252329@main (7aaa7ee9d522): <https://commits.webkit.org/252329@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 460779 [details]. |