mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add reftest for the correct restyling of containers that match slow selectors.
This commit is contained in:
parent
468b329645
commit
ccb4e958e5
3 changed files with 65 additions and 0 deletions
|
@ -4636,6 +4636,18 @@
|
|||
"url": "/_mozilla/css/removeproperty.html"
|
||||
}
|
||||
],
|
||||
"css/restyle-nth-child.html": [
|
||||
{
|
||||
"path": "css/restyle-nth-child.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/restyle-nth-child-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/restyle-nth-child.html"
|
||||
}
|
||||
],
|
||||
"css/restyle_hints_attr.html": [
|
||||
{
|
||||
"path": "css/restyle_hints_attr.html",
|
||||
|
@ -14006,6 +14018,18 @@
|
|||
"url": "/_mozilla/css/removeproperty.html"
|
||||
}
|
||||
],
|
||||
"css/restyle-nth-child.html": [
|
||||
{
|
||||
"path": "css/restyle-nth-child.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/restyle-nth-child-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/restyle-nth-child.html"
|
||||
}
|
||||
],
|
||||
"css/restyle_hints_attr.html": [
|
||||
{
|
||||
"path": "css/restyle_hints_attr.html",
|
||||
|
|
17
tests/wpt/mozilla/tests/css/restyle-nth-child-ref.html
Normal file
17
tests/wpt/mozilla/tests/css/restyle-nth-child-ref.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS test reference.</title>
|
||||
<style>
|
||||
.container div {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: blue;
|
||||
}
|
||||
.container div:nth-child(2) {
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
24
tests/wpt/mozilla/tests/css/restyle-nth-child.html
Normal file
24
tests/wpt/mozilla/tests/css/restyle-nth-child.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Restyling of a child of a parent that didn't match nth-child but now
|
||||
does should be correct.</title>
|
||||
<link rel="match" href="restyle-nth-child-ref.html">
|
||||
<style>
|
||||
.container div {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: blue;
|
||||
}
|
||||
.container div:nth-child(2) {
|
||||
background: green;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div></div>
|
||||
</div>
|
||||
<script>
|
||||
let container = document.querySelector('.container');
|
||||
window.onload = function() {
|
||||
container.insertBefore(document.createElement('div'), container.firstChild);
|
||||
}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue