layout: Ensure empty list items are at least as tall as outside markers (#32152)

While <https://drafts.csswg.org/css-lists/#list-style-position-property> says:

> The size or contents of the marker box may affect the height of the
> principal block box and/or the height of its first line box, and in some
> cases may cause the creation of a new line box; this interaction is also
> not defined.

All other browsers ensure that the first line of list item content is
the same block size as the marker. Doing this is complicated, but we can
ensure that the entire list item is at least as tall as the marker. This
should handle the majority of cases and we can make refinements later
for stranger situations, such as when the marker is very tall.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-04-29 18:58:14 +02:00 committed by GitHub
parent adcaf2e881
commit f68a2e7743
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 93 additions and 30 deletions

View file

@ -1,2 +0,0 @@
[list-style-applies-to-012.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[list-style-applies-to-014.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[list-style-type-applies-to-012.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[list-style-type-applies-to-014.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[padding-left-applies-to-010.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[text-indent-applies-to-003.xht]
expected: FAIL

View file

@ -29,5 +29,20 @@
[.test 16: space-around]
expected: FAIL
[.test 17: normal]
[.test 1: start]
expected: FAIL
[.test 4: baseline]
expected: FAIL
[.test 6: flex-start]
expected: FAIL
[.test 8: unsafe start]
expected: FAIL
[.test 11: safe start]
expected: FAIL
[.test 15: space-between]
expected: FAIL

View file

@ -1,3 +0,0 @@
[list-and-margin-collapse-001.html]
[list and margin collapse]
expected: FAIL

View file

@ -1,2 +0,0 @@
[list-marker-alignment.html]
expected: FAIL

View file

@ -46,3 +46,6 @@
[display: table-caption]
expected: FAIL
[display: list-item]
expected: FAIL