Skip to content

Revert "Make a css-contain test less flaky." #52477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 61 additions & 12 deletions css/css-contain/contain-paint-stacking-context-001-ref.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,62 @@
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Paint Containment Stacking Context Reference</title>
<link rel="author" title="Psychpsyo" href="mailto:[email protected]">
<style>
div {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div></div>
Test succeeds if there is no red.
<html>
<head>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Yusuf Sermet" href="mailto:[email protected]">
<style>
div {
position: relative;
width: 100px;
}
#div1,
#div3 {
background-color: #cfc;
}
#div1 {
z-index: 5;
}
#div2 {
z-index: 1;
background-color: #fdd;
height: 100px;
top: -20px;
}
#div2_1 {
background-color: #ffc;
z-index: 6;
top: -10px;
}
#div2_2 {
z-index: 3;
position: absolute;
top: -15px;
width: 40px;
height: 100px;
background-color: #ddf;
}
#div3 {
z-index: 2;
top: -50px;
}
</style>
</head>
<body>
<div id="div1">
<br/><br/>
</div>

<div id="div2">
<div id="div2_1">
<br/><br/>
</div>

<div id="div2_2">
</div>
</div>

<div id="div3">
<br/><br/>
</div>
</body>
</html>
96 changes: 65 additions & 31 deletions css/css-contain/contain-paint-stacking-context-001a.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,66 @@
<!DOCTYPE HTML>
<title>'contain: paint' establishes stacking context.</title>
<link rel="author" title="Psychpsyo" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#x43">
<link rel="help" href="https://drafts.csswg.org/css-contain/#containment-paint">
<link rel="match" href="contain-paint-stacking-context-001-ref.html">
<style>
div {
width: 100px;
height: 100px;
}
#front {
background-color: green;
/* makes a stacking context and puts this on top */
position: absolute;
z-index: 10;
}
#back {
contain: paint;
}
#notOnTop {
background-color: red;
/* z-index is higher than on #front, but this should still be covered up because it is inside #back, which has 'contain: paint' */
position: absolute;
z-index: 1000;
}
</style>
<div id="front"></div>
<div id="back">
<div id="notOnTop"></div>
</div>
Test succeeds if there is no red.
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'contain: paint' with stacking contents. Z-index is defined only for siblings and children.</title>
<link rel="author" title="Yusuf Sermet" href="mailto:[email protected]">

<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#x43">
<link rel="help" href="https://drafts.csswg.org/css-contain/#containment-paint">
<link rel="match" href="contain-paint-stacking-context-001-ref.html">
<style>
div {
position: relative;
width: 100px;
}
#div1,
#div3 {
background-color: #cfc;
}
#div1 {
z-index: 5;
}
#div2 {
contain: paint;
background-color: #fdd;
height: 100px;
top: -20px;
}
#div2_1 {
background-color: #ffc;
z-index: 6;
top: -10px;
}
#div2_2 {
z-index: 3;
position: absolute;
top: -15px;
width: 40px;
height: 100px;
background-color: #ddf;
}
#div3 {
z-index: 2;
top: -50px;
}
</style>
</head>
<body>
<div id="div1">
<br/><br/>
</div>

<div id="div2">
<div id="div2_1">
<br/><br/>
</div>

<div id="div2_2">
</div>
</div>

<div id="div3">
<br/><br/>
</div>
</body>
</html>
96 changes: 65 additions & 31 deletions css/css-contain/contain-paint-stacking-context-001b.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,66 @@
<!DOCTYPE HTML>
<title>'will-change: contain' establishes stacking context.</title>
<link rel="author" title="Psychpsyo" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#x43">
<link rel="help" href="https://drafts.csswg.org/css-contain/#containment-paint">
<link rel="match" href="contain-paint-stacking-context-001-ref.html">
<style>
div {
width: 100px;
height: 100px;
}
#front {
background-color: green;
/* makes a stacking context and puts this on top */
position: absolute;
z-index: 10;
}
#back {
will-change: contain;
}
#notOnTop {
background-color: red;
/* z-index is higher than on #front, but this should still be covered up because it is inside #back, which has 'will-change: contain' */
position: absolute;
z-index: 1000;
}
</style>
<div id="front"></div>
<div id="back">
<div id="notOnTop"></div>
</div>
Test succeeds if there is no red.
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: 'will-change: contain' with stacking contents. Z-index is defined only for siblings and children.</title>
<link rel="author" title="Yusuf Sermet" href="mailto:[email protected]">

<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#x43">
<link rel="help" href="https://drafts.csswg.org/css-contain/#containment-paint">
<link rel="match" href="contain-paint-stacking-context-001-ref.html">
<style>
div {
position: relative;
width: 100px;
}
#div1,
#div3 {
background-color: #cfc;
}
#div1 {
z-index: 5;
}
#div2 {
will-change: contain;
background-color: #fdd;
height: 100px;
top: -20px;
}
#div2_1 {
background-color: #ffc;
z-index: 6;
top: -10px;
}
#div2_2 {
z-index: 3;
position: absolute;
top: -15px;
width: 40px;
height: 100px;
background-color: #ddf;
}
#div3 {
z-index: 2;
top: -50px;
}
</style>
</head>
<body>
<div id="div1">
<br/><br/>
</div>

<div id="div2">
<div id="div2_1">
<br/><br/>
</div>

<div id="div2_2">
</div>
</div>

<div id="div3">
<br/><br/>
</div>
</body>
</html>