LibWeb: Apply z-index only to positioned elements

`z-index` values other than `auto` also apply to grid and flex items
because they behave as if their `position` were `relative`.
This commit is contained in:
Tim Ledbetter
2026-04-03 15:38:45 +01:00
committed by Jelle Raaijmakers
parent e5dab9e1c7
commit d9079d2078
Notes: github-actions[bot] 2026-04-03 21:29:40 +00:00
8 changed files with 61 additions and 14 deletions

View File

@@ -48,6 +48,7 @@ public:
StackingContext const* stacking_context() const { return m_stacking_context; }
void set_stacking_context(GC::Ref<StackingContext>);
void invalidate_stacking_context();
Optional<int> effective_z_index() const;
virtual Optional<CSSPixelRect> get_mask_area() const { return {}; }
virtual Optional<Gfx::MaskKind> get_mask_type() const { return {}; }