Split line layout into two phases (#30089)

In the first phase, we gather LineItems and then when we have enough to
form a line we turn them into Fragments. This will make it possible to
more simply implement `vertical-align` and `text-align: justify` because
we need to measure the different aspects of the candidate line and then
produce a Fragments.

This is a general refactor of the way that inline layout works, so comes
with some progressions. In addition there are some new failures.

New failures:

Some tests are now failing because only the test or reference is getting
proper line height when it wasn't before. These should be fixed in a
followup change that properly calculate line-height in more cases:

 - /_mozilla/css/list_style_position_a.html
 - /css/CSS2/floats/float-no-content-beside-001.html
 - /css/css-content/pseudo-element-inline-box.html
 - /css/css-flexbox/flexbox_flex-none-wrappable-content.html

Some tests are now failing because floats are now placed properly, but
are no longer in their inline box stacking contexts. These will be fixed
by a followup change which properly parents them:

- /css/filter-effects/filtered-inline-applies-to-float.html.ini
- /css/css-color/inline-opacity-float-child.html.ini

One test is failing due to floating point precision errors:

- /css/CSS2/floats-clear/floats-141.xht.ini

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
Martin Robinson 2023-08-11 09:19:50 +02:00 committed by GitHub
parent 450f8193a5
commit 59f5414ca8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 791 additions and 659 deletions

View file

@ -1,2 +0,0 @@
[remove-block-between-inline-and-abspos.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[block-in-inline-007.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[floats-141.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[float-no-content-beside-001.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[float-nowrap-4.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[floats-placement-vertical-001b.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[floats-placement-vertical-001c.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[block-non-replaced-width-007.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[text-indent-on-blank-line-rtl-left-align.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[white-space-008.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[white-space-normal-007.xht]
expected: FAIL

View file

@ -1,2 +0,0 @@
[stack-floats-003.xht]
expected: FAIL

View file

@ -0,0 +1,2 @@
[inline-opacity-float-child.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[pseudo-element-inline-box.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[flexbox_flex-none-wrappable-content.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[position-relative-003.html]
expected: TIMEOUT

View file

@ -1,2 +0,0 @@
[position-relative-004.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[filtered-inline-applies-to-float.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[input_whitespace.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[list_style_position_a.html]
expected: FAIL