Bug 241314

Summary: [LFC][FFC] Take align-self into account when computing flex item's logical height.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, koivisto, ntim, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch ews-feeder: commit-queue-

zalan
Reported 2022-06-04 20:53:33 PDT
ssia
Attachments
Patch (1.84 KB, patch)
2022-06-04 20:56 PDT, zalan
no flags
Patch (1.84 KB, patch)
2022-06-05 21:29 PDT, zalan
ews-feeder: commit-queue-
zalan
Comment 1 2022-06-04 20:56:17 PDT
Tim Nguyen (:ntim)
Comment 2 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 :)
Tim Nguyen (:ntim)
Comment 3 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))
zalan
Comment 4 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.
zalan
Comment 5 2022-06-05 21:29:05 PDT
EWS
Comment 6 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].
Radar WebKit Bug Importer
Comment 7 2022-06-05 22:21:15 PDT
Note You need to log in before you can comment on or make changes to this bug.