1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

LibWeb: Flexbox: Make step 11 of the layout algorithm more align aware

This commit is contained in:
Tobias Christiansen 2021-09-15 19:00:15 +02:00 committed by Andreas Kling
parent 307f90b675
commit 67bf553fad

View file

@ -610,10 +610,10 @@ void FlexFormattingContext::run(Box& box, LayoutMode)
// FIXME: This
// 11. Determine the used cross size of each flex item.
// FIXME: align-stretch
// FIXME: Get the alignment via "align-self" of the item (which accesses "align-items" of the parent if unset)
for (auto& flex_line : flex_lines) {
for (auto& flex_item : flex_line.items) {
if (is_cross_auto(flex_item->box)) {
if (is_cross_auto(flex_item->box) && box.computed_values().align_items() == CSS::AlignItems::Stretch) {
// FIXME: Take margins into account
flex_item->cross_size = flex_line.cross_size;
} else {