fix: root element not establishing stacking context (#35390) (#36174)

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #35390 
- [X] There are tests for these changes

[Successful WPT
run](https://github.com/reesmichael1/servo/actions/runs/14097679625)
(which includes the new test files)

(I didn't make the formatting changes intentionally--those came from
`mach format` following `mach test-tidy`.)

---------

Signed-off-by: Michael Rees <mrees@noeontheend.com>
This commit is contained in:
Michael Rees 2025-04-03 12:30:42 -05:00 committed by GitHub
parent f29c182929
commit dfcd9de138
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 53 additions and 0 deletions

View file

@ -102180,6 +102180,19 @@
{}
]
],
"root-element-creates-stacking-context.html": [
"be7b027ee791d8d83d6fcecae60654eb22ff960c",
[
null,
[
[
"/css/CSS2/stacking-context/root-element-creates-stacking-context-ref.html",
"=="
]
],
{}
]
],
"zindex-affects-block-in-inline.html": [
"5a5c9e3dcca6171910f85790e13dc754acda58e0",
[
@ -405642,6 +405655,10 @@
"65138c9a66713e1ed8c2f649751deb1ceb22eac3",
[]
],
"root-element-creates-stacking-context-ref.html": [
"9bb42041498c4a5b2b86e6b282ec49e603a0880b",
[]
],
"zindex-affects-block-in-inline-ref.html": [
"c0fdb338d08198cfd058ccdabd7766a9e57375fd",
[]

View file

@ -0,0 +1,4 @@
<!DOCTYPE html>
<body style="width: 100px; margin: 0">
<div style="height: 100px; background: green"></div>
</body>

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html style="width: 0; height: 0; border: 50px solid red">
<link rel="help" href="https://drafts.csswg.org/css2/#stacking-context">
<link rel="match" href="root-element-creates-stacking-context-ref.html">
<link rel="author" title="Michael Rees" href="mailto:mrees@noeontheend.com">
<meta name="assert" content="root element forms the root stacking context">
<body style="border: 50px solid green; margin: -50px; position: relative; z-index: -1">
</body>
</html>