style: Fix dynamic changes of attributes when combined with :not.

This commit is contained in:
Emilio Cobos Álvarez 2017-04-12 12:45:41 +08:00
parent 8298ee75c7
commit 568fa4cc0d
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 116 additions and 33 deletions

View file

@ -3743,6 +3743,18 @@
{}
]
],
"css/negation-attr-dependence.html": [
[
"/_mozilla/css/negation-attr-dependence.html",
[
[
"/_mozilla/css/negation-attr-dependence-ref.html",
"=="
]
],
{}
]
],
"css/negative-calc-cv.html": [
[
"/_mozilla/css/negative-calc-cv.html",
@ -8299,6 +8311,11 @@
{}
]
],
"css/negation-attr-dependence-ref.html": [
[
{}
]
],
"css/negative-calc-cv-ref.html": [
[
{}
@ -22501,6 +22518,14 @@
"a82c94a9a4a18cda6009e467993cace8babe7591",
"support"
],
"css/negation-attr-dependence-ref.html": [
"560c5d8b523f6d4cad6e15e5604f51646647d487",
"support"
],
"css/negation-attr-dependence.html": [
"27bec4af590a2e6d5e88b54ed37fd254ef0f0a99",
"reftest"
],
"css/negative-calc-cv-ref.html": [
"a42f34470ead45d5865562618f6538fde263a359",
"support"

View file

@ -0,0 +1,8 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test Reference</title>
<style>
.foo + div { background: green; width: 100px; height: 100px; }
</style>
<div class="foo"></div>
<div>Should be green</div>

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test: Negation with attribute dependence correctly restyle siblings.</title>
<link rel="match" href="negation-attr-dependence-ref.html">
<style>
:not(.foo) + div { background: green; width: 100px; height: 100px; }
</style>
<link rel="matches" href="negation-attr-dependence-ref.html">
<div class="foo"></div>
<div>Should be green</div>
<script>
window.onload = function() {
document.querySelector('div').className = "";
}
</script>