LibWeb: Handle calc() in CSS z-index

We also make getComputedStyle() reflect the actually used z-index value,
since otherwise this change is hard to observe.

+26 new WPT subtest passes.
This commit is contained in:
Andreas Kling 2025-05-20 12:06:56 +02:00 committed by Andreas Kling
parent 821d54de7f
commit c1e79d0b13
Notes: github-actions[bot] 2025-05-20 11:29:48 +00:00
3 changed files with 48 additions and 34 deletions

View file

@ -1005,6 +1005,10 @@ RefPtr<CSSStyleValue const> CSSStyleProperties::style_value_for_computed_propert
return used_values_for_grid_template_rows;
}
}
} else if (property_id == PropertyID::ZIndex) {
if (auto z_index = layout_node.computed_values().z_index(); z_index.has_value()) {
return NumberStyleValue::create(z_index.value());
}
}
if (!property_is_shorthand(property_id))