-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more tests for paint/layout containment change and floats.
Differential Revision: https://phabricator.services.mozilla.com/D198962 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1874826 gecko-commit: 5a43bc7dfb197a739a10a231753f8f94ca8557af gecko-reviewers: layout-reviewers, emilio
- Loading branch information
1 parent
7a60505
commit 7f1c816
Showing
8 changed files
with
508 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<meta charset="utf-8"> | ||
<title>Dynamic change to layout containment (reference)</title> | ||
|
||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
|
||
<style> | ||
div { | ||
font: 25px/1 Ahem; | ||
} | ||
#wrapper { | ||
width: 15em; | ||
background: lightgray; | ||
} | ||
.containment { | ||
contain: layout; | ||
} | ||
.float { | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
.left { | ||
float: left; | ||
width: 1em; | ||
height: 2em; | ||
} | ||
.right { | ||
float: right; | ||
width: 1em; | ||
height: 3em; | ||
} | ||
</style> | ||
|
||
<body> | ||
<p>PASS if the boxes with dark colors are NOT floating next to the boxes with | ||
light colors.</p> | ||
<div id="wrapper"> | ||
<div> | ||
<div id="container" class="containment"> | ||
<div><div class="float left" style="background: lightblue"></div></div> | ||
<div class="float right" style="background: lightyellow"></div> | ||
<div>XX XXX XXXX X</div> | ||
</div> | ||
<div class="float left" style="background: blue"></div> | ||
<div> | ||
<div> | ||
<div><div class="float right" style="background: yellow"></div></div> | ||
<div>XXX XXXXXX XXXX XX XX</div> | ||
</div> | ||
<div>XXXX XXXXX XX</div> | ||
</div> | ||
<div>XXX XXX XX XXXX</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<meta charset="utf-8"> | ||
<title>Dynamic change to layout containment</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874826"> | ||
<meta name="assert" content="Verify floats are properly displayed after dynamic change to layout containment."> | ||
<link rel="match" href="contain-layout-dynamic-004-ref.html"> | ||
|
||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<script src="/common/rendering-utils.js"></script> | ||
|
||
<style> | ||
div { | ||
font: 25px/1 Ahem; | ||
} | ||
#wrapper { | ||
width: 15em; | ||
background: lightgray; | ||
} | ||
.containment { | ||
contain: layout; | ||
} | ||
.float { | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
.left { | ||
float: left; | ||
width: 1em; | ||
height: 2em; | ||
} | ||
.right { | ||
float: right; | ||
width: 1em; | ||
height: 3em; | ||
} | ||
</style> | ||
|
||
<body> | ||
<p>PASS if the boxes with dark colors are NOT floating next to the boxes with | ||
light colors.</p> | ||
<div id="wrapper"> | ||
<div> | ||
<div id="container"> | ||
<div><div class="float left" style="background: lightblue"></div></div> | ||
<div class="float right" style="background: lightyellow"></div> | ||
<div>XX XXX XXXX X</div> | ||
</div> | ||
<div class="float left" style="background: blue"></div> | ||
<div> | ||
<div> | ||
<div><div class="float right" style="background: yellow"></div></div> | ||
<div>XXX XXXXXX XXXX XX XX</div> | ||
</div> | ||
<div>XXXX XXXXX XX</div> | ||
</div> | ||
<div>XXX XXX XX XXXX</div> | ||
</div> | ||
</div> | ||
<script> | ||
window.addEventListener("load", async () => { | ||
container.classList.add('containment'); | ||
await waitForAtLeastOneFrame(); | ||
takeScreenshot(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<meta charset="utf-8"> | ||
<title>Dynamic change to layout containment (reference)</title> | ||
|
||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
|
||
<style> | ||
div { | ||
font: 25px/1 Ahem; | ||
} | ||
#wrapper { | ||
width: 15em; | ||
background: lightgray; | ||
} | ||
.containment { | ||
contain: layout; | ||
} | ||
.float { | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
.left { | ||
float: left; | ||
width: 1em; | ||
height: 2em; | ||
} | ||
.right { | ||
float: right; | ||
width: 1em; | ||
height: 3em; | ||
} | ||
</style> | ||
|
||
<body> | ||
<p>PASS if the boxes with dark colors are floating next to the boxes with | ||
light colors.</p> | ||
<div id="wrapper"> | ||
<div> | ||
<div id="container"> | ||
<div><div class="float left" style="background: lightblue"></div></div> | ||
<div class="float right" style="background: lightyellow"></div> | ||
<div>XX XXX XXXX X</div> | ||
</div> | ||
<div class="float left" style="background: blue"></div> | ||
<div> | ||
<div> | ||
<div><div class="float right" style="background: yellow"></div></div> | ||
<div>XXX XXXXXX XXXX XX XX</div> | ||
</div> | ||
<div>XXXX XXXXX XX</div> | ||
</div> | ||
<div>XXX XXX XX XXXX</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<meta charset="utf-8"> | ||
<title>Dynamic change to layout containment</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874826"> | ||
<meta name="assert" content="Verify floats are properly displayed after dynamic change to layout containment."> | ||
<link rel="match" href="contain-layout-dynamic-005-ref.html"> | ||
|
||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<script src="/common/rendering-utils.js"></script> | ||
|
||
<style> | ||
div { | ||
font: 25px/1 Ahem; | ||
} | ||
#wrapper { | ||
width: 15em; | ||
background: lightgray; | ||
} | ||
.containment { | ||
contain: layout; | ||
} | ||
.float { | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
.left { | ||
float: left; | ||
width: 1em; | ||
height: 2em; | ||
} | ||
.right { | ||
float: right; | ||
width: 1em; | ||
height: 3em; | ||
} | ||
</style> | ||
|
||
<body> | ||
<p>PASS if the boxes with dark colors are floating next to the boxes with | ||
light colors.</p> | ||
<div id="wrapper"> | ||
<div> | ||
<div id="container" class="containment"> | ||
<div><div class="float left" style="background: lightblue"></div></div> | ||
<div class="float right" style="background: lightyellow"></div> | ||
<div>XX XXX XXXX X</div> | ||
</div> | ||
<div class="float left" style="background: blue"></div> | ||
<div> | ||
<div> | ||
<div><div class="float right" style="background: yellow"></div></div> | ||
<div>XXX XXXXXX XXXX XX XX</div> | ||
</div> | ||
<div>XXXX XXXXX XX</div> | ||
</div> | ||
<div>XXX XXX XX XXXX</div> | ||
</div> | ||
</div> | ||
<script> | ||
window.addEventListener("load", async () => { | ||
container.classList.remove('containment'); | ||
await waitForAtLeastOneFrame(); | ||
takeScreenshot(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<meta charset="utf-8"> | ||
<title>Dynamic change to paint containment (reference)</title> | ||
|
||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
|
||
<style> | ||
div { | ||
font: 25px/1 Ahem; | ||
} | ||
#wrapper { | ||
width: 15em; | ||
background: lightgray; | ||
} | ||
.containment { | ||
contain: paint; | ||
} | ||
.float { | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
.left { | ||
float: left; | ||
width: 1em; | ||
height: 2em; | ||
} | ||
.right { | ||
float: right; | ||
width: 1em; | ||
height: 3em; | ||
} | ||
</style> | ||
|
||
<body> | ||
<p>PASS if the boxes with dark colors are NOT floating next to the boxes with | ||
light colors.</p> | ||
<div id="wrapper"> | ||
<div> | ||
<div id="container" class="containment"> | ||
<div><div class="float left" style="background: lightblue"></div></div> | ||
<div class="float right" style="background: lightyellow"></div> | ||
<div>XX XXX XXXX X</div> | ||
</div> | ||
<div class="float left" style="background: blue"></div> | ||
<div> | ||
<div> | ||
<div><div class="float right" style="background: yellow"></div></div> | ||
<div>XXX XXXXXX XXXX XX XX</div> | ||
</div> | ||
<div>XXXX XXXXX XX</div> | ||
</div> | ||
<div>XXX XXX XX XXXX</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<meta charset="utf-8"> | ||
<title>Dynamic change to paint containment</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874826"> | ||
<meta name="assert" content="Verify floats are properly displayed after dynamic change to paint containment."> | ||
<link rel="match" href="contain-paint-dynamic-004-ref.html"> | ||
|
||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<script src="/common/rendering-utils.js"></script> | ||
|
||
<style> | ||
div { | ||
font: 25px/1 Ahem; | ||
} | ||
#wrapper { | ||
width: 15em; | ||
background: lightgray; | ||
} | ||
.containment { | ||
contain: paint; | ||
} | ||
.float { | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
} | ||
.left { | ||
float: left; | ||
width: 1em; | ||
height: 2em; | ||
} | ||
.right { | ||
float: right; | ||
width: 1em; | ||
height: 3em; | ||
} | ||
</style> | ||
|
||
<body> | ||
<p>PASS if the boxes with dark colors are NOT floating next to the boxes with | ||
light colors.</p> | ||
<div id="wrapper"> | ||
<div> | ||
<div id="container"> | ||
<div><div class="float left" style="background: lightblue"></div></div> | ||
<div class="float right" style="background: lightyellow"></div> | ||
<div>XX XXX XXXX X</div> | ||
</div> | ||
<div class="float left" style="background: blue"></div> | ||
<div> | ||
<div> | ||
<div><div class="float right" style="background: yellow"></div></div> | ||
<div>XXX XXXXXX XXXX XX XX</div> | ||
</div> | ||
<div>XXXX XXXXX XX</div> | ||
</div> | ||
<div>XXX XXX XX XXXX</div> | ||
</div> | ||
</div> | ||
<script> | ||
window.addEventListener("load", async () => { | ||
container.classList.add('containment'); | ||
await waitForAtLeastOneFrame(); | ||
takeScreenshot(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.