Auto merge of #20583 - emilio:affine-stuff, r=upsuper

selectors: Don't serialize :nth-child(-n) as -1n.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20583)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-04-07 10:10:35 -04:00 committed by GitHub
commit ecfcf35c26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 25 deletions

View file

@ -1021,6 +1021,7 @@ impl<Impl: SelectorImpl> ToCss for Component<Impl> {
(0, 0) => dest.write_char('0'),
(1, 0) => dest.write_char('n'),
(-1, 0) => dest.write_str("-n"),
(_, 0) => write!(dest, "{}n", a),
(0, _) => write!(dest, "{}", b),

View file

@ -1,25 +0,0 @@
[anplusb-selector-parsing.html]
[:nth-child(-n+0) should be parsed and serialized correctly]
expected: FAIL
[:nth-child(-n) should be parsed and serialized correctly]
expected: FAIL
[:nth-last-child(-n+0) should be parsed and serialized correctly]
expected: FAIL
[:nth-last-child(-n) should be parsed and serialized correctly]
expected: FAIL
[:nth-of-type(-n+0) should be parsed and serialized correctly]
expected: FAIL
[:nth-of-type(-n) should be parsed and serialized correctly]
expected: FAIL
[:nth-last-of-type(-n+0) should be parsed and serialized correctly]
expected: FAIL
[:nth-last-of-type(-n) should be parsed and serialized correctly]
expected: FAIL