Repository: servo/servo (language: python)

Issue:
Alignment should affect size of absolutely positioned element
```html
<!DOCTYPE html>
<style>
.wrapper { display: inline-block; position: relative; width: 100px; height: 100px; border: 3px solid; }
.abspos { position: absolute; inset: 0; width: auto; height: auto; background: cyan; }
.abspos::before { content: ""; display: block; width: 50px; height: 50px; }
</style>
<div class="wrapper"><div class="abspos" style="place-self: normal"></div></div>
<div class="wrapper"><div class="abspos" style="place-self: stretch"></div></div>
<div class="wrapper"><div class="abspos" style="place-self: center"></div></div>
<br>
<div class="wrapper"><canvas width="50" height="50" class="abspos" style="place-self: normal"></canvas></div>
<div class="wrapper"><canvas width="50" height="50" class="abspos" style="place-self: stretch"></canvas></div>
<div class="wrapper"><canvas width="50" height="50" class="abspos" style="place-self: center"></canvas></div>
```

| Servo (bad) | Blink (good) |
| - | - |
| ![](https://github.com/user-attachments/assets/b65106d2-2bde-45cf-ba43-12a9f96e79c6) | ![](https://github.com/user-attachments/assets/04d5d62c-14cb-41db-8dec-caeb284cfc62) |

The replaced and non-replaced cases can be addressed in different PRs.

The non-replaced case (1st row in testcase) seems simple, currently it always stretches because of https://github.com/servo/servo/blob/3fd1a229df65406699c5795cf504948cdb314320/components/layout_2020/positioned.rs#L849

It should use `Size::FitContent` when the alignment isn't `normal` or `stretch`.


Discussion / hints:
i'd like to try this!

Fix patch:
diff --git a/components/layout_2020/positioned.rs b/components/layout_2020/positioned.rs
index 7219463691487..5a85733a60363 100644
--- a/components/layout_2020/positioned.rs
+++ b/components/layout_2020/positioned.rs
@@ -846,10 +846,16 @@ impl<'a> AbsoluteAxisSolver<'a> {
                 let stretch_size = free_space -
                     self.computed_margin_start.auto_is(Au::zero) -
                     self.computed_margin_end.auto_is(Au::zero);
-                let used_size = solve_size(Size::Stretch, stretch_size)
-                    .to_definite()
-                    .unwrap();
-                free_space -= used_size;
+                let initial_behavior = match self.alignment.value() {
+                    AlignFlags::STRETCH | AlignFlags::NORMAL | AlignFlags::AUTO => Size::Stretch,
+                    _ => Size::FitContent,
+                };
+                let size = solve_size(initial_behavior, stretch_size);
+                if let Some(used_size) = size.to_definite() {
+                    free_space -= used_size;
+                } else {
+                    free_space = Au::zero();
+                }
                 let (margin_start, margin_end) =
                     match (self.computed_margin_start, self.computed_margin_end) {
                         (AuOrAuto::Auto, AuOrAuto::Auto) => {
@@ -872,7 +878,7 @@ impl<'a> AbsoluteAxisSolver<'a> {
                     };
                 AxisResult {
                     anchor: Anchor::Start(start),
-                    size: SizeConstraint::Definite(used_size),
+                    size,
                     margin_start,
                     margin_end,
                 }


Test patch:
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-ltr-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-ltr-htb.html.ini
index 026c19a077e2f..c0fe672ead9da 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-ltr-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-ltr-htb.html.ini
@@ -1,36 +1,18 @@
 [align-self-default-overflow-htb-ltr-htb.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
   [.item 3]
     expected: FAIL
 
   [.item 4]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
-  [.item 6]
-    expected: FAIL
-
-  [.item 8]
-    expected: FAIL
-
-  [.item 9]
-    expected: FAIL
-
   [.item 10]
     expected: FAIL
 
   [.item 11]
     expected: FAIL
 
-  [.item 12]
+  [.item 7]
     expected: FAIL
 
-  [.item 13]
+  [.item 14]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-ltr-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-ltr-vrl.html.ini
index 8b004f7f0a24b..81b81c44162ef 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-ltr-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-ltr-vrl.html.ini
@@ -1,36 +1,18 @@
 [align-self-default-overflow-htb-ltr-vrl.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
   [.item 3]
     expected: FAIL
 
   [.item 4]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
-  [.item 6]
-    expected: FAIL
-
-  [.item 8]
-    expected: FAIL
-
-  [.item 9]
-    expected: FAIL
-
   [.item 10]
     expected: FAIL
 
   [.item 11]
     expected: FAIL
 
-  [.item 12]
+  [.item 7]
     expected: FAIL
 
-  [.item 13]
+  [.item 14]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-rtl-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-rtl-htb.html.ini
index 1dbdfb7753c86..5727102ad2d49 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-rtl-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-rtl-htb.html.ini
@@ -1,36 +1,18 @@
 [align-self-default-overflow-htb-rtl-htb.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
   [.item 3]
     expected: FAIL
 
   [.item 4]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
-  [.item 6]
-    expected: FAIL
-
-  [.item 8]
-    expected: FAIL
-
-  [.item 9]
-    expected: FAIL
-
   [.item 10]
     expected: FAIL
 
   [.item 11]
     expected: FAIL
 
-  [.item 12]
+  [.item 7]
     expected: FAIL
 
-  [.item 13]
+  [.item 14]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-rtl-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-rtl-vrl.html.ini
index d550388774c60..83fa308ea19ee 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-rtl-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-default-overflow-htb-rtl-vrl.html.ini
@@ -1,36 +1,18 @@
 [align-self-default-overflow-htb-rtl-vrl.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
   [.item 3]
     expected: FAIL
 
   [.item 4]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
-  [.item 6]
-    expected: FAIL
-
-  [.item 8]
-    expected: FAIL
-
-  [.item 9]
-    expected: FAIL
-
   [.item 10]
     expected: FAIL
 
   [.item 11]
     expected: FAIL
 
-  [.item 12]
+  [.item 7]
     expected: FAIL
 
-  [.item 13]
+  [.item 14]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-htb.html.ini
index de75e0bf554cc..9e71a6e7b4fba 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-htb.html.ini
@@ -1,42 +1,12 @@
 [align-self-htb-ltr-htb.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 10]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
   [.item 13]
     expected: FAIL
 
-  [.item 14]
-    expected: FAIL
-
   [.item 15]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-vlr.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-vlr.html.ini
index bd90de9b2d8ec..2e97d601891a9 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-vlr.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-vlr.html.ini
@@ -1,42 +1,12 @@
 [align-self-htb-ltr-vlr.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 10]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
   [.item 13]
     expected: FAIL
 
   [.item 14]
     expected: FAIL
-
-  [.item 15]
-    expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-vrl.html.ini
index e55263690e974..c00f13125fdf5 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-htb-ltr-vrl.html.ini
@@ -1,42 +1,12 @@
 [align-self-htb-ltr-vrl.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 10]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
   [.item 13]
     expected: FAIL
 
   [.item 14]
     expected: FAIL
-
-  [.item 15]
-    expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-htb.html.ini
index 9e6472eba9202..d77f51252992c 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-htb.html.ini
@@ -1,42 +1,12 @@
 [align-self-htb-rtl-htb.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 10]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
   [.item 13]
     expected: FAIL
 
-  [.item 14]
-    expected: FAIL
-
   [.item 15]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-vlr.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-vlr.html.ini
index d46f5235c8fd4..65c11d01926f2 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-vlr.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-vlr.html.ini
@@ -1,42 +1,12 @@
 [align-self-htb-rtl-vlr.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 10]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
   [.item 13]
     expected: FAIL
 
   [.item 14]
     expected: FAIL
-
-  [.item 15]
-    expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-vrl.html.ini
index 7e6457a2f4c68..17e8b81059c33 100644
--- a/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/align-self-htb-rtl-vrl.html.ini
@@ -1,42 +1,12 @@
 [align-self-htb-rtl-vrl.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 10]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
   [.item 13]
     expected: FAIL
 
   [.item 14]
     expected: FAIL
-
-  [.item 15]
-    expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-ltr-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-ltr-htb.html.ini
index 578f39ad3eea7..95c69362bfd85 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-ltr-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-ltr-htb.html.ini
@@ -1,36 +1,18 @@
 [justify-self-default-overflow-htb-ltr-htb.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
   [.item 3]
     expected: FAIL
 
   [.item 4]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
-  [.item 6]
-    expected: FAIL
-
-  [.item 8]
-    expected: FAIL
-
-  [.item 9]
-    expected: FAIL
-
   [.item 10]
     expected: FAIL
 
   [.item 11]
     expected: FAIL
 
-  [.item 12]
+  [.item 7]
     expected: FAIL
 
-  [.item 13]
+  [.item 14]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-ltr-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-ltr-vrl.html.ini
index 762df281eb956..0424d4dd72067 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-ltr-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-ltr-vrl.html.ini
@@ -1,36 +1,18 @@
 [justify-self-default-overflow-htb-ltr-vrl.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
   [.item 3]
     expected: FAIL
 
   [.item 4]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
-  [.item 6]
-    expected: FAIL
-
-  [.item 8]
-    expected: FAIL
-
-  [.item 9]
-    expected: FAIL
-
   [.item 10]
     expected: FAIL
 
   [.item 11]
     expected: FAIL
 
-  [.item 12]
+  [.item 7]
     expected: FAIL
 
-  [.item 13]
+  [.item 14]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-rtl-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-rtl-htb.html.ini
index adde60d71df82..db406d6cbfcb7 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-rtl-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-rtl-htb.html.ini
@@ -1,42 +1,18 @@
 [justify-self-default-overflow-htb-rtl-htb.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
   [.item 3]
     expected: FAIL
 
   [.item 4]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 8]
-    expected: FAIL
-
-  [.item 9]
-    expected: FAIL
-
   [.item 10]
     expected: FAIL
 
   [.item 11]
     expected: FAIL
 
-  [.item 12]
-    expected: FAIL
-
-  [.item 13]
-    expected: FAIL
-
   [.item 14]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-rtl-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-rtl-vrl.html.ini
index 9317fb6048670..86835d27b3c9c 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-rtl-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-default-overflow-htb-rtl-vrl.html.ini
@@ -1,42 +1,18 @@
 [justify-self-default-overflow-htb-rtl-vrl.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
   [.item 3]
     expected: FAIL
 
   [.item 4]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 8]
-    expected: FAIL
-
-  [.item 9]
-    expected: FAIL
-
   [.item 10]
     expected: FAIL
 
   [.item 11]
     expected: FAIL
 
-  [.item 12]
-    expected: FAIL
-
-  [.item 13]
-    expected: FAIL
-
   [.item 14]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-htb.html.ini
index a4614a9f1d55a..36cc6bc1497a8 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-htb.html.ini
@@ -1,54 +1,18 @@
 [justify-self-htb-ltr-htb.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 8]
-    expected: FAIL
-
   [.item 9]
     expected: FAIL
 
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
-  [.item 13]
-    expected: FAIL
-
-  [.item 14]
-    expected: FAIL
-
   [.item 15]
     expected: FAIL
 
   [.item 16]
     expected: FAIL
 
-  [.item 17]
-    expected: FAIL
-
-  [.item 18]
-    expected: FAIL
-
   [.item 19]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-vlr.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-vlr.html.ini
index a00b73434f930..b0f5ff3c78801 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-vlr.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-vlr.html.ini
@@ -1,54 +1,18 @@
 [justify-self-htb-ltr-vlr.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
-  [.item 8]
-    expected: FAIL
-
   [.item 9]
     expected: FAIL
 
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
-  [.item 13]
-    expected: FAIL
-
-  [.item 14]
-    expected: FAIL
-
   [.item 15]
     expected: FAIL
 
-  [.item 16]
-    expected: FAIL
-
   [.item 17]
     expected: FAIL
 
-  [.item 18]
-    expected: FAIL
-
   [.item 19]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-vrl.html.ini
index 16f5fdf074092..21d63104f3b06 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-ltr-vrl.html.ini
@@ -1,54 +1,18 @@
 [justify-self-htb-ltr-vrl.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
   [.item 6]
     expected: FAIL
 
-  [.item 7]
-    expected: FAIL
-
-  [.item 8]
-    expected: FAIL
-
   [.item 9]
     expected: FAIL
 
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
-  [.item 13]
-    expected: FAIL
-
-  [.item 14]
-    expected: FAIL
-
   [.item 15]
     expected: FAIL
 
   [.item 16]
     expected: FAIL
 
-  [.item 17]
-    expected: FAIL
-
-  [.item 18]
-    expected: FAIL
-
   [.item 19]
     expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-htb.html.ini
index fa2d92c4e0982..9cdebf2ee225a 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-htb.html.ini
@@ -1,54 +1,18 @@
 [justify-self-htb-rtl-htb.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
   [.item 6]
     expected: FAIL
 
-  [.item 7]
-    expected: FAIL
-
   [.item 8]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
-  [.item 13]
-    expected: FAIL
-
-  [.item 14]
-    expected: FAIL
-
   [.item 15]
     expected: FAIL
 
-  [.item 16]
-    expected: FAIL
-
   [.item 17]
     expected: FAIL
 
   [.item 18]
     expected: FAIL
-
-  [.item 19]
-    expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-vlr.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-vlr.html.ini
index 2fdcd825190d7..67309fa98b8ae 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-vlr.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-vlr.html.ini
@@ -1,54 +1,18 @@
 [justify-self-htb-rtl-vlr.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
   [.item 6]
     expected: FAIL
 
-  [.item 7]
-    expected: FAIL
-
   [.item 8]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
-  [.item 13]
-    expected: FAIL
-
-  [.item 14]
-    expected: FAIL
-
   [.item 15]
     expected: FAIL
 
   [.item 16]
     expected: FAIL
 
-  [.item 17]
-    expected: FAIL
-
   [.item 18]
     expected: FAIL
-
-  [.item 19]
-    expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-vrl.html.ini
index 9a82653e5c5fe..414415ee19156 100644
--- a/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/justify-self-htb-rtl-vrl.html.ini
@@ -1,54 +1,18 @@
 [justify-self-htb-rtl-vrl.html]
-  [.item 1]
-    expected: FAIL
-
-  [.item 2]
-    expected: FAIL
-
-  [.item 3]
-    expected: FAIL
-
-  [.item 4]
-    expected: FAIL
-
   [.item 5]
     expected: FAIL
 
-  [.item 6]
-    expected: FAIL
-
   [.item 7]
     expected: FAIL
 
   [.item 8]
     expected: FAIL
 
-  [.item 9]
-    expected: FAIL
-
-  [.item 11]
-    expected: FAIL
-
-  [.item 12]
-    expected: FAIL
-
-  [.item 13]
-    expected: FAIL
-
-  [.item 14]
-    expected: FAIL
-
   [.item 15]
     expected: FAIL
 
-  [.item 16]
-    expected: FAIL
-
   [.item 17]
     expected: FAIL
 
   [.item 18]
     expected: FAIL
-
-  [.item 19]
-    expected: FAIL
diff --git a/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-htb-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-htb-htb.html.ini
index 55341d644dfda..ac71835a075ba 100644
--- a/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-htb-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-htb-htb.html.ini
@@ -1,16 +1,10 @@
 [stretch-intrinsic-size-htb-htb.html]
-  [.item 1]
-    expected: FAIL
-
   [.item 2]
     expected: FAIL
 
   [.item 3]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
   [.item 6]
     expected: FAIL
 
diff --git a/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-htb-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-htb-vrl.html.ini
index 92dfe16a87aa8..2911859d2f7a8 100644
--- a/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-htb-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-htb-vrl.html.ini
@@ -1,16 +1,10 @@
 [stretch-intrinsic-size-htb-vrl.html]
-  [.item 1]
-    expected: FAIL
-
   [.item 2]
     expected: FAIL
 
   [.item 3]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
   [.item 6]
     expected: FAIL
 
diff --git a/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-vrl-htb.html.ini b/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-vrl-htb.html.ini
index 758bf0896cb78..e0ece0aed0b66 100644
--- a/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-vrl-htb.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-vrl-htb.html.ini
@@ -1,16 +1,10 @@
 [stretch-intrinsic-size-vrl-htb.html]
-  [.item 1]
-    expected: FAIL
-
   [.item 2]
     expected: FAIL
 
   [.item 3]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
   [.item 6]
     expected: FAIL
 
diff --git a/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-vrl-vrl.html.ini b/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-vrl-vrl.html.ini
index f472fb29d770b..0774bd26b12ce 100644
--- a/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-vrl-vrl.html.ini
+++ b/tests/wpt/meta/css/css-align/abspos/stretch-intrinsic-size-vrl-vrl.html.ini
@@ -1,16 +1,10 @@
 [stretch-intrinsic-size-vrl-vrl.html]
-  [.item 1]
-    expected: FAIL
-
   [.item 2]
     expected: FAIL
 
   [.item 3]
     expected: FAIL
 
-  [.item 5]
-    expected: FAIL
-
   [.item 6]
     expected: FAIL