mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Rework CB management during stacking context tree construction
Manage containing blocks and WebRender SpaceAndClip during stacking context tree constuction using the ContainingBlockInfo data structure. This will allow us to reuse this data structure whenever we traverse the fragment tree. In addition, StackingContextBuilder is no longer necessary at all. This change also fixes some bugs where fixed position fragments were not placed in the correct spatial node. Unfortunately, these fixes are difficult to test because of #29659.
This commit is contained in:
parent
0cffe557c2
commit
0c13fcb9f2
10 changed files with 466 additions and 322 deletions
|
@ -257891,6 +257891,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"transform-containing-block-and-scrolling-area-for-fixed.html": [
|
||||
"2fd5f3873a211fc3a0970fabc9e1d23873bf2afe",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-transforms/transform-containing-block-and-scrolling-area-for-fixed-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"transform-containing-block-dynamic-1a.html": [
|
||||
"7e6a10dda1c24e86f7635bd202efec48e6089fbd",
|
||||
[
|
||||
|
@ -400583,6 +400596,10 @@
|
|||
"5122ad98c209f7a46fe9cad2a81497db2001cee2",
|
||||
[]
|
||||
],
|
||||
"transform-containing-block-and-scrolling-area-for-fixed-ref.html": [
|
||||
"2e88d4493fc23356a1f623983bd85292ca44ade5",
|
||||
[]
|
||||
],
|
||||
"transform-descendant-ref.html": [
|
||||
"ac60e7f52fd7477bfbe77bba38a568b1706c8ae9",
|
||||
[]
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[transform-containing-block-and-scrolling-area-for-fixed.html]
|
||||
expected: FAIL
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="author" title="Martin Robinson" href="mailto:mrobinson@igalia.com">
|
||||
<style>
|
||||
html, body { margin: 0; padding: 0 }
|
||||
#transformed {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: grey;
|
||||
}
|
||||
|
||||
#fixed {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div id="transformed">
|
||||
<div id="fixed"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS transforms: Transformed elements with overflow: hidden create scrolling areas for fixed descendants</title>
|
||||
<link rel="author" title="Martin Robinson" href="mailto:mrobinson@igalia.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-rendering">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-property">
|
||||
<link rel="match" href="transform-containing-block-and-scrolling-area-for-fixed-ref.html">
|
||||
<meta name="assert" content="For elements whose layout is governed by the CSS box model, any value other than none for the transform results in the creation of both a stacking context and a containing block. The object acts as a containing block for fixed positioned descendants.">
|
||||
<meta name="assert" content="The object acts as a containing block for fixed positioned descendants, but also creates scrolling areas for them."
|
||||
<meta name="flags" content="dom">
|
||||
<style>
|
||||
html, body { margin: 0; padding: 0 }
|
||||
#transformed {
|
||||
transform: translateX(10px) translateY(10px);
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: grey;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#fixed {
|
||||
position: fixed;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
background: green;
|
||||
}
|
||||
|
||||
#spacer {
|
||||
height: 10000px;
|
||||
width: 10000px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="transformed">
|
||||
<div id="fixed"></div>
|
||||
<div id="spacer"></div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById('transformed').scrollTo(50, 50);
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue