:nth-child(-an) matches the a-th element, but should not match anything. This applies to querySelectorAll and CSS rules. NOTE: :nth-child(-n) correctly matches nothing.
Created attachment 44015 [details] testcase A simple manual testcase.
Created attachment 56213 [details] Add tests for Bug 31267 - :nth-child(-2n) should match no element.
The proposed patch just adds tests because this bug has been already fixed by http://trac.webkit.org/changeset/58300 .
Comment on attachment 56213 [details] Add tests for Bug 31267 - :nth-child(-2n) should match no element. Good to add a test case. A test that replaces "Test didn't run" with "PASS" or "FAIL" isn't quite as good as a test that explains what it's testing. It's better when possible to have the test explain itself and write out specifics of the unwanted result. r=me
Committed r59649: <http://trac.webkit.org/changeset/59649>
Thank you for the review. Landed the patch after making the tests more descriptive.