forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Don't limit available space during early height for inline-flex
There was no need to set an available height constraint when doing early height calculation for inline-flex boxes. It created a situation where the flex containers could wrongly get zero height early, and then resolve percentages against zero instead of the real intrinsic size. Fixes SerenityOS#23942
- Loading branch information
1 parent
ccd16c8
commit eabba91
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
Tests/LibWeb/Layout/expected/flex/inline-flex-early-resolution-of-percentage-height.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline | ||
BlockContainer <html> at (0,0) content-size 800x216 [BFC] children: inline | ||
frag 0 from Box start: 0, length: 0, rect: [8,8 200x200] baseline: 13.296875 | ||
Box <body> at (8,8) content-size 200x200 flex-container(row) [FFC] children: not-inline | ||
BlockContainer <div> at (8,8) content-size 200x200 flex-item [BFC] children: inline | ||
frag 0 from TextNode start: 0, length: 5, rect: [8,8 36.84375x17] baseline: 13.296875 | ||
"hello" | ||
TextNode <#text> | ||
|
||
ViewportPaintable (Viewport<#document>) [0,0 800x600] | ||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x216] | ||
PaintableBox (Box<BODY>) [8,8 200x200] | ||
PaintableWithLines (BlockContainer<DIV>) [8,8 200x200] | ||
TextPaintable (TextNode<#text>) |
14 changes: 14 additions & 0 deletions
14
Tests/LibWeb/Layout/input/flex/inline-flex-early-resolution-of-percentage-height.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!doctype html><style> | ||
* { outline: 1px solid black; } | ||
html { background: white; } | ||
body { | ||
display: inline-flex; | ||
background: orange; | ||
height: 100%; | ||
} | ||
div { | ||
background: magenta; | ||
height: 200px; | ||
width: 200px; | ||
} | ||
</style><body><div>hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters