Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rwlbuis authored Sep 15, 2022
1 parent 5e09235 commit 09b8d2f
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
28 changes: 28 additions & 0 deletions css/css-contain/contain-paint-050-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>CSS Containment Test: Scrolling overflow works when paint is contained"</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-paint">
<meta name="assert" content="Scrolling overflow works when paint is contained.">

<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>

<style>
.content {
height: 100vh;
width: 100%;
}
</style>

<body>
<div class="content"></div>

<script>
waitForAtLeastOneFrame().then(() => {
document.body.scrollTop = 100;
takeScreenshot();
});
</script>

</body>
</html>
32 changes: 32 additions & 0 deletions css/css-contain/contain-paint-050.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>CSS Containment Test: Scrolling overflow works when paint is contained"</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-paint">
<link rel="match" href="contain-paint-050-ref.html">
<meta name="assert" content="Scrolling overflow works when paint is contained.">

<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>

<style>
body {
contain: paint;
}
.content {
height: 100vh;
width: 100%;
}
</style>

<body>
<div class="content"></div>

<script>
waitForAtLeastOneFrame().then(() => {
document.body.scrollTop = 100;
takeScreenshot();
});
</script>

</body>
</html>

0 comments on commit 09b8d2f

Please sign in to comment.