Bug 241314 - [LFC][FFC] Take align-self into account when computing flex item's logical height.
Summary: [LFC][FFC] Take align-self into account when computing flex item's logical he...
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: 2022-06-04 20:53 PDT by zalan
Modified: 2022-06-06 00:54 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.84 KB, patch)
2022-06-04 20:56 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (1.84 KB, patch)
2022-06-05 21:29 PDT, zalan
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2022-06-04 20:53:33 PDT
ssia
Comment 1 zalan 2022-06-04 20:56:17 PDT
Created attachment 460035 [details]
Patch
Comment 2 Tim Nguyen (:ntim) 2022-06-05 17:58:52 PDT
Comment on attachment 460035 [details]
Patch

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

> COMMIT_MESSAGE:1
> +[LFC][FFC] Take align-itself into account when computing flex item's logical height. 

nit: align-self not itself :)
Comment 3 Tim Nguyen (:ntim) 2022-06-05 18:01:55 PDT
Comment on attachment 460035 [details]
Patch

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

> Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp:275
> +        auto& flexItemAlignSelf = flexItem.style().alignSelf();
> +        auto alignValue = flexItemAlignSelf.position() != ItemPosition::Auto ? flexItemAlignSelf : flexBoxAlignItems;
> +        switch (alignValue.position()) {

Also, not sure you want to use them, but there's actually helper functions in RenderStyle: https://webkit-search.igalia.com/webkit/rev/572c4442ee7f1dc075302d3b9855403acd5fd651/Source/WebCore/rendering/style/RenderStyle.cpp#272-279 (RenderStyle::resolvedAlignSelf(const RenderStyle* parentStyle, ItemPosition normalValueBehaviour))
Comment 4 zalan 2022-06-05 19:29:37 PDT
(In reply to Tim Nguyen (:ntim) from comment #3)
> Comment on attachment 460035 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=460035&action=review
> 
> > Source/WebCore/layout/formattingContexts/flex/FlexLayout.cpp:275
> > +        auto& flexItemAlignSelf = flexItem.style().alignSelf();
> > +        auto alignValue = flexItemAlignSelf.position() != ItemPosition::Auto ? flexItemAlignSelf : flexBoxAlignItems;
> > +        switch (alignValue.position()) {
> 
> Also, not sure you want to use them, but there's actually helper functions
> in RenderStyle:
> https://webkit-search.igalia.com/webkit/rev/
> 572c4442ee7f1dc075302d3b9855403acd5fd651/Source/WebCore/rendering/style/
> RenderStyle.cpp#272-279 (RenderStyle::resolvedAlignSelf(const RenderStyle*
> parentStyle, ItemPosition normalValueBehaviour))
We are planning on removing all these from style. They don't belong in there.
Comment 5 zalan 2022-06-05 21:29:05 PDT
Created attachment 460043 [details]
Patch
Comment 6 EWS 2022-06-05 22:20:20 PDT
Committed r295277 (251323@main): <https://commits.webkit.org/251323@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460043 [details].
Comment 7 Radar WebKit Bug Importer 2022-06-05 22:21:15 PDT
<rdar://problem/94418719>