DescriptionLet querySelector(All) match (nth-)last with unclosed parent.
While parsing, we don't match :last*, :nth-last* etc until we finish
parsing children to avoid alternating between different computed styles
during loading. For querying selectors, however, we should. I couldn't
find this explicitly mentioned in w3c or whatwg specs for
querySelector(All), but Firefox and IE does this.
This could happen if you have:
<body>
<p></p>
<p></p>
<script>document.querySelector("p:last-of-type")</script>
</body>
Adding expectations file for a wpt which now fails. The modifications
to the test has been upstreamed to the github repo. See PR [1].
[1] https://github.com/w3c/web-platform-tests/pull/4216
R=sashab@chromium.org
BUG=662036
Committed: https://crrev.com/2b2e6f1d8ded02c97fbdda7088e24f84ad035ea3
Cr-Commit-Position: refs/heads/master@{#432493}
Patch Set 1 #Patch Set 2 : Added expectation file #
Messages
Total messages: 17 (9 generated)
|