Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIntermittent failure in /_mozilla/css/last_of_type_pseudo_a.html #8191
Comments
This was referenced Nov 3, 2015
Merged
This was referenced Jan 30, 2016
This was referenced Feb 5, 2016
Merged
This was referenced Feb 15, 2016
|
With this in <div id="d1">
<p> </p>
<div> </div>
<div> </div>
<p> </p>
<address> </address>
<p> </p>
<div> </div>
<p> </p>
<p> </p>
<address> </address>
<!-- <address class="ok"> </address>
<p> </p>
<div class="ok"> </div>
<p> </p>
<p class="ok"> </p> -->
</div>We get: Seems like layout is done when the document isn't complete and these nodes aren't styled again when the rest is finally parsed and handled. |
<!DOCTYPE html>
<html>
<head>
<link rel='match' href='last_of_type_pseudo_b.html'>
<title>:last-of-type test</title>
<style type="text/css">
html { background: red; }
/* Should match according to Selectors Level 4 (changed from Level 3) */
html:last-of-type { background: white; }
div > p,
div > div,
div > address {
float: left;
width: 20px;
height: 20px;
margin: 0px;
margin-right: 10px;
padding: 0px;
}
div > p {
background: white;
}
div > div,
div > address {
background: black;
}
body > div { clear: both; margin-bottom: 10px; }
#d1 > .ok { background: red; }
#d1 > *:last-of-type { background: green }
</style>
<script>
setTimeout(function() {
var d1 = document.getElementById("d1");
var address = document.createElement("address");
address.classList.add("ok");
d1.appendChild(address);
console.log("ok");
}, 1000);
</script>
</head>
<body>
<div id="d1">
<p> </p>
<div> </div>
<div> </div>
<p> </p>
<address> </address>
<p> </p>
<div> </div>
<p> </p>
<p> </p>
<address> </address>
<!-- <address class="ok"> </address>
<p> </p>
<div class="ok"> </div>
<p> </p>
<p class="ok"> </p> -->
</div>
</body>
</html> |
|
That last testcase works with |
|
Disabled in #9716 |
mbrubeck
added a commit
to mbrubeck/rust-selectors
that referenced
this issue
Feb 22, 2016
This required by the fix for servo/servo#8191.
mbrubeck
added a commit
to mbrubeck/servo
that referenced
this issue
Feb 22, 2016
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. Fixes servo#8191 and other intermittent layout bugs. This code is based on the following flags from Gecko: https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
mbrubeck
added a commit
to mbrubeck/servo
that referenced
this issue
Feb 22, 2016
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. Fixes servo#8191 and servo#9063, and other intermittent layout bugs. This code is based on the following flags from Gecko: https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
mbrubeck
added a commit
to mbrubeck/rust-selectors
that referenced
this issue
Feb 23, 2016
This required by the fix for servo/servo#8191.
bors-servo
added a commit
to servo/rust-selectors
that referenced
this issue
Feb 23, 2016
Mark elements whose children are affected by "slow" selectors This required by the fix for servo/servo#8191. r? @SimonSapin <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/rust-selectors/71) <!-- Reviewable:end -->
mbrubeck
added a commit
to mbrubeck/servo
that referenced
this issue
Feb 23, 2016
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. Fixes servo#8191 and servo#9063, and other intermittent layout bugs. This code is based on the following flags from Gecko: https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
mbrubeck
added a commit
to mbrubeck/servo
that referenced
this issue
Feb 23, 2016
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. * Fixes servo#8191 * Fixes servo#9063 * Fixes servo#9303 * Fixes servo#9448 This code is based on the following flags from Gecko: https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
mbrubeck
added a commit
to mbrubeck/servo
that referenced
this issue
Feb 23, 2016
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. * Fixes servo#8191 * Fixes servo#9063 * Fixes servo#9303 * Fixes servo#9448 This code is based on the following flags from Gecko: https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
mbrubeck
added a commit
to mbrubeck/servo
that referenced
this issue
Feb 24, 2016
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. * Fixes servo#8191 * Fixes servo#9063 * Fixes servo#9303 * Fixes servo#9448 This code is based on the following flags from Gecko: https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
mbrubeck
added a commit
to mbrubeck/servo
that referenced
this issue
Feb 24, 2016
This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. * Fixes servo#8191 * Fixes servo#9063 * Fixes servo#9303 * Fixes servo#9448 This code is based on the following flags from Gecko: https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
bors-servo
added a commit
that referenced
this issue
Feb 24, 2016
Dirty elements whose selectors are affected by sibling changes This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc. Fixes #8191 and other intermittent layout bugs. This code is based on the following flags from Gecko: https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134 Depends on servo/rust-selectors#71. r? @SimonSapin There are a couple of TODO items in this commit, but I'd appreciate feedback on the general approach before I finish it up. (Also, if someone who knows more than I do could give some advice about atomic orderings...) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9722) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Looks like a layout issue.
