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: Resolve inline-block percentage padding against 0, not infinity
When the containing block has an indefinite width, any descendants with a percentage size should resolve that against 0, not infinity. Fixes an assertion failure when loading https://www.gnu.org/
- Loading branch information
1 parent
5955a50
commit 3d83f67
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...k-and-inline/percentage-padding-on-inline-block-with-indefinite-containing-block-size.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,6 @@ | ||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline | ||
BlockContainer <html> at (0,0) content-size 800x33.46875 [BFC] children: not-inline | ||
BlockContainer <body> at (8,8) content-size 0x17.46875 children: inline | ||
line 0 width: 0, height: 17.46875, bottom: 17.46875, baseline: 13.53125 | ||
frag 0 from BlockContainer start: 0, length: 0, rect: [8,21 0x0] | ||
BlockContainer <div> at (8,21) content-size 0x0 inline-block [BFC] children: not-inline |
9 changes: 9 additions & 0 deletions
9
...-and-inline/percentage-padding-on-inline-block-with-indefinite-containing-block-size.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,9 @@ | ||
<!DOCTYPE html><style> | ||
body { | ||
width: max-content; | ||
} | ||
div { | ||
display: inline-block; | ||
padding-left: 8%; | ||
} | ||
</style><body><div> |
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