test: gate transformed positioning coordinates

Add an exact Chromium fixture for absolute and fixed descendants of
transformed boxes, an unsupported identity transform, and the viewport-fixed
control case.
This commit is contained in:
SGavrl committed 2026-07-23 11:47:12 +00:00
1 parent bbeceb97ad
commit b44e59ef71
2 files changed
+26

No files matched your search

+6
View File
@@ -40,6 +40,12 @@
"tables": [ "tables": [
{"name": "content-box fixed cell column", "color": "#ffcc99", "width": 208} {"name": "content-box fixed cell column", "color": "#ffcc99", "width": 208}
], ],
"transform-containing-block": [
{"name": "absolute captured by transform", "color": "#087f5b", "x": 205, "y": 160, "width": 70, "height": 55},
{"name": "fixed captured by transform", "color": "#1971c2", "x": 335, "y": 235, "width": 80, "height": 50},
{"name": "unsupported identity transform still establishes containing block", "color": "#7048e8", "x": 550, "y": 280, "width": 20, "height": 20},
{"name": "positioned ancestor does not capture fixed", "color": "#a61e4d", "x": 700, "y": 40, "width": 90, "height": 60}
],
"z-index": [ "z-index": [
{"name": "positive layer", "color": "#008000", "width": 200, "height": 100}, {"name": "positive layer", "color": "#008000", "width": 200, "height": 100},
{"name": "negative layer", "color": "#ffa500", "width": 260, "height": 110} {"name": "negative layer", "color": "#ffa500", "width": 260, "height": 110}
@@ -0,0 +1,20 @@
<!DOCTYPE html><html><head><title>transform containing block</title><style>
html,body{margin:0}
.outer{position:relative;margin:40px 0 0 50px;width:600px;height:400px;border:10px solid #111;padding:20px;box-sizing:border-box;background:#eee}
.transformer{transform:translate(30px,20px);margin:40px 0 0 70px;width:300px;height:200px;border:5px solid #333;padding:10px;box-sizing:border-box;background:#ccc}
.static{position:static;margin:20px;width:80px;height:50px;background:#aaa}
.absolute{position:absolute;left:20px;top:25px;width:70px;height:55px;background:#087f5b}
.fixed-transformed{position:fixed;left:150px;top:100px;width:80px;height:50px;background:#1971c2}
.identity-transform{transform:rotate(0deg);margin:-80px 0 0 400px;width:100px;height:80px;background:#bbb}
.identity-absolute{position:absolute;right:10px;bottom:10px;width:20px;height:20px;background:#7048e8}
.fixed-viewport{position:fixed;left:700px;top:40px;width:90px;height:60px;background:#a61e4d}
</style></head><body>
<div class="outer">
<div class="transformer"><div class="static">
<span class="absolute"></span>
<div class="fixed-transformed"></div>
</div></div>
<div class="identity-transform"><div class="identity-absolute"></div></div>
<div class="fixed-viewport"></div>
</div>
</body></html>