LibWeb: Make SVG foreignObject establish a new stacking context

This matches the behavior of Blink and Gecko, but not WebKit.
This commit is contained in:
Andreas Kling 2025-07-06 15:00:51 +02:00 committed by Andreas Kling
parent dab1fd265d
commit 0cf9a4543a
Notes: github-actions[bot] 2025-07-09 12:38:21 +00:00
4 changed files with 12 additions and 1 deletions

View file

@ -236,6 +236,9 @@ bool Node::establishes_stacking_context() const
if (computed_values().mask().has_value() || computed_values().clip_path().has_value() || computed_values().mask_image())
return true;
if (is_svg_foreign_object_box())
return true;
// https://drafts.fxtf.org/compositing/#propdef-isolation
// For CSS, setting isolation to isolate will turn the element into a stacking context.
if (computed_values().isolation() == CSS::Isolation::Isolate)