<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174613] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174613">174613</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-10-10 14:23:37 -0700 (Fri, 10 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Update :nth-child(An+B of selector-list) to the latest specification
https://bugs.webkit.org/show_bug.cgi?id=137593
Reviewed by Andreas Kling.
Source/WebCore:
Following my implementation feedback on :nth-child(An+B of selector-list),
the CSS WG decided to change the definition such that the current element on which
the selector is matched must also match the selector list in :nth-child().
This patch updates the implementation accordingly.
Test: fast/selectors/nth-child-of-chained-3.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::matchSelectorList):
* css/SelectorChecker.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
LayoutTests:
* fast/selectors/nth-child-of-chained-3-expected.txt: Added.
* fast/selectors/nth-child-of-chained-3.html: Added.
This is an interesting new case with the new definition. Since the initial
element must also match the selector, it is now possible to fail even
if the combination An+B can match anything.
* fast/css/nth-child-of-classname-expected.html:
* fast/css/nth-child-of-classname.html:
* fast/css/nth-child-of-compound-selector-expected.html:
* fast/css/nth-child-of-compound-selector.html:
* fast/css/nth-child-of-tagname-expected.html:
* fast/css/nth-child-of-tagname.html:
* fast/selectors/nth-child-of-backtracking-adjacent-2.html:
* fast/selectors/nth-child-of-backtracking-adjacent.html:
* fast/selectors/nth-child-of-basics-2-expected.txt:
* fast/selectors/nth-child-of-basics-2.html:
* fast/selectors/nth-child-of-basics-expected.txt:
* fast/selectors/nth-child-of-basics.html:
* fast/selectors/nth-child-of-chained-2-expected.txt:
* fast/selectors/nth-child-of-chained-2.html:
* fast/selectors/nth-child-of-complex-selectors-expected.txt:
* fast/selectors/nth-child-of-complex-selectors.html:
* fast/selectors/nth-child-of-never-matching-selector-expected.txt:
* fast/selectors/nth-child-of-never-matching-selector.html:
* fast/selectors/nth-child-of-selector-list-expected.txt:
* fast/selectors/nth-child-of-selector-list.html:
Updating the test and tests result for the new definition.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssnthchildofclassnameexpectedhtml">trunk/LayoutTests/fast/css/nth-child-of-classname-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssnthchildofclassnamehtml">trunk/LayoutTests/fast/css/nth-child-of-classname.html</a></li>
<li><a href="#trunkLayoutTestsfastcssnthchildofcompoundselectorexpectedhtml">trunk/LayoutTests/fast/css/nth-child-of-compound-selector-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssnthchildofcompoundselectorhtml">trunk/LayoutTests/fast/css/nth-child-of-compound-selector.html</a></li>
<li><a href="#trunkLayoutTestsfastcssnthchildoftagnameexpectedhtml">trunk/LayoutTests/fast/css/nth-child-of-tagname-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssnthchildoftagnamehtml">trunk/LayoutTests/fast/css/nth-child-of-tagname.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofbacktrackingadjacent2html">trunk/LayoutTests/fast/selectors/nth-child-of-backtracking-adjacent-2.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofbacktrackingadjacenthtml">trunk/LayoutTests/fast/selectors/nth-child-of-backtracking-adjacent.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofbasics2expectedtxt">trunk/LayoutTests/fast/selectors/nth-child-of-basics-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofbasics2html">trunk/LayoutTests/fast/selectors/nth-child-of-basics-2.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofbasicsexpectedtxt">trunk/LayoutTests/fast/selectors/nth-child-of-basics-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofbasicshtml">trunk/LayoutTests/fast/selectors/nth-child-of-basics.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofchained2expectedtxt">trunk/LayoutTests/fast/selectors/nth-child-of-chained-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofchained2html">trunk/LayoutTests/fast/selectors/nth-child-of-chained-2.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofcomplexselectorsexpectedtxt">trunk/LayoutTests/fast/selectors/nth-child-of-complex-selectors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofcomplexselectorshtml">trunk/LayoutTests/fast/selectors/nth-child-of-complex-selectors.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofnevermatchingselectorexpectedtxt">trunk/LayoutTests/fast/selectors/nth-child-of-never-matching-selector-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofnevermatchingselectorhtml">trunk/LayoutTests/fast/selectors/nth-child-of-never-matching-selector.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofselectorlistexpectedtxt">trunk/LayoutTests/fast/selectors/nth-child-of-selector-list-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofselectorlisthtml">trunk/LayoutTests/fast/selectors/nth-child-of-selector-list.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssSelectorCheckercpp">trunk/Source/WebCore/css/SelectorChecker.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSelectorCheckerh">trunk/Source/WebCore/css/SelectorChecker.h</a></li>
<li><a href="#trunkSourceWebCorecssjitSelectorCompilercpp">trunk/Source/WebCore/cssjit/SelectorCompiler.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofchained3expectedtxt">trunk/LayoutTests/fast/selectors/nth-child-of-chained-3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsnthchildofchained3html">trunk/LayoutTests/fast/selectors/nth-child-of-chained-3.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/ChangeLog        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2014-10-10 Benjamin Poulain <benjamin@webkit.org>
+
+ Update :nth-child(An+B of selector-list) to the latest specification
+ https://bugs.webkit.org/show_bug.cgi?id=137593
+
+ Reviewed by Andreas Kling.
+
+ * fast/selectors/nth-child-of-chained-3-expected.txt: Added.
+ * fast/selectors/nth-child-of-chained-3.html: Added.
+ This is an interesting new case with the new definition. Since the initial
+ element must also match the selector, it is now possible to fail even
+ if the combination An+B can match anything.
+
+ * fast/css/nth-child-of-classname-expected.html:
+ * fast/css/nth-child-of-classname.html:
+ * fast/css/nth-child-of-compound-selector-expected.html:
+ * fast/css/nth-child-of-compound-selector.html:
+ * fast/css/nth-child-of-tagname-expected.html:
+ * fast/css/nth-child-of-tagname.html:
+ * fast/selectors/nth-child-of-backtracking-adjacent-2.html:
+ * fast/selectors/nth-child-of-backtracking-adjacent.html:
+ * fast/selectors/nth-child-of-basics-2-expected.txt:
+ * fast/selectors/nth-child-of-basics-2.html:
+ * fast/selectors/nth-child-of-basics-expected.txt:
+ * fast/selectors/nth-child-of-basics.html:
+ * fast/selectors/nth-child-of-chained-2-expected.txt:
+ * fast/selectors/nth-child-of-chained-2.html:
+ * fast/selectors/nth-child-of-complex-selectors-expected.txt:
+ * fast/selectors/nth-child-of-complex-selectors.html:
+ * fast/selectors/nth-child-of-never-matching-selector-expected.txt:
+ * fast/selectors/nth-child-of-never-matching-selector.html:
+ * fast/selectors/nth-child-of-selector-list-expected.txt:
+ * fast/selectors/nth-child-of-selector-list.html:
+ Updating the test and tests result for the new definition.
+
</ins><span class="cx"> 2014-10-10 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> [Mac] Update a Mavericks-specific baseline.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssnthchildofclassnameexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/nth-child-of-classname-expected.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/nth-child-of-classname-expected.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/css/nth-child-of-classname-expected.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -3,14 +3,14 @@
</span><span class="cx"> <body>
</span><span class="cx"> <p>This test the styling of paragraphs with :nth-child(An+B of selector). If the test succeed, paragraphs that say "green" should have a green background.</p>
</span><span class="cx"> <p class="webkit">White</p>
</span><ins>+ <p>White</p>
+ <p>White</p>
</ins><span class="cx"> <p style="background-color: lime">Green!</p>
</span><del>- <p style="background-color: lime">Green!</p>
- <p style="background-color: lime">Green!</p>
</del><span class="cx"> <p>White</p>
</span><span class="cx"> <p>White</p>
</span><span class="cx"> <p>White</p>
</span><ins>+ <p>White</p>
</ins><span class="cx"> <p style="background-color: lime">Green!</p>
</span><del>- <p style="background-color: lime">Green!</p>
</del><span class="cx"> <p>White</p>
</span><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssnthchildofclassnamehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/nth-child-of-classname.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/nth-child-of-classname.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/css/nth-child-of-classname.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -10,13 +10,13 @@
</span><span class="cx"> <body>
</span><span class="cx"> <p>This test the styling of paragraphs with :nth-child(An+B of selector). If the test succeed, paragraphs that say "green" should have a green background.</p>
</span><span class="cx"> <p class="webkit">White</p>
</span><del>- <p>Green!</p>
- <p>Green!</p>
</del><ins>+ <p>White</p>
+ <p>White</p>
</ins><span class="cx"> <p class="fast">Green!</p>
</span><span class="cx"> <p>White</p>
</span><span class="cx"> <p>White</p>
</span><span class="cx"> <p class="webkit">White</p>
</span><del>- <p>Green!</p>
</del><ins>+ <p>White</p>
</ins><span class="cx"> <p class="webkit">Green!</p>
</span><span class="cx"> <p>White</p>
</span><span class="cx"> </body>
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssnthchildofcompoundselectorexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/nth-child-of-compound-selector-expected.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/nth-child-of-compound-selector-expected.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/css/nth-child-of-compound-selector-expected.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -7,12 +7,12 @@
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <p>White!</p>
</span><ins>+ <p>White!</p>
</ins><span class="cx"> <p style="background-color: lime">Green</p>
</span><del>- <p style="background-color: lime">Green</p>
</del><span class="cx"> <p>White!</p>
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <p>White!</p>
</span><del>- <p style="background-color: lime">Green</p>
</del><ins>+ <p>White!</p>
</ins><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssnthchildofcompoundselectorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/nth-child-of-compound-selector.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/nth-child-of-compound-selector.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/css/nth-child-of-compound-selector.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -15,12 +15,12 @@
</span><span class="cx"> <p class="foobar foo">White!</p>
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <p class="foo foobar">White!</p>
</span><del>- <p>Green</p>
</del><ins>+ <p>White!</p>
</ins><span class="cx"> <p class="foobar foo">Green</p>
</span><span class="cx"> <p class="foobar">White!</p>
</span><span class="cx"> <p class="foo foobar">White!</p>
</span><span class="cx"> <p class="foobar">White!</p>
</span><span class="cx"> <p class="foo foobar baz">White!</p>
</span><del>- <p>Green</p>
</del><ins>+ <p>White!</p>
</ins><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssnthchildoftagnameexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/nth-child-of-tagname-expected.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/nth-child-of-tagname-expected.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/css/nth-child-of-tagname-expected.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -6,11 +6,11 @@
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <fast>White!</fast>
</span><del>- <p style="background-color: lime">Green</p>
- <p style="background-color: lime">Green</p>
</del><ins>+ <p>White!</p>
+ <p>White!</p>
+ <webkit style="background-color: lime">Green</webkit>
+ <p>White!</p>
</ins><span class="cx"> <webkit>White!</webkit>
</span><span class="cx"> <p>White!</p>
</span><del>- <webkit>White!</webkit>
- <p style="background-color: lime">Green</p>
</del><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssnthchildoftagnamehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/nth-child-of-tagname.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/nth-child-of-tagname.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/css/nth-child-of-tagname.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><span class="cx"> <style>
</span><del>-p:nth-child(odd of webkit, fast) {
</del><ins>+:nth-child(odd of webkit, fast) {
</ins><span class="cx"> background-color: lime;
</span><span class="cx"> }
</span><span class="cx"> </style>
</span><span class="lines">@@ -13,11 +13,11 @@
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <p>White!</p>
</span><span class="cx"> <fast>White!</fast>
</span><del>- <p>Green</p>
- <p>Green</p>
</del><ins>+ <p>White!</p>
+ <p>White!</p>
+ <webkit>Green</webkit>
+ <p>White!</p>
</ins><span class="cx"> <webkit>White!</webkit>
</span><span class="cx"> <p>White!</p>
</span><del>- <webkit>White!</webkit>
- <p>Green</p>
</del><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofbacktrackingadjacent2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-backtracking-adjacent-2.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-backtracking-adjacent-2.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-backtracking-adjacent-2.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -3,65 +3,65 @@
</span><span class="cx"> <head>
</span><span class="cx"> <script src="../../resources/js-test-pre.js"></script>
</span><span class="cx"> <style>
</span><del>-span.target {
</del><ins>+sibling.target {
</ins><span class="cx"> background-color:rgb(0,0,0);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of a + b sibling) {
</del><ins>+sibling.target:nth-child(n+2 of a + b sibling) {
</ins><span class="cx"> background-color:rgb(1,2,3);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of c + c + d sibling) {
</del><ins>+sibling.target:nth-child(n+2 of c + c + d sibling) {
</ins><span class="cx"> background-color:rgb(4,5,6);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of e + f ~ g sibling) {
</del><ins>+sibling.target:nth-child(n+2 of e + f ~ g sibling) {
</ins><span class="cx"> background-color:rgb(7,8,9);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of h + sibling) {
</del><ins>+sibling.target:nth-child(n+2 of h + sibling) {
</ins><span class="cx"> background-color:rgb(10,11,12);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of j+j+j~j>k sibling) {
</del><ins>+sibling.target:nth-child(n+2 of j+j+j~j>k sibling) {
</ins><span class="cx"> background-color:rgb(13,14,15);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of m l+l+l+l~m>m>m sibling) {
</del><ins>+sibling.target:nth-child(n+2 of m l+l+l+l~m>m>m sibling) {
</ins><span class="cx"> background-color:rgb(16,17,18);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of n o~n>n>n sibling) {
</del><ins>+sibling.target:nth-child(n+2 of n o~n>n>n sibling) {
</ins><span class="cx"> background-color:rgb(19,20,21);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of p ~ sibling) {
</del><ins>+sibling.target:nth-child(n+2 of p ~ sibling) {
</ins><span class="cx"> background-color:rgb(22,23,24);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of q ~ r sibling) {
</del><ins>+sibling.target:nth-child(n+2 of q ~ r sibling) {
</ins><span class="cx"> background-color:rgb(25,26,27);
</span><span class="cx"> }
</span><del>-span.target:nth-child(n+2 of s t+t+t+s>s>s sibling) {
</del><ins>+sibling.target:nth-child(n+2 of s t+t+t+s>s>s sibling) {
</ins><span class="cx"> background-color:rgb(28,29,30);
</span><span class="cx"> }
</span><span class="cx"> </style>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="cx"> <div style="display:none">
</span><del>- <!-- span.target:nth-child(n+2 of a + b sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of a + b sibling) -->
</ins><span class="cx"> <target1>
</span><span class="cx"> <a></a>
</span><span class="cx"> <b>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target1"></span>
</del><ins>+ <sibling class="target" id="target1"></sibling>
</ins><span class="cx"> </b>
</span><span class="cx"> </target1>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of a + b sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of a + b sibling) -->
</ins><span class="cx"> <target2>
</span><span class="cx"> <a></a>
</span><span class="cx"> <b>
</span><span class="cx"> <b></b> <!-- Fail here and restart backtracking. -->
</span><span class="cx"> <b>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target2"></span>
</del><ins>+ <sibling class="target" id="target2"></sibling>
</ins><span class="cx"> </b>
</span><span class="cx"> </b>
</span><span class="cx"> </target2>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of c + c + d sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of c + c + d sibling) -->
</ins><span class="cx"> <target3>
</span><span class="cx"> <c></c>
</span><span class="cx"> <c></c>
</span><span class="lines">@@ -73,13 +73,13 @@
</span><span class="cx"> <c></c>
</span><span class="cx"> <d>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target3"></span>
</del><ins>+ <sibling class="target" id="target3"></sibling>
</ins><span class="cx"> </d>
</span><span class="cx"> </d>
</span><span class="cx"> </d>
</span><span class="cx"> </target3>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of e + f ~ g sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of e + f ~ g sibling) -->
</ins><span class="cx"> <target4>
</span><span class="cx"> <d></d>
</span><span class="cx"> <e></e>
</span><span class="lines">@@ -91,32 +91,33 @@
</span><span class="cx"> <f></f>
</span><span class="cx"> <g>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target4"></span>
</del><ins>+ <sibling class="target" id="target4"></sibling>
</ins><span class="cx"> </g>
</span><span class="cx"> </g>
</span><span class="cx"> </target4>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</ins><span class="cx"> <target6>
</span><span class="cx"> <h></h>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target6.1"></span>
</del><ins>+ <h></h>
+ <sibling class="target" id="target6.1"></sibling>
</ins><span class="cx"> </target6>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</ins><span class="cx"> <target6>
</span><span class="cx"> <a></a>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target6.2"></span>
</del><ins>+ <sibling class="target" id="target6.2"></sibling>
</ins><span class="cx"> </target6>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</ins><span class="cx"> <target6>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target6.3"></span>
</del><ins>+ <sibling class="target" id="target6.3"></sibling>
</ins><span class="cx"> </target6>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</ins><span class="cx"> <target7>
</span><span class="cx"> <d></d> <!-- Fail here. -->
</span><span class="cx"> <j></j>
</span><span class="lines">@@ -124,11 +125,11 @@
</span><span class="cx"> <j></j>
</span><span class="cx"> <k>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target7"></span>
</del><ins>+ <sibling class="target" id="target7"></sibling>
</ins><span class="cx"> </k>
</span><span class="cx"> </target7>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of j+j+j~j>k sibling) -->
</ins><span class="cx"> <target8>
</span><span class="cx"> <j></j> <!-- Match here. -->
</span><span class="cx"> <j></j>
</span><span class="lines">@@ -140,12 +141,12 @@
</span><span class="cx"> <j>
</span><span class="cx"> <k>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target8"></span>
</del><ins>+ <sibling class="target" id="target8"></sibling>
</ins><span class="cx"> </k>
</span><span class="cx"> </j>
</span><span class="cx"> </target8>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of m l+l+l+l~m>m>m sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of m l+l+l+l~m>m>m sibling) -->
</ins><span class="cx"> <target9>
</span><span class="cx"> <m>
</span><span class="cx"> <l></l> <!-- Fail here -->
</span><span class="lines">@@ -161,7 +162,7 @@
</span><span class="cx"> <m>
</span><span class="cx"> <m>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target9"></span>
</del><ins>+ <sibling class="target" id="target9"></sibling>
</ins><span class="cx"> </m>
</span><span class="cx"> </m>
</span><span class="cx"> </m>
</span><span class="lines">@@ -169,7 +170,7 @@
</span><span class="cx"> </m>
</span><span class="cx"> </target9>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of m l+l+l+l~m>m>m sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of m l+l+l+l~m>m>m sibling) -->
</ins><span class="cx"> <target10>
</span><span class="cx"> <m>
</span><span class="cx"> <l></l> <!-- Match here -->
</span><span class="lines">@@ -186,7 +187,7 @@
</span><span class="cx"> <m>
</span><span class="cx"> <m>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target10"></span>
</del><ins>+ <sibling class="target" id="target10"></sibling>
</ins><span class="cx"> </m>
</span><span class="cx"> </m>
</span><span class="cx"> </m>
</span><span class="lines">@@ -194,7 +195,7 @@
</span><span class="cx"> </m>
</span><span class="cx"> </target10>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of n o~n>n>n sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of n o~n>n>n sibling) -->
</ins><span class="cx"> <target11>
</span><span class="cx"> <n>
</span><span class="cx"> <a></a> <!-- Fail here -->
</span><span class="lines">@@ -205,7 +206,7 @@
</span><span class="cx"> <n>
</span><span class="cx"> <n>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target11"></span>
</del><ins>+ <sibling class="target" id="target11"></sibling>
</ins><span class="cx"> </n>
</span><span class="cx"> </n>
</span><span class="cx"> </n>
</span><span class="lines">@@ -213,7 +214,7 @@
</span><span class="cx"> </n>
</span><span class="cx"> </target11>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of n o~n>n>n sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of n o~n>n>n sibling) -->
</ins><span class="cx"> <target12>
</span><span class="cx"> <n>
</span><span class="cx"> <o></o> <!-- Match here -->
</span><span class="lines">@@ -225,7 +226,7 @@
</span><span class="cx"> <n>
</span><span class="cx"> <n>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target12"></span>
</del><ins>+ <sibling class="target" id="target12"></sibling>
</ins><span class="cx"> </n>
</span><span class="cx"> </n>
</span><span class="cx"> </n>
</span><span class="lines">@@ -233,28 +234,28 @@
</span><span class="cx"> </n>
</span><span class="cx"> </target12>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of p ~ sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of p ~ sibling) -->
</ins><span class="cx"> <target13>
</span><span class="cx"> <p></p> <!-- Match here -->
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target13.1"></span>
</del><ins>+ <sibling class="target" id="target13.1"></sibling>
</ins><span class="cx"> </target13>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of p ~ sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of p ~ sibling) -->
</ins><span class="cx"> <target13>
</span><span class="cx"> <a></a> <!-- Fail here -->
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target13.2"></span>
</del><ins>+ <sibling class="target" id="target13.2"></sibling>
</ins><span class="cx"> </target13>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of p ~ sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of p ~ sibling) -->
</ins><span class="cx"> <target13>
</span><span class="cx"> <!-- Fail here -->
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target13.3"></span>
</del><ins>+ <sibling class="target" id="target13.3"></sibling>
</ins><span class="cx"> </target13>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of q ~ r sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of q ~ r sibling) -->
</ins><span class="cx"> <target14>
</span><span class="cx"> <q></q> <!-- Match here -->
</span><span class="cx"> <a></a>
</span><span class="lines">@@ -262,36 +263,36 @@
</span><span class="cx"> <a></a> <!-- Fail here -->
</span><span class="cx"> <r>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target14.1"></span>
</del><ins>+ <sibling class="target" id="target14.1"></sibling>
</ins><span class="cx"> </r>
</span><span class="cx"> </r>
</span><span class="cx"> </target14>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of q ~ r sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of q ~ r sibling) -->
</ins><span class="cx"> <target14>
</span><span class="cx"> <!-- Fail here -->
</span><span class="cx"> <r>
</span><span class="cx"> <a></a> <!-- Fail here -->
</span><span class="cx"> <r>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target14.2"></span>
</del><ins>+ <sibling class="target" id="target14.2"></sibling>
</ins><span class="cx"> </r>
</span><span class="cx"> </r>
</span><span class="cx"> </target14>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of q ~ r sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of q ~ r sibling) -->
</ins><span class="cx"> <target14>
</span><span class="cx"> <!-- Fail here -->
</span><span class="cx"> <r>
</span><span class="cx"> <!-- Fail here -->
</span><span class="cx"> <r>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target14.3"></span>
</del><ins>+ <sibling class="target" id="target14.3"></sibling>
</ins><span class="cx"> </r>
</span><span class="cx"> </r>
</span><span class="cx"> </target14>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of s t+t+t+s>s>s sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of s t+t+t+s>s>s sibling) -->
</ins><span class="cx"> <target15>
</span><span class="cx"> <s>
</span><span class="cx"> <!-- Fail here and backtrack with the tail -->
</span><span class="lines">@@ -305,7 +306,7 @@
</span><span class="cx"> <s>
</span><span class="cx"> <s>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target15"></span>
</del><ins>+ <sibling class="target" id="target15"></sibling>
</ins><span class="cx"> </s>
</span><span class="cx"> </s>
</span><span class="cx"> </s>
</span><span class="lines">@@ -313,7 +314,7 @@
</span><span class="cx"> </s>
</span><span class="cx"> </target15>
</span><span class="cx">
</span><del>- <!-- span.target:nth-child(n+2 of s t+t+t+s>s>s sibling) -->
</del><ins>+ <!-- sibling.target:nth-child(n+2 of s t+t+t+s>s>s sibling) -->
</ins><span class="cx"> <target16>
</span><span class="cx"> <s>
</span><span class="cx"> <t></t> <!-- Match here -->
</span><span class="lines">@@ -331,7 +332,7 @@
</span><span class="cx"> <s>
</span><span class="cx"> <s>
</span><span class="cx"> <sibling></sibling>
</span><del>- <span class="target" id="target16"></span>
</del><ins>+ <sibling class="target" id="target16"></sibling>
</ins><span class="cx"> </s>
</span><span class="cx"> </s>
</span><span class="cx"> </s>
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofbacktrackingadjacenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-backtracking-adjacent.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-backtracking-adjacent.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-backtracking-adjacent.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -8,31 +8,31 @@
</span><span class="cx"> color:rgb(0,0,0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-a + b:nth-child(n+2 of a + a) span.target {
</del><ins>+a + :nth-child(n+1 of a + a ~ b) span.target {
</ins><span class="cx"> background-color:rgb(1,2,3);
</span><span class="cx"> }
</span><del>-b:nth-child(n+2 of a + a) span.target {
</del><ins>+b:nth-child(n+1 of a + a ~ b) span.target {
</ins><span class="cx"> color:rgb(1,2,3);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-d:nth-child(n+2 of c + c + c) span.target {
</del><ins>+:nth-child(n+1 of c + c + c ~ d) span.target {
</ins><span class="cx"> background-color:rgb(4,5,6);
</span><span class="cx"> }
</span><del>-c + c + c + d:nth-child(n+2 of c + c + c) span.target {
</del><ins>+c + c + c + d:nth-child(n+1 of c + c + c ~ d) span.target {
</ins><span class="cx"> color:rgb(4,5,6);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-f:nth-child(n+2 of e + e) ~ g span.target {
</del><ins>+f:nth-child(n+1 of e + e ~ f) ~ g span.target {
</ins><span class="cx"> background-color:rgb(7,8,9);
</span><span class="cx"> }
</span><del>-e + f:nth-child(n+2 of e + e) ~ g span.target {
</del><ins>+e + f:nth-child(n+1 of e + e ~ f) ~ g span.target {
</ins><span class="cx"> color:rgb(7,8,9);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-span.target:nth-child(n+2 of h + h) {
</del><ins>+span.target:nth-child(n+1 of h + h ~ span.target) {
</ins><span class="cx"> background-color:rgb(10,11,12);
</span><span class="cx"> }
</span><del>-h + span.target:nth-child(n+2 of h + h) {
</del><ins>+h + span.target:nth-child(n+1 of h + h ~ span.target) {
</ins><span class="cx"> color:rgb(10,11,12);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -62,10 +62,10 @@
</span><span class="cx"> background-color:rgb(25,26,27);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-s s:nth-child(n+2 of t+t+t)>s>s span.target {
</del><ins>+s s:nth-child(n+1 of t+t+t+s)>s>s span.target {
</ins><span class="cx"> background-color:rgb(28,29,30);
</span><span class="cx"> }
</span><del>-s t+t+t+s:nth-child(n+2 of t+t+t)>s>s span.target {
</del><ins>+s t+t+t+s:nth-child(n+1 of t+t+t+s)>s>s span.target {
</ins><span class="cx"> color:rgb(28,29,30);
</span><span class="cx"> }
</span><span class="cx"> </style>
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofbasics2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-basics-2-expected.txt (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-basics-2-expected.txt        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-basics-2-expected.txt        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -361,13 +361,12 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(3 of testcaseA)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(3 of testcaseA)').length is 2
-PASS document.querySelectorAll('#test-root :nth-child(3 of testcaseA)')[0].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(3 of testcaseA)')[1].id is "testcase5"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(3 of testcaseA)').length is 1
+PASS document.querySelectorAll('#test-root :nth-child(3 of testcaseA)')[0].id is "testcase5"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -430,16 +429,15 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(4 of testcaseB)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(4 of testcaseB)').length is 2
-PASS document.querySelectorAll('#test-root :nth-child(4 of testcaseB)')[0].id is "testcase7"
-PASS document.querySelectorAll('#test-root :nth-child(4 of testcaseB)')[1].id is "testcase8"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(4 of testcaseB)').length is 1
+PASS document.querySelectorAll('#test-root :nth-child(4 of testcaseB)')[0].id is "testcase8"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -511,64 +509,50 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(n+3 of testcaseA)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)').length is 27
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[0].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[1].id is "testcase5"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[2].id is "testcase6"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[3].id is "testcase7"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[4].id is "testcase8"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[5].id is "testcase9"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[6].id is "testcase10"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[7].id is "testcase11"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[8].id is "testcase12"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[9].id is "testcase13"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[10].id is "testcase14"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[11].id is "testcase15"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[12].id is "testcase16"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[13].id is "testcase17"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[14].id is "testcase18"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[15].id is "testcase19"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[16].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[17].id is "testcase21"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[18].id is "testcase22"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[19].id is "testcase23"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[20].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[21].id is "testcase25"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[22].id is "testcase26"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[23].id is "testcase27"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[24].id is "testcase28"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[25].id is "testcase29"
-PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[26].id is "testcase30"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)').length is 13
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[0].id is "testcase5"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[1].id is "testcase7"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[2].id is "testcase9"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[3].id is "testcase11"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[4].id is "testcase13"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[5].id is "testcase15"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[6].id is "testcase17"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[7].id is "testcase19"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[8].id is "testcase21"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[9].id is "testcase23"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[10].id is "testcase25"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[11].id is "testcase27"
+PASS document.querySelectorAll('#test-root :nth-child(n+3 of testcaseA)')[12].id is "testcase29"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx">
</span><span class="cx"> Testing "testcaseA:nth-child(2n+2 of testcaseA)"
</span><span class="cx"> PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n+2 of testcaseA)').length is 7
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofbasics2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-basics-2.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-basics-2.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-basics-2.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -85,12 +85,12 @@
</span><span class="cx">
</span><span class="cx"> // Test cases inspired by the :nth-of-type() examples from http://nthmaster.com/.
</span><span class="cx"> testSelector("testcaseA:nth-child(3 of testcaseA)", ["testcase5"]);
</span><del>-testSelector(":nth-child(3 of testcaseA)", ["testcase4", "testcase5"]);
</del><ins>+testSelector(":nth-child(3 of testcaseA)", ["testcase5"]);
</ins><span class="cx"> testSelector("testcaseB:nth-child(4 of testcaseB)", ["testcase8"]);
</span><del>-testSelector(":nth-child(4 of testcaseB)", ["testcase7", "testcase8"]);
</del><ins>+testSelector(":nth-child(4 of testcaseB)", ["testcase8"]);
</ins><span class="cx">
</span><span class="cx"> testSelector("testcaseA:nth-child(n+3 of testcaseA)", ["testcase5", "testcase7", "testcase9", "testcase11", "testcase13", "testcase15", "testcase17", "testcase19", "testcase21", "testcase23", "testcase25", "testcase27", "testcase29"]);
</span><del>-testSelector(":nth-child(n+3 of testcaseA)", ["testcase4", "testcase5", "testcase6", "testcase7", "testcase8", "testcase9", "testcase10", "testcase11", "testcase12", "testcase13", "testcase14", "testcase15", "testcase16", "testcase17", "testcase18", "testcase19", "testcase20", "testcase21", "testcase22", "testcase23", "testcase24", "testcase25", "testcase26", "testcase27", "testcase28", "testcase29", "testcase30"]);
</del><ins>+testSelector(":nth-child(n+3 of testcaseA)", ["testcase5", "testcase7", "testcase9", "testcase11", "testcase13", "testcase15", "testcase17", "testcase19", "testcase21", "testcase23", "testcase25", "testcase27", "testcase29"]);
</ins><span class="cx">
</span><span class="cx"> testSelector("testcaseA:nth-child(2n+2 of testcaseA)", ["testcase3", "testcase7", "testcase11", "testcase15", "testcase19", "testcase23", "testcase27"]);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofbasicsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-basics-expected.txt (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-basics-expected.txt        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-basics-expected.txt        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -52,76 +52,65 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(2n + 1 of testcaseA)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)').length is 15
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)').length is 8
</ins><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[0].id is "testcase1"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[1].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[2].id is "testcase5"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[3].id is "testcase8"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[4].id is "testcase9"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[5].id is "testcase12"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[6].id is "testcase13"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[7].id is "testcase16"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[8].id is "testcase17"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[9].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[10].id is "testcase21"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[11].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[12].id is "testcase25"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[13].id is "testcase28"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[14].id is "testcase29"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[1].id is "testcase5"
+PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[2].id is "testcase9"
+PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[3].id is "testcase13"
+PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[4].id is "testcase17"
+PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[5].id is "testcase21"
+PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[6].id is "testcase25"
+PASS document.querySelectorAll('#test-root :nth-child(2n + 1 of testcaseA)')[7].id is "testcase29"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(3n - 2 of [attribute1=value1])"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])').length is 12
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])').length is 8
</ins><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[0].id is "testcase1"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[1].id is "testcase5"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[2].id is "testcase6"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[3].id is "testcase9"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[4].id is "testcase10"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[5].id is "testcase13"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[6].id is "testcase17"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[7].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[8].id is "testcase21"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[9].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[10].id is "testcase27"
-PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[11].id is "testcase28"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[1].id is "testcase6"
+PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[2].id is "testcase10"
+PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[3].id is "testcase13"
+PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[4].id is "testcase17"
+PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[5].id is "testcase21"
+PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[6].id is "testcase24"
+PASS document.querySelectorAll('#test-root :nth-child(3n - 2 of [attribute1=value1])')[7].id is "testcase28"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -132,29 +121,28 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(4n - 1 of .bar)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)').length is 6
-PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[0].id is "testcase3"
-PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[1].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[2].id is "testcase10"
-PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[3].id is "testcase15"
-PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[4].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[5].id is "testcase25"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)').length is 5
+PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[0].id is "testcase4"
+PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[1].id is "testcase10"
+PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[2].id is "testcase15"
+PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[3].id is "testcase20"
+PASS document.querySelectorAll('#test-root :nth-child(4n - 1 of .bar)')[4].id is "testcase25"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -184,28 +172,17 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(2n + 2 of :empty)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)').length is 13
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[0].id is "testcase3"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[1].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[2].id is "testcase5"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[3].id is "testcase6"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[4].id is "testcase7"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[5].id is "testcase8"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[6].id is "testcase9"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[7].id is "testcase22"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[8].id is "testcase23"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[9].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[10].id is "testcase25"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[11].id is "testcase26"
-PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[12].id is "testcase27"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)').length is 2
+PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[0].id is "testcase9"
+PASS document.querySelectorAll('#test-root :nth-child(2n + 2 of :empty)')[1].id is "testcase27"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -219,11 +196,11 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -270,15 +247,13 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing "testcaseA:nth-child(even of testcaseA.bazoo)"
</span><del>-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)').length is 8
</del><ins>+PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)').length is 6
</ins><span class="cx"> PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[0].id is "testcase3"
</span><span class="cx"> PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[1].id is "testcase7"
</span><del>-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[2].id is "testcase11"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[3].id is "testcase13"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[4].id is "testcase17"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[5].id is "testcase21"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[6].id is "testcase23"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[7].id is "testcase29"
</del><ins>+PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[2].id is "testcase13"
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[3].id is "testcase17"
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[4].id is "testcase23"
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of testcaseA.bazoo)')[5].id is "testcase29"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="lines">@@ -289,7 +264,7 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -299,7 +274,7 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -391,16 +366,14 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx">
</span><span class="cx"> Testing "testcaseA:nth-child(even of .bar.foo)"
</span><del>-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of .bar.foo)').length is 4
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of .bar.foo)')[0].id is "testcase5"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of .bar.foo)')[1].id is "testcase13"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of .bar.foo)')[2].id is "testcase21"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of .bar.foo)')[3].id is "testcase25"
</del><ins>+PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of .bar.foo)').length is 2
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of .bar.foo)')[0].id is "testcase21"
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(even of .bar.foo)')[1].id is "testcase25"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -408,7 +381,7 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -428,21 +401,10 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing "*:nth-child(3n+1 of [id][attribute2^="value"].bazoo)"
</span><del>-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)').length is 13
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[0].id is "testcase1"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[1].id is "testcase2"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[2].id is "testcase10"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[3].id is "testcase11"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[4].id is "testcase12"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[5].id is "testcase13"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[6].id is "testcase14"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[7].id is "testcase15"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[8].id is "testcase16"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[9].id is "testcase17"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[10].id is "testcase18"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[11].id is "testcase19"
-PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[12].id is "testcase20"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)').length is 2
+PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[0].id is "testcase2"
+PASS document.querySelectorAll('#test-root *:nth-child(3n+1 of [id][attribute2^="value"].bazoo)')[1].id is "testcase20"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -451,16 +413,16 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -474,11 +436,8 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)"
</span><del>-PASS document.querySelectorAll('#test-root :-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)').length is 4
-PASS document.querySelectorAll('#test-root :-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)')[0].id is "testcase23"
-PASS document.querySelectorAll('#test-root :-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)')[1].id is "testcase25"
-PASS document.querySelectorAll('#test-root :-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)')[2].id is "testcase27"
-PASS document.querySelectorAll('#test-root :-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)')[3].id is "testcase29"
</del><ins>+PASS document.querySelectorAll('#test-root :-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)').length is 1
+PASS document.querySelectorAll('#test-root :-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)')[0].id is "testcase27"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -501,31 +460,25 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing "*:nth-child(even of :nth-child(odd of [attribute2]))"
</span><del>-PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))').length is 7
-PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))')[0].id is "testcase2"
-PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))')[1].id is "testcase7"
-PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))')[2].id is "testcase9"
-PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))')[3].id is "testcase16"
-PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))')[4].id is "testcase18"
-PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))')[5].id is "testcase20"
-PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))')[6].id is "testcase29"
</del><ins>+PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))').length is 1
+PASS document.querySelectorAll('#test-root *:nth-child(even of :nth-child(odd of [attribute2]))')[0].id is "testcase9"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -534,11 +487,11 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -547,7 +500,7 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofbasicshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-basics.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-basics.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-basics.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -79,16 +79,16 @@
</span><span class="cx"> /* -- Some generic tests for primitive selectors. -- */
</span><span class="cx">
</span><span class="cx"> // Even of a tag name.
</span><del>-testSelector(":nth-child(2n + 1 of testcaseA)", ["testcase1", "testcase4", "testcase5", "testcase8", "testcase9", "testcase12", "testcase13", "testcase16", "testcase17", "testcase20", "testcase21", "testcase24", "testcase25", "testcase28", "testcase29"]);
</del><ins>+testSelector(":nth-child(2n + 1 of testcaseA)", ["testcase1", "testcase5", "testcase9", "testcase13", "testcase17", "testcase21", "testcase25", "testcase29"]);
</ins><span class="cx">
</span><span class="cx"> // Attribute.
</span><del>-testSelector(":nth-child(3n - 2 of [attribute1=value1])", ["testcase1", "testcase5", "testcase6", "testcase9", "testcase10", "testcase13", "testcase17", "testcase20", "testcase21", "testcase24", "testcase27", "testcase28"]);
</del><ins>+testSelector(":nth-child(3n - 2 of [attribute1=value1])", ["testcase1", "testcase6", "testcase10", "testcase13", "testcase17", "testcase21", "testcase24", "testcase28"]);
</ins><span class="cx">
</span><span class="cx"> // Class.
</span><del>-testSelector(":nth-child(4n - 1 of .bar)", ["testcase3", "testcase4", "testcase10", "testcase15", "testcase20", "testcase25"]);
</del><ins>+testSelector(":nth-child(4n - 1 of .bar)", ["testcase4", "testcase10", "testcase15", "testcase20", "testcase25"]);
</ins><span class="cx">
</span><span class="cx"> // Value.
</span><del>-testSelector(":nth-child(2n + 2 of :empty)", ["testcase3", "testcase4", "testcase5", "testcase6", "testcase7", "testcase8", "testcase9", "testcase22", "testcase23", "testcase24", "testcase25", "testcase26", "testcase27"]);
</del><ins>+testSelector(":nth-child(2n + 2 of :empty)", ["testcase9", "testcase27"]);
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /* -- In practice, we expect a lot of filtering will be done on the same type. -- */
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> testSelector("testcaseA:nth-child(even of testcaseA)", ["testcase3", "testcase7", "testcase11", "testcase15", "testcase19", "testcase23", "testcase27"]);
</span><span class="cx">
</span><span class="cx"> // All the testcaseA with an odd number of testcaseA.bazoo before it.
</span><del>-testSelector("testcaseA:nth-child(even of testcaseA.bazoo)", ["testcase3", "testcase7", "testcase11", "testcase13", "testcase17", "testcase21", "testcase23", "testcase29"]);
</del><ins>+testSelector("testcaseA:nth-child(even of testcaseA.bazoo)", ["testcase3", "testcase7", "testcase13", "testcase17", "testcase23", "testcase29"]);
</ins><span class="cx">
</span><span class="cx"> // Odd of [attribute2].
</span><span class="cx"> testSelector("[attribute2]:nth-child(odd of [attribute2])", ["testcase2", "testcase9", "testcase20"]);
</span><span class="lines">@@ -107,10 +107,10 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> /* -- Compound selectors -- */
</span><del>-testSelector("testcaseA:nth-child(even of .bar.foo)", ["testcase5", "testcase13", "testcase21", "testcase25"]);
-testSelector('*:nth-child(3n+1 of [id][attribute2^="value"].bazoo)', ["testcase1", "testcase2", "testcase10", "testcase11", "testcase12", "testcase13", "testcase14", "testcase15", "testcase16", "testcase17", "testcase18", "testcase19", "testcase20"]);
-testSelector(':-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)', ["testcase23", "testcase25", "testcase27", "testcase29"]);
-testSelector('*:nth-child(even of :nth-child(odd of [attribute2]))', ["testcase2", "testcase7", "testcase9", "testcase16", "testcase18", "testcase20", "testcase29"]);
</del><ins>+testSelector("testcaseA:nth-child(even of .bar.foo)", ["testcase21", "testcase25"]);
+testSelector('*:nth-child(3n+1 of [id][attribute2^="value"].bazoo)', ["testcase2", "testcase20"]);
+testSelector(':-webkit-any(testcaseA, dontExist):nth-child(n+3 of .foo:empty)', ["testcase27"]);
+testSelector('*:nth-child(even of :nth-child(odd of [attribute2]))', ["testcase9"]);
</ins><span class="cx"> </script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofchained2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-chained-2-expected.txt (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-chained-2-expected.txt        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-chained-2-expected.txt        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -44,20 +44,18 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing "testcaseA:nth-child(2n of [attribute1])"
</span><del>-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])').length is 8
</del><ins>+PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])').length is 6
</ins><span class="cx"> PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[0].id is "testcase3"
</span><del>-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[1].id is "testcase5"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[2].id is "testcase11"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[3].id is "testcase13"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[4].id is "testcase21"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[5].id is "testcase23"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[6].id is "testcase25"
-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[7].id is "testcase27"
</del><ins>+PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[1].id is "testcase11"
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[2].id is "testcase13"
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[3].id is "testcase21"
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[4].id is "testcase23"
+PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[5].id is "testcase25"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -79,17 +77,16 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing "testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])"
</span><del>-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])').length is 4
</del><ins>+PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])').length is 3
</ins><span class="cx"> PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])')[0].id is "testcase3"
</span><span class="cx"> PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])')[1].id is "testcase11"
</span><span class="cx"> PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])')[2].id is "testcase23"
</span><del>-PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])')[3].id is "testcase27"
</del><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="lines">@@ -116,7 +113,7 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofchained2html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-chained-2.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-chained-2.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-chained-2.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -74,10 +74,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> testSelector("testcaseA:nth-child(2n of testcaseA)", ["testcase3", "testcase7", "testcase11", "testcase15", "testcase19", "testcase23", "testcase27"]);
</span><del>-testSelector("testcaseA:nth-child(2n of [attribute1])", ["testcase3", "testcase5", "testcase11", "testcase13", "testcase21", "testcase23", "testcase25", "testcase27"]);
</del><ins>+testSelector("testcaseA:nth-child(2n of [attribute1])", ["testcase3", "testcase11", "testcase13", "testcase21", "testcase23", "testcase25"]);
</ins><span class="cx">
</span><span class="cx"> // This should be the conjunction of the two selectors, which should return the intersection of the results.
</span><del>-testSelector("testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])", ["testcase3", "testcase11", "testcase23", "testcase27"]);
</del><ins>+testSelector("testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])", ["testcase3", "testcase11", "testcase23"]);
</ins><span class="cx">
</span><span class="cx"> // This is the disjunction of the selectors. Due to the counting, it is not the union of the previous results.
</span><span class="cx"> testSelector("testcaseA:nth-child(2n of testcaseA, [attribute1])", ["testcase3", "testcase5", "testcase7", "testcase9", "testcase11", "testcase13", "testcase21", "testcase23", "testcase25", "testcase27", "testcase29"]);
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofchained3expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/nth-child-of-chained-3-expected.txt (0 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-chained-3-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-chained-3-expected.txt        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -0,0 +1,264 @@
</span><ins>+Test the chaining of multiple :nth-child(An+B of selector) does match every one of the selector.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing "testcaseA.foo[id]"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]').length is 12
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[0].id is "testcase3"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[1].id is "testcase5"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[2].id is "testcase9"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[3].id is "testcase11"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[4].id is "testcase13"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[5].id is "testcase15"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[6].id is "testcase19"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[7].id is "testcase21"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[8].id is "testcase23"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[9].id is "testcase25"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[10].id is "testcase27"
+PASS document.querySelectorAll('#test-root testcaseA.foo[id]')[11].id is "testcase29"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
+
+Testing ":nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])').length is 12
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[0].id is "testcase3"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[1].id is "testcase5"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[2].id is "testcase9"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[3].id is "testcase11"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[4].id is "testcase13"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[5].id is "testcase15"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[6].id is "testcase19"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[7].id is "testcase21"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[8].id is "testcase23"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[9].id is "testcase25"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[10].id is "testcase27"
+PASS document.querySelectorAll('#test-root :nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])')[11].id is "testcase29"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
+
+Testing ":nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])').length is 12
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[0].id is "testcase3"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[1].id is "testcase5"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[2].id is "testcase9"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[3].id is "testcase11"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[4].id is "testcase13"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[5].id is "testcase15"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[6].id is "testcase19"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[7].id is "testcase21"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[8].id is "testcase23"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[9].id is "testcase25"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[10].id is "testcase27"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])')[11].id is "testcase29"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
+
+Testing ":nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])').length is 12
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[0].id is "testcase3"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[1].id is "testcase5"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[2].id is "testcase9"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[3].id is "testcase11"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[4].id is "testcase13"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[5].id is "testcase15"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[6].id is "testcase19"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[7].id is "testcase21"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[8].id is "testcase23"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[9].id is "testcase25"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[10].id is "testcase27"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])')[11].id is "testcase29"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
+
+Testing ":nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])').length is 6
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[0].id is "testcase3"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[1].id is "testcase11"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[2].id is "testcase15"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[3].id is "testcase19"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[4].id is "testcase23"
+PASS document.querySelectorAll('#test-root :nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[5].id is "testcase27"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
+
+Testing ":nth-child(2n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])"
+PASS document.querySelectorAll('#test-root :nth-child(2n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])').length is 3
+PASS document.querySelectorAll('#test-root :nth-child(2n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[0].id is "testcase3"
+PASS document.querySelectorAll('#test-root :nth-child(2n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[1].id is "testcase15"
+PASS document.querySelectorAll('#test-root :nth-child(2n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])')[2].id is "testcase27"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofchained3html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/nth-child-of-chained-3.html (0 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-chained-3.html         (rev 0)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-chained-3.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -0,0 +1,86 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<style>
+#test-root * {
+ background-color: red;
+}
+</style>
+<style id="style">
+</style>
+</head>
+<body>
+ <div style="display:none" id="test-root">
+ <testcaseA id="testcase1" attribute1="value1" class="bar baz bazoo" attribute3="value3">Not empty</testcaseA>
+ <testcaseB id="testcase2" class="bar baz bazoo" attribute2="value2" attribute3="value3"></testcaseB>
+ <testcaseA id="testcase3" attribute1="value1" class="foo baz bazoo">Not empty</testcaseA>
+ <testcaseB id="testcase4" attribute1="value1" class="foo bar bazoo">Not empty</testcaseB>
+ <testcaseA id="testcase5" class="foo baz bazoo" attribute2="value2" attribute3="value3">Not empty</testcaseA>
+ <testcaseB id="testcase6" attribute1="value1" class="foo bar baz" attribute3="value3">Not empty</testcaseB>
+ <testcaseA id="testcase7" attribute1="value1" class="bar baz bazoo">Not empty</testcaseA>
+ <testcaseB id="testcase8" attribute1="value1" class="foo baz bazoo">Not empty</testcaseB>
+ <testcaseA id="testcase9" class="foo bar bazoo" attribute2="value2" attribute3="value3"></testcaseA>
+ <testcaseB id="testcase10" attribute1="value1" class="foo bar bazoo" attribute3="value3">Not empty</testcaseB>
+ <testcaseA id="testcase11" attribute1="value1" class="foo bar baz">Not empty</testcaseA>
+ <testcaseB id="testcase12" attribute1="value1" class="bar baz bazoo">Not empty</testcaseB>
+ <testcaseA id="testcase13" attribute1="value1" class="foo baz bazoo" attribute3="value3">Not empty</testcaseA>
+ <testcaseB id="testcase14" class="foo bar baz" attribute2="value2">Not empty</testcaseB>
+ <testcaseA id="testcase15" attribute1="value1" class="foo bar bazoo">Not empty</testcaseA>
+ <testcaseB id="testcase16" attribute1="value1" class="foo bar baz" attribute3="value3">Not empty</testcaseB>
+ <testcaseA id="testcase17" attribute1="value1" class="bar baz bazoo" attribute3="value3">Not empty</testcaseA>
+ <testcaseB id="testcase18" attribute1="value1" class="foo baz bazoo">Not empty</testcaseB>
+ <testcaseA id="testcase19" attribute1="value1" class="foo bar bazoo">Not empty</testcaseA>
+ <testcaseB id="testcase20" class="bar baz bazoo" attribute2="value2" attribute3="value3">Not empty</testcaseB>
+ <testcaseA id="testcase21" attribute1="value1" class="foo bar baz" attribute3="value3"></testcaseA>
+ <testcaseB id="testcase22" attribute1="value1" class="bar baz bazoo">Not empty</testcaseB>
+ <testcaseA id="testcase23" attribute1="value1" class="foo baz bazoo">Not empty</testcaseA>
+ <testcaseB id="testcase24" attribute1="value1" class="foo bar bazoo" attribute3="value3">Not empty</testcaseB>
+ <testcaseA id="testcase25" attribute1="value1" class="foo bar baz" attribute3="value3">Not empty</testcaseA>
+ <testcaseB id="testcase26" attribute1="value1" class="bar baz bazoo">Not empty</testcaseB>
+ <testcaseA id="testcase27" class="foo baz bazoo" attribute2="value2"></testcaseA>
+ <testcaseB id="testcase28" attribute1="value1" class="foo baz bazoo" attribute3="value3">Not empty</testcaseB>
+ <testcaseA id="testcase29" attribute1="value1" class="foo bar bazoo">Not empty</testcaseA>
+ <testcaseB id="testcase30" attribute1="value1" class="foo bar baz">Not empty</testcaseB>
+ </div>
+</body>
+<script>
+description('Test the chaining of multiple :nth-child(An+B of selector) does match every one of the selector.');
+
+function testQuerySelector(selector, expectedIds) {
+ shouldBe("document.querySelectorAll('" + selector + "').length", '' + expectedIds.length);
+ for (var i = 0; i < expectedIds.length; ++i)
+ shouldBeEqualToString("document.querySelectorAll('" + selector + "')[" + i + "].id", expectedIds[i]);
+}
+
+function testStyling(selector, expectedIds) {
+ var stylingElement = document.getElementById("style");
+ stylingElement.innerHTML = '' + selector + ' { background-color: rgb(10, 100, 200); }';
+
+ var allTestCases = document.querySelectorAll("#test-root *");
+ for (var i = 0; i < allTestCases.length; ++i) {
+ var expectMatch = expectedIds.indexOf(allTestCases[i].id) >= 0;
+ shouldBeEqualToString('getComputedStyle(document.querySelectorAll("#test-root *")[' + i + ']).backgroundColor', expectMatch ? 'rgb(10, 100, 200)' : 'rgb(255, 0, 0)');
+ }
+
+ stylingElement.innerHTML = '';
+}
+
+function testSelector(selector, expectedIds) {
+ debug("Testing \"" + selector + "\"");
+ testQuerySelector("#test-root " + selector, expectedIds);
+ testStyling("#test-root " + selector, expectedIds);
+ debug("");
+}
+
+// Using n and n+1 are interesting because they always match regardless of the siblings. But since the definition of :nth-child(An+B) include the current element, at least that one needs to match.
+testSelector("testcaseA.foo[id]", ["testcase3", "testcase5", "testcase9", "testcase11", "testcase13", "testcase15", "testcase19", "testcase21", "testcase23", "testcase25", "testcase27", "testcase29"]);
+testSelector(":nth-child(n of .foo):nth-child(n of testcaseA):nth-child(n of [id])", ["testcase3", "testcase5", "testcase9", "testcase11", "testcase13", "testcase15", "testcase19", "testcase21", "testcase23", "testcase25", "testcase27", "testcase29"]);
+testSelector(":nth-child(n+1 of .foo):nth-child(n of testcaseA):nth-child(n+1 of [id])", ["testcase3", "testcase5", "testcase9", "testcase11", "testcase13", "testcase15", "testcase19", "testcase21", "testcase23", "testcase25", "testcase27", "testcase29"]);
+testSelector(":nth-child(n+1 of .foo):nth-child(n+1 of testcaseA):nth-child(n of [id])", ["testcase3", "testcase5", "testcase9", "testcase11", "testcase13", "testcase15", "testcase19", "testcase21", "testcase23", "testcase25", "testcase27", "testcase29"]);
+
+testSelector(":nth-child(n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])", ["testcase3", "testcase11", "testcase15", "testcase19", "testcase23", "testcase27"]);
+testSelector(":nth-child(2n+1 of .foo):nth-child(2n of testcaseA):nth-child(n of [id])", ["testcase3", "testcase15", "testcase27"]);
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofcomplexselectorsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-complex-selectors-expected.txt (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-complex-selectors-expected.txt        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-complex-selectors-expected.txt        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -4,23 +4,20 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(2n of :root parent1>testcaseA)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)').length is 5
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)')[0].id is "target2"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)')[1].id is "target3"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)')[2].id is "target6"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)')[3].id is "target7"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)')[4].id is "target10"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)').length is 2
+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)')[0].id is "target3"
+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent1>testcaseA)')[1].id is "target7"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -34,12 +31,9 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(2n of :root parent2>.foo)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)').length is 5
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)')[0].id is "target12"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)')[1].id is "target13"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)')[2].id is "target16"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)')[3].id is "target17"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)')[4].id is "target20"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)').length is 2
+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)')[0].id is "target13"
+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo)')[1].id is "target17"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -53,79 +47,67 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx">
</span><span class="cx"> Testing ":nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)').length is 10
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[0].id is "target2"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[1].id is "target3"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[2].id is "target6"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[3].id is "target7"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[4].id is "target10"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[5].id is "target12"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[6].id is "target13"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[7].id is "target16"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[8].id is "target17"
-PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[9].id is "target20"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)').length is 4
+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[0].id is "target3"
+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[1].id is "target7"
+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[2].id is "target13"
+PASS document.querySelectorAll('#test-root :nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)')[3].id is "target17"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx">
</span><span class="cx"> Testing "> * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)"
</span><del>-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)').length is 12
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[0].id is "target1"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[1].id is "target2"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[2].id is "target3"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[3].id is "target4"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[4].id is "target7"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[5].id is "target8"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[6].id is "target11"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[7].id is "target12"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[8].id is "target13"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[9].id is "target15"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[10].id is "target17"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[11].id is "target19"
</del><ins>+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)').length is 6
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[0].id is "target4"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[1].id is "target8"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[2].id is "target13"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[3].id is "target15"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[4].id is "target17"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)')[5].id is "target19"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="lines">@@ -136,66 +118,50 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing "> * > *:nth-child(2n+1 of html .foo)"
</span><del>-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)').length is 15
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[0].id is "target1"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[1].id is "target2"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[2].id is "target3"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[3].id is "target4"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[4].id is "target5"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[5].id is "target6"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[6].id is "target7"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[7].id is "target8"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[8].id is "target9"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[9].id is "target10"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[10].id is "target11"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[11].id is "target14"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[12].id is "target15"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[13].id is "target18"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[14].id is "target19"
</del><ins>+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)').length is 3
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[0].id is "target11"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[1].id is "target15"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html .foo)')[2].id is "target19"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing "> * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)"
</span><del>-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)').length is 11
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[0].id is "target1"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[1].id is "target2"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[2].id is "target3"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[3].id is "target4"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[4].id is "target7"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[5].id is "target8"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[6].id is "target11"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[7].id is "target14"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[8].id is "target16"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[9].id is "target18"
-PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[10].id is "target20"
</del><ins>+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)').length is 7
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[0].id is "target4"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[1].id is "target8"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[2].id is "target11"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[3].id is "target14"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[4].id is "target16"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[5].id is "target18"
+PASS document.querySelectorAll('#test-root > * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)')[6].id is "target20"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofcomplexselectorshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-complex-selectors.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-complex-selectors.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-complex-selectors.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -67,19 +67,19 @@
</span><span class="cx"> debug("");
</span><span class="cx"> }
</span><span class="cx">
</span><del>-testSelector(':nth-child(2n of :root parent1>testcaseA)', ["target2", "target3", "target6", "target7", "target10"]);
</del><ins>+testSelector(':nth-child(2n of :root parent1>testcaseA)', ["target3", "target7"]);
</ins><span class="cx">
</span><del>-testSelector(':nth-child(2n of :root parent2>.foo)', ["target12", "target13", "target16", "target17", "target20"]);
</del><ins>+testSelector(':nth-child(2n of :root parent2>.foo)', ["target13", "target17"]);
</ins><span class="cx">
</span><span class="cx"> // Since the two above are disjoint sets, the combined selector should match the combined results.
</span><del>-testSelector(':nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)', ["target2", "target3", "target6", "target7", "target10", "target12", "target13", "target16", "target17", "target20"]);
</del><ins>+testSelector(':nth-child(2n of :root parent2>.foo, :root parent1>testcaseA)', ["target3", "target7", "target13", "target17"]);
</ins><span class="cx">
</span><span class="cx">
</span><del>-testSelector('> * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)', ["target1", "target2", "target3", "target4", "target7", "target8", "target11", "target12", "target13", "target15", "target17", "target19"]);
</del><ins>+testSelector('> * > *:nth-child(2n + 1 of html div testcaseA~testcaseA + *)', ["target4", "target8", "target13", "target15", "target17", "target19"]);
</ins><span class="cx">
</span><del>-testSelector('> * > *:nth-child(2n+1 of html .foo)', ["target1", "target2", "target3", "target4", "target5", "target6", "target7", "target8", "target9", "target10", "target11", "target14", "target15", "target18", "target19"]);
</del><ins>+testSelector('> * > *:nth-child(2n+1 of html .foo)', ["target11", "target15", "target19"]);
</ins><span class="cx">
</span><del>-testSelector('> * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)', ["target1", "target2", "target3", "target4", "target7", "target8", "target11", "target14", "target16", "target18", "target20"]);
</del><ins>+testSelector('> * > *:nth-child(2n+1 of html div testcaseA~testcaseA + *, html .foo)', ["target4", "target8", "target11", "target14", "target16", "target18", "target20"]);
</ins><span class="cx">
</span><span class="cx"> </script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofnevermatchingselectorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-never-matching-selector-expected.txt (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-never-matching-selector-expected.txt        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-never-matching-selector-expected.txt        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -70,193 +70,103 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(1 of :not(*))"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))').length is 30
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[0].id is "testcase1"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[1].id is "testcase2"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[2].id is "testcase3"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[3].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[4].id is "testcase5"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[5].id is "testcase6"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[6].id is "testcase7"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[7].id is "testcase8"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[8].id is "testcase9"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[9].id is "testcase10"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[10].id is "testcase11"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[11].id is "testcase12"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[12].id is "testcase13"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[13].id is "testcase14"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[14].id is "testcase15"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[15].id is "testcase16"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[16].id is "testcase17"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[17].id is "testcase18"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[18].id is "testcase19"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[19].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[20].id is "testcase21"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[21].id is "testcase22"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[22].id is "testcase23"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[23].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[24].id is "testcase25"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[25].id is "testcase26"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[26].id is "testcase27"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[27].id is "testcase28"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[28].id is "testcase29"
-PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))')[29].id is "testcase30"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(1 of :not(*))').length is 0
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx">
</span><span class="cx"> Testing ":nth-child(n of :not(*))"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))').length is 30
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[0].id is "testcase1"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[1].id is "testcase2"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[2].id is "testcase3"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[3].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[4].id is "testcase5"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[5].id is "testcase6"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[6].id is "testcase7"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[7].id is "testcase8"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[8].id is "testcase9"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[9].id is "testcase10"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[10].id is "testcase11"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[11].id is "testcase12"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[12].id is "testcase13"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[13].id is "testcase14"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[14].id is "testcase15"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[15].id is "testcase16"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[16].id is "testcase17"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[17].id is "testcase18"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[18].id is "testcase19"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[19].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[20].id is "testcase21"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[21].id is "testcase22"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[22].id is "testcase23"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[23].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[24].id is "testcase25"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[25].id is "testcase26"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[26].id is "testcase27"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[27].id is "testcase28"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[28].id is "testcase29"
-PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))')[29].id is "testcase30"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(n of :not(*))').length is 0
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx">
</span><span class="cx"> Testing ":nth-child(n-99999 of :not(*))"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))').length is 30
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[0].id is "testcase1"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[1].id is "testcase2"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[2].id is "testcase3"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[3].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[4].id is "testcase5"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[5].id is "testcase6"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[6].id is "testcase7"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[7].id is "testcase8"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[8].id is "testcase9"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[9].id is "testcase10"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[10].id is "testcase11"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[11].id is "testcase12"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[12].id is "testcase13"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[13].id is "testcase14"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[14].id is "testcase15"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[15].id is "testcase16"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[16].id is "testcase17"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[17].id is "testcase18"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[18].id is "testcase19"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[19].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[20].id is "testcase21"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[21].id is "testcase22"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[22].id is "testcase23"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[23].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[24].id is "testcase25"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[25].id is "testcase26"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[26].id is "testcase27"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[27].id is "testcase28"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[28].id is "testcase29"
-PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))')[29].id is "testcase30"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(n-99999 of :not(*))').length is 0
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx">
</span><span class="cx"> Testing ":nth-child(n+2 of [attribute4])"
</span><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(n+2 of [attribute4])').length is 0
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofnevermatchingselectorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-never-matching-selector.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-never-matching-selector.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-never-matching-selector.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -77,9 +77,9 @@
</span><span class="cx"> testSelector(":nth-child(n+2 of :not(*))", []);
</span><span class="cx">
</span><span class="cx"> // The count of previous sibling must be An+B-1. A never matching selector always satisfies this.
</span><del>-testSelector(":nth-child(1 of :not(*))", ['testcase1', 'testcase2', 'testcase3', 'testcase4', 'testcase5', 'testcase6', 'testcase7', 'testcase8', 'testcase9', 'testcase10', 'testcase11', 'testcase12', 'testcase13', 'testcase14', 'testcase15', 'testcase16', 'testcase17', 'testcase18', 'testcase19', 'testcase20', 'testcase21', 'testcase22', 'testcase23', 'testcase24', 'testcase25', 'testcase26', 'testcase27', 'testcase28', 'testcase29', 'testcase30']);
-testSelector(":nth-child(n of :not(*))", ['testcase1', 'testcase2', 'testcase3', 'testcase4', 'testcase5', 'testcase6', 'testcase7', 'testcase8', 'testcase9', 'testcase10', 'testcase11', 'testcase12', 'testcase13', 'testcase14', 'testcase15', 'testcase16', 'testcase17', 'testcase18', 'testcase19', 'testcase20', 'testcase21', 'testcase22', 'testcase23', 'testcase24', 'testcase25', 'testcase26', 'testcase27', 'testcase28', 'testcase29', 'testcase30']);
-testSelector(":nth-child(n-99999 of :not(*))", ['testcase1', 'testcase2', 'testcase3', 'testcase4', 'testcase5', 'testcase6', 'testcase7', 'testcase8', 'testcase9', 'testcase10', 'testcase11', 'testcase12', 'testcase13', 'testcase14', 'testcase15', 'testcase16', 'testcase17', 'testcase18', 'testcase19', 'testcase20', 'testcase21', 'testcase22', 'testcase23', 'testcase24', 'testcase25', 'testcase26', 'testcase27', 'testcase28', 'testcase29', 'testcase30']);
</del><ins>+testSelector(":nth-child(1 of :not(*))", []);
+testSelector(":nth-child(n of :not(*))", []);
+testSelector(":nth-child(n-99999 of :not(*))", []);
</ins><span class="cx">
</span><span class="cx"> // Selectors that could match but do not match in this particular document.
</span><span class="cx"> testSelector(":nth-child(n+2 of [attribute4])", []);
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofselectorlistexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-selector-list-expected.txt (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-selector-list-expected.txt        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-selector-list-expected.txt        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -229,23 +229,14 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx">
</span><span class="cx"> Testing ":nth-child(even of [attribute3$="3"], :empty)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)').length is 16
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)').length is 7
</ins><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[0].id is "testcase2"
</span><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[1].id is "testcase6"
</span><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[2].id is "testcase10"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[3].id is "testcase14"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[4].id is "testcase15"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[5].id is "testcase16"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[6].id is "testcase18"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[7].id is "testcase19"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[8].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[9].id is "testcase22"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[10].id is "testcase23"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[11].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[12].id is "testcase26"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[13].id is "testcase27"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[14].id is "testcase29"
-PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[15].id is "testcase30"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[3].id is "testcase16"
+PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[4].id is "testcase20"
+PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[5].id is "testcase24"
+PASS document.querySelectorAll('#test-root :nth-child(even of [attribute3$="3"], :empty)')[6].id is "testcase27"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -259,42 +250,33 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx">
</span><span class="cx"> Testing ":nth-child(even of [id][attribute3$="3"], [id]:empty)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)').length is 16
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)').length is 7
</ins><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[0].id is "testcase2"
</span><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[1].id is "testcase6"
</span><span class="cx"> PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[2].id is "testcase10"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[3].id is "testcase14"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[4].id is "testcase15"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[5].id is "testcase16"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[6].id is "testcase18"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[7].id is "testcase19"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[8].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[9].id is "testcase22"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[10].id is "testcase23"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[11].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[12].id is "testcase26"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[13].id is "testcase27"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[14].id is "testcase29"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[15].id is "testcase30"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[3].id is "testcase16"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[4].id is "testcase20"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[5].id is "testcase24"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute3$="3"], [id]:empty)')[6].id is "testcase27"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="lines">@@ -308,44 +290,38 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx">
</span><span class="cx"> Testing ":nth-child(even of [id][attribute2*="alue"], .foo.bar)"
</span><del>-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)').length is 15
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[0].id is "testcase3"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[1].id is "testcase4"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[2].id is "testcase6"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[3].id is "testcase10"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[4].id is "testcase12"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[5].id is "testcase13"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[6].id is "testcase14"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[7].id is "testcase16"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[8].id is "testcase20"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[9].id is "testcase22"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[10].id is "testcase23"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[11].id is "testcase24"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[12].id is "testcase26"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[13].id is "testcase27"
-PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[14].id is "testcase30"
</del><ins>+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)').length is 9
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[0].id is "testcase4"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[1].id is "testcase6"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[2].id is "testcase10"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[3].id is "testcase14"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[4].id is "testcase16"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[5].id is "testcase20"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[6].id is "testcase24"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[7].id is "testcase27"
+PASS document.querySelectorAll('#test-root :nth-child(even of [id][attribute2*="alue"], .foo.bar)')[8].id is "testcase30"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="lines">@@ -354,8 +330,8 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="lines">@@ -364,11 +340,11 @@
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(10, 100, 200)"
-PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
</span><del>-PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(10, 100, 200)"
</del><ins>+PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
</ins><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
</span><span class="cx"> PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsnthchildofselectorlisthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/selectors/nth-child-of-selector-list.html (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/nth-child-of-selector-list.html        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/LayoutTests/fast/selectors/nth-child-of-selector-list.html        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -89,13 +89,13 @@
</span><span class="cx"> testSelector(":nth-child(odd of [attribute1], [attribute2=value2])", ["testcase1", "testcase3", "testcase5", "testcase7", "testcase9", "testcase11", "testcase13", "testcase15", "testcase17", "testcase19", "testcase21", "testcase23", "testcase25", "testcase27", "testcase29"]);
</span><span class="cx">
</span><span class="cx"> // Any element with an odd number of (attribute3 or empty) above.
</span><del>-testSelector(':nth-child(even of [attribute3$="3"], :empty)', ["testcase2", "testcase6", "testcase10", "testcase14", "testcase15", "testcase16", "testcase18", "testcase19", "testcase20", "testcase22", "testcase23", "testcase24", "testcase26", "testcase27", "testcase29", "testcase30"]);
</del><ins>+testSelector(':nth-child(even of [attribute3$="3"], :empty)', ["testcase2", "testcase6", "testcase10", "testcase16", "testcase20", "testcase24", "testcase27"]);
</ins><span class="cx">
</span><span class="cx"> // Any element with an odd number of (attribute3 or empty) above. Overqualified with id to test compound selectors.
</span><del>-testSelector(':nth-child(even of [id][attribute3$="3"], [id]:empty)', ["testcase2", "testcase6", "testcase10", "testcase14", "testcase15", "testcase16", "testcase18", "testcase19", "testcase20", "testcase22", "testcase23", "testcase24", "testcase26", "testcase27", "testcase29", "testcase30"]);
</del><ins>+testSelector(':nth-child(even of [id][attribute3$="3"], [id]:empty)', ["testcase2", "testcase6", "testcase10", "testcase16", "testcase20", "testcase24", "testcase27"]);
</ins><span class="cx">
</span><span class="cx"> // id is always there but attribute2 is uncommon. The classes .foo.bar matches many elements.
</span><del>-testSelector(':nth-child(even of [id][attribute2*="alue"], .foo.bar)', ["testcase3", "testcase4", "testcase6", "testcase10", "testcase12", "testcase13", "testcase14", "testcase16", "testcase20", "testcase22", "testcase23", "testcase24", "testcase26", "testcase27", "testcase30"]);
</del><ins>+testSelector(':nth-child(even of [id][attribute2*="alue"], .foo.bar)', ["testcase4", "testcase6", "testcase10", "testcase14", "testcase16", "testcase20", "testcase24", "testcase27", "testcase30"]);
</ins><span class="cx">
</span><span class="cx"> </script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/Source/WebCore/ChangeLog        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-10-10 Benjamin Poulain <benjamin@webkit.org>
+
+ Update :nth-child(An+B of selector-list) to the latest specification
+ https://bugs.webkit.org/show_bug.cgi?id=137593
+
+ Reviewed by Andreas Kling.
+
+ Following my implementation feedback on :nth-child(An+B of selector-list),
+ the CSS WG decided to change the definition such that the current element on which
+ the selector is matched must also match the selector list in :nth-child().
+
+ This patch updates the implementation accordingly.
+
+ Test: fast/selectors/nth-child-of-chained-3.html
+
+ * css/SelectorChecker.cpp:
+ (WebCore::SelectorChecker::checkOne):
+ (WebCore::SelectorChecker::matchSelectorList):
+ * css/SelectorChecker.h:
+ * cssjit/SelectorCompiler.cpp:
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
+
</ins><span class="cx"> 2014-10-10 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Drop RENDER_OBJECT_TYPE_CASTS() for a lot of RenderObject subclasses
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorChecker.cpp        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -682,6 +682,13 @@
</span><span class="cx"> if (!selector->parseNth())
</span><span class="cx"> break;
</span><span class="cx"> if (element->parentElement()) {
</span><ins>+#if ENABLE(CSS_SELECTORS_LEVEL4)
+ if (const CSSSelectorList* selectorList = selector->selectorList()) {
+ if (!matchSelectorList(context, *element, *selectorList))
+ return false;
+ }
+#endif
+
</ins><span class="cx"> if (context.resolvingMode == Mode::ResolvingStyle)
</span><span class="cx"> element->setStyleIsAffectedByPreviousSibling();
</span><span class="cx">
</span><span class="lines">@@ -692,19 +699,8 @@
</span><span class="cx"> if (context.resolvingMode == Mode::ResolvingStyle)
</span><span class="cx"> sibling->setAffectsNextSiblingElementStyle();
</span><span class="cx">
</span><del>- for (const CSSSelector* subselector = selectorList->first(); subselector; subselector = CSSSelectorList::next(subselector)) {
- CheckingContextWithStatus subcontext(context);
- subcontext.element = sibling;
- subcontext.selector = subselector;
- subcontext.inFunctionalPseudoClass = true;
- subcontext.firstSelectorOfTheFragment = subselector;
- PseudoId ignoreDynamicPseudo = NOPSEUDO;
- if (matchRecursively(subcontext, ignoreDynamicPseudo) == SelectorMatches) {
- ASSERT(ignoreDynamicPseudo == NOPSEUDO);
- ++count;
- break;
- }
- }
</del><ins>+ if (matchSelectorList(context, *sibling, *selectorList))
+ ++count;
</ins><span class="cx"> }
</span><span class="cx"> } else
</span><span class="cx"> #endif
</span><span class="lines">@@ -926,6 +922,23 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool SelectorChecker::matchSelectorList(const CheckingContextWithStatus& baseContext, Element& element, const CSSSelectorList& selectorList) const
+{
+ for (const CSSSelector* subselector = selectorList.first(); subselector; subselector = CSSSelectorList::next(subselector)) {
+ CheckingContextWithStatus subcontext(baseContext);
+ subcontext.element = &element;
+ subcontext.selector = subselector;
+ subcontext.inFunctionalPseudoClass = true;
+ subcontext.firstSelectorOfTheFragment = subselector;
+ PseudoId ignoreDynamicPseudo = NOPSEUDO;
+ if (matchRecursively(subcontext, ignoreDynamicPseudo) == SelectorMatches) {
+ ASSERT(ignoreDynamicPseudo == NOPSEUDO);
+ return true;
+ }
+ }
+ return false;
+}
+
</ins><span class="cx"> bool SelectorChecker::checkScrollbarPseudoClass(const CheckingContextWithStatus& context, const CSSSelector* selector) const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(selector->match() == CSSSelector::PseudoClass);
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorChecker.h (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorChecker.h        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/Source/WebCore/css/SelectorChecker.h        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -85,6 +85,7 @@
</span><span class="cx"> private:
</span><span class="cx"> Match matchRecursively(const CheckingContextWithStatus&, PseudoId&) const;
</span><span class="cx"> bool checkOne(const CheckingContextWithStatus&) const;
</span><ins>+ bool matchSelectorList(const CheckingContextWithStatus&, Element&, const CSSSelectorList&) const;
</ins><span class="cx">
</span><span class="cx"> bool checkScrollbarPseudoClass(const CheckingContextWithStatus&, const CSSSelector*) const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssjitSelectorCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (174612 => 174613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-10-10 21:10:26 UTC (rev 174612)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-10-10 21:23:37 UTC (rev 174613)
</span><span class="lines">@@ -239,6 +239,7 @@
</span><span class="cx">
</span><span class="cx"> void generateSelectorChecker();
</span><span class="cx"> void generateSelectorCheckerExcludingPseudoElements(Assembler::JumpList& failureCases, const SelectorFragmentList&);
</span><ins>+ Assembler::JumpList generateElementMatchesSelectorList(Assembler::RegisterID elementRegister, const Vector<SelectorFragmentList>&);
</ins><span class="cx">
</span><span class="cx"> // Element relations tree walker.
</span><span class="cx"> void generateWalkToParentNode(Assembler::RegisterID targetRegister);
</span><span class="lines">@@ -1597,6 +1598,45 @@
</span><span class="cx"> m_backtrackingLevels.takeLast();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+Assembler::JumpList SelectorCodeGenerator::generateElementMatchesSelectorList(Assembler::RegisterID elementRegister, const Vector<SelectorFragmentList>& selectorList)
+{
+ Assembler::JumpList matchFragmentList;
+ for (const SelectorFragmentList& selectorFragmentList : selectorList) {
+ Assembler::JumpList failureCases;
+
+ RegisterVector allocatedRegisters = m_registerAllocator.allocatedRegisters();
+ if (m_descendantBacktrackingStartInUse)
+ allocatedRegisters.remove(allocatedRegisters.find(m_descendantBacktrackingStart));
+ StackAllocator::StackReferenceVector allocatedRegistersOnStack = m_stackAllocator.push(allocatedRegisters);
+
+ StackAllocator successStack = m_stackAllocator;
+ StackAllocator failureStack = m_stackAllocator;
+
+ for (Assembler::RegisterID registerID : allocatedRegisters) {
+ if (registerID != elementAddressRegister)
+ m_registerAllocator.deallocateRegister(registerID);
+ }
+
+ if (elementRegister != elementAddressRegister)
+ m_assembler.move(elementRegister, elementAddressRegister);
+ generateSelectorCheckerExcludingPseudoElements(failureCases, selectorFragmentList);
+
+ for (Assembler::RegisterID registerID : allocatedRegisters) {
+ if (registerID != elementAddressRegister)
+ m_registerAllocator.allocateRegister(registerID);
+ }
+
+ successStack.pop(allocatedRegistersOnStack, allocatedRegisters);
+ matchFragmentList.append(m_assembler.jump());
+
+ failureCases.link(&m_assembler);
+ failureStack.pop(allocatedRegistersOnStack, allocatedRegisters);
+
+ m_stackAllocator.merge(WTF::move(successStack), WTF::move(failureStack));
+ }
+ return matchFragmentList;
+}
+
</ins><span class="cx"> static inline Assembler::Jump testIsElementFlagOnNode(Assembler::ResultCondition condition, Assembler& assembler, Assembler::RegisterID nodeAddress)
</span><span class="cx"> {
</span><span class="cx"> return assembler.branchTest32(condition, Assembler::Address(nodeAddress, Node::nodeFlagsMemoryOffset()), Assembler::TrustedImm32(Node::flagIsElement()));
</span><span class="lines">@@ -3183,6 +3223,13 @@
</span><span class="cx"> generateWalkToParentElement(failureCases, parentElement);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ // The initial element must match the selector list.
+ for (const NthChildOfSelectorInfo& nthChildOfSelectorInfo : fragment.nthChildOfFilters) {
+ Assembler::JumpList matchFragmentList = generateElementMatchesSelectorList(elementAddressRegister, nthChildOfSelectorInfo.selectorList);
+ failureCases.append(m_assembler.jump());
+ matchFragmentList.link(&m_assembler);
+ }
+
</ins><span class="cx"> Vector<const NthChildOfSelectorInfo*> validSubsetFilters;
</span><span class="cx"> for (const NthChildOfSelectorInfo& nthChildOfSelectorInfo : fragment.nthChildOfFilters) {
</span><span class="cx"> if (nthFilterIsAlwaysSatisified(nthChildOfSelectorInfo.a, nthChildOfSelectorInfo.b))
</span><span class="lines">@@ -3205,53 +3252,19 @@
</span><span class="cx"> LocalRegister previousSibling(m_registerAllocator);
</span><span class="cx"> m_assembler.move(elementAddressRegister, previousSibling);
</span><span class="cx">
</span><del>- // Getting the child index is very efficient when it works. When there is no child index,
- // querying at every iteration is very inefficient. We solve this by only testing the child
- // index on the first direct adjacent.
</del><span class="cx"> Assembler::JumpList noMoreSiblingsCases;
</span><span class="cx">
</span><span class="cx"> Assembler::Label loopStart = m_assembler.label();
</span><ins>+
</ins><span class="cx"> generateWalkToPreviousAdjacentElement(noMoreSiblingsCases, previousSibling);
</span><span class="cx"> markElementIfResolvingStyle(previousSibling, Node::flagAffectsNextSiblingElementStyle());
</span><span class="cx">
</span><del>- Assembler::JumpList matchFragmentList;
- for (const SelectorFragmentList& selectorFragmentList : nthChildOfSelectorInfo->selectorList) {
- Assembler::JumpList failureCases;
-
- RegisterVector allocatedRegisters = m_registerAllocator.allocatedRegisters();
- if (m_descendantBacktrackingStartInUse)
- allocatedRegisters.remove(allocatedRegisters.find(m_descendantBacktrackingStart));
- StackAllocator::StackReferenceVector allocatedRegistersOnStack = m_stackAllocator.push(allocatedRegisters);
-
- StackAllocator successStack = m_stackAllocator;
- StackAllocator failureStack = m_stackAllocator;
-
- for (Assembler::RegisterID registerID : allocatedRegisters) {
- if (registerID != elementAddressRegister)
- m_registerAllocator.deallocateRegister(registerID);
- }
-
- m_assembler.move(previousSibling, elementAddressRegister);
- generateSelectorCheckerExcludingPseudoElements(failureCases, selectorFragmentList);
-
- for (Assembler::RegisterID registerID : allocatedRegisters) {
- if (registerID != elementAddressRegister)
- m_registerAllocator.allocateRegister(registerID);
- }
-
- successStack.pop(allocatedRegistersOnStack, allocatedRegisters);
- matchFragmentList.append(m_assembler.jump());
-
- failureCases.link(&m_assembler);
- failureStack.pop(allocatedRegistersOnStack, allocatedRegisters);
-
- m_stackAllocator.merge(WTF::move(successStack), WTF::move(failureStack));
- }
</del><ins>+ Assembler::JumpList matchFragmentList = generateElementMatchesSelectorList(previousSibling, nthChildOfSelectorInfo->selectorList);
</ins><span class="cx"> m_assembler.jump().linkTo(loopStart, &m_assembler);
</span><del>-
</del><span class="cx"> matchFragmentList.link(&m_assembler);
</span><span class="cx"> m_assembler.add32(Assembler::TrustedImm32(1), elementCounter);
</span><span class="cx"> m_assembler.jump().linkTo(loopStart, &m_assembler);
</span><ins>+
</ins><span class="cx"> noMoreSiblingsCases.link(&m_assembler);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>