Summary: | [LFC][FFC] Take align-self into account when computing flex item's logical height. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||||
Component: | Layout and Rendering | Assignee: | 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
zalan
2022-06-04 20:53:33 PDT
Created attachment 460035 [details]
Patch
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 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)) (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. Created attachment 460043 [details]
Patch
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]. |