Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS Selectors Invalidation: :nth-child(... of :not()) combined with whole subtree invalidation</title>
<link rel="help" href="https://crbug.com/333420613">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
div:nth-child(odd of :not(.c)) {
background-color: silver;
}
.c * {}
</style>
<div>Silver</div>
<div id="d2" class="c">White</div>
<div id="d3">Silver</div>
<script>
test(() => {
document.body.offsetTop;
d2.classList.value = '';
assert_equals(getComputedStyle(d3).backgroundColor, 'rgb(192, 192, 192)');
});
</script>