Bug 1709929 [wpt PR 28877] - Make 3D Rendering Context follow DOM tree for absolute/fixed position., a=testonly

Automatic update from web-platform-tests
Make 3D Rendering Context follow DOM tree for absolute/fixed position.

When TransformInterop is enabled, make the notion of 3D Rendering
Context and the should_flatten_inherited_transform state follow the DOM
tree for absolute and fixed-positioned elements like it does for
everything else.

(This changes behavior only when
RuntimeEnabledFeatures::TransformInteropEnabled().)

This is one of a number of changes discussed in more detail in
https://docs.google.com/document/d/1Up6NwhX0lWhASPCa0gADbV3kvEFGezbDxotAgKzfSUQ/edit

Fixed: 1189985
Change-Id: If56d8092bdab4bd294c98d5b3c73ec4bc1d32009
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2877917
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880630}

--

wpt-commits: 8dee5dbb8c9b17ae876ad3b1f74043c0156487ba
wpt-pr: 28877
This commit is contained in:
L. David Baron 2021-05-08 10:05:51 +00:00 коммит произвёл moz-wptsync-bot
Родитель 9ec43a443f
Коммит 2cf5deb022
2 изменённых файлов: 109 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,54 @@
<!DOCTYPE HTML>
<title>CSS Test (Transforms): 3D Rendering Context following DOM Tree (absolute positioning)</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Google" href="http://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#3d-rendering-contexts">
<meta name="assert" content="Absolutely positioned elements participate in 3D Rendering Contexts based on their parent, not their containing block.">
<link rel="match" href="reference/green.html">
<style>
div {
width: 100px;
height: 100px;
}
.cb {
transform-style: preserve-3d;
background: red;
position: relative;
}
.parent {
}
.abspos {
position: absolute;
top: 0;
left: 0;
/* Since this element is not in the 3D Rendering Context, this translation
does not put it above the <div class="sibling">. */
transform: translateZ(20px);
background: red;
}
.sibling {
position: absolute;
top: 0;
left: 0;
transform: translateZ(10px);
background: green;
}
</style>
<p>Pass if there is NO red below:</p>
<div class="cb">
<div class="parent">
<div class="abspos">
</div>
</div>
<div class="sibling">
</div>
</div>

Просмотреть файл

@ -0,0 +1,55 @@
<!DOCTYPE HTML>
<title>CSS Test (Transforms): 3D Rendering Context following DOM Tree (fixed positioning)</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Google" href="http://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#3d-rendering-contexts">
<meta name="assert" content="Fixed positioned elements participate in 3D Rendering Contexts based on their parent, not their containing block.">
<link rel="match" href="reference/green.html">
<style>
div {
width: 100px;
height: 100px;
}
.cb {
transform-style: preserve-3d;
transform: translateX(0);
background: red;
position: relative;
}
.parent {
}
.abspos {
position: fixed;
top: 0;
left: 0;
/* Since this element is not in the 3D Rendering Context, this translation
does not put it above the <div class="sibling">. */
transform: translateZ(20px);
background: red;
}
.sibling {
position: absolute;
top: 0;
left: 0;
transform: translateZ(10px);
background: green;
}
</style>
<p>Pass if there is NO red below:</p>
<div class="cb">
<div class="parent">
<div class="abspos">
</div>
</div>
<div class="sibling">
</div>
</div>