commit 9222c2b95471a583069dc50d1023d718131988f0
parent 03f873d7038ac0fd624e6f58e3bfb8f30cd6e69e
Author: fantasai <fantasai.bugs@inkedblade.net>
Date: Mon, 27 Oct 2025 10:06:37 +0000
Bug 1996118 [wpt PR 55294] - [css-anchor-position-1] Fix incorrect containing block assumption, a=testonly
Automatic update from web-platform-tests
[css-anchor-position-1] Fix incorrect containing block assumption (#55294)
Boxes positioned to a scroll container are positioned to the scrollable
containing block, not the fixed (scrollport) containing block... but this
test assumes they are positioned to the scrollport. This change creates a
new containing block outside the scroller to function as the non-scrollable
containing block that the test expects.
--
wpt-commits: 9a168da399005cfc990ccb957c381d4f731027c9
wpt-pr: 55294
Diffstat:
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/testing/web-platform/tests/css/css-anchor-position/position-visibility-no-overflow-scroll.html b/testing/web-platform/tests/css/css-anchor-position/position-visibility-no-overflow-scroll.html
@@ -4,11 +4,16 @@
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#position-visibility">
<link rel="match" href="position-visibility-no-overflow-scroll-ref.html">
<style>
- #scroll-container {
+ #container {
position: relative;
- overflow: hidden scroll;
width: 400px;
height: 150px;
+ overflow: hidden;
+ }
+ #scroll-container {
+ overflow: hidden scroll;
+ width: 100%;
+ height: 100%;
}
.anchor {
@@ -26,6 +31,7 @@
}
</style>
+<div id="container">
<div id="scroll-container">
<div class="anchor" style="anchor-name: --a1;">anchor1</div>
<div class="anchor" style="anchor-name: --a2; position: relative; top: 100px">anchor2</div>
@@ -33,6 +39,8 @@
<div id="target2" class="target" style="position-anchor: --a2; left: anchor(left); bottom: anchor(top); background: red">target2</div>
<div style="height: 300px"></div>
</div>
+</div>
+
<script>
requestAnimationFrame(() => {
requestAnimationFrame(() => {