style: Remove the concept of 'canonical' pseudos.

We only have this so that ::-moz-placeholder keeps serializing as
::-moz-placeholder, but I don't think anybody really cares.

Edge aliases ::-webkit-input-placeholder to ::-ms-input-placeholder at parse
time as well, as can be seen in:

```
let s = document.createElement('style');
s.innerHTML = `input::-webkit-input-placeholder { color: red };`;
document.body.appendChild(s);
document.body.innerHTML = s.sheet.cssRules[0].cssText;
```

And I think this is more consistent with what we do for CSS properties that are
aliases.

Differential Revision: https://phabricator.services.mozilla.com/D2595
This commit is contained in:
Emilio Cobos Álvarez 2018-08-01 11:57:45 +02:00
parent 62419adaaa
commit 998e6f1797
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 7 additions and 14 deletions

View file

@ -2267,7 +2267,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
// match the proper pseudo-element, given how we rulehash the stuff
// based on the pseudo.
match self.implemented_pseudo_element() {
Some(ref pseudo) => *pseudo == pseudo_element.canonical(),
Some(ref pseudo) => *pseudo == *pseudo_element,
None => false,
}
}