mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibWeb: Establish a stacking context for root element
Until now we were just creating a stacking context for the tree root, which usually is the viewport element. This lead to weird painting behaviour when negative z-index children of the html element that established their own stacking context were drawn below the canvas background. Now we establish a stacking context for both, the root element and the viewport.
This commit is contained in:
parent
08c1effc04
commit
dd81a975d7
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ bool Node::establishes_stacking_context() const
|
|||
|
||||
if (!has_style())
|
||||
return false;
|
||||
if (dom_node() == &document().root())
|
||||
if (is_root_element() || dom_node() == &document().root())
|
||||
return true;
|
||||
auto position = computed_values().position();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue