Skip to content

Commit 38a6b7a

Browse files
committed
LibWeb: Don't assert when flex-item has align-self: end
We were missing the code to convert this to `align-items: end`.
1 parent 55c1d8b commit 38a6b7a

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
2+
BlockContainer <html> at (0,0) content-size 800x16 [BFC] children: not-inline
3+
Box <body> at (8,8) content-size 784x0 flex-container(row) [FFC] children: not-inline
4+
BlockContainer <div> at (8,8) content-size 0x0 flex-item [BFC] children: not-inline
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!doctype html><style>
2+
body { display: flex; }
3+
div { align-self: end; }
4+
</style><div>

Userland/Libraries/LibWeb/Layout/FlexFormattingContext.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,6 +1447,8 @@ CSS::AlignItems FlexFormattingContext::alignment_for_item(Box const& box) const
14471447
switch (box.computed_values().align_self()) {
14481448
case CSS::AlignSelf::Auto:
14491449
return flex_container().computed_values().align_items();
1450+
case CSS::AlignSelf::End:
1451+
return CSS::AlignItems::End;
14501452
case CSS::AlignSelf::Normal:
14511453
return CSS::AlignItems::Normal;
14521454
case CSS::AlignSelf::SelfStart:

0 commit comments

Comments
 (0)