Auto merge of #23503 - emilio:gecko-sync, r=emilio

style: sync changes from mozilla-central

See each individual commit for details. This also cherry-picks #23463 with a few fixes that were needed in Gecko-only code.

<!-- 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/23503)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-06-04 08:30:39 -04:00 committed by GitHub
commit fe8aad7227
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 897 additions and 915 deletions

View file

@ -2982,12 +2982,17 @@ impl<'a> SelectorsElement for DomRoot<Element> {
})
}
fn local_name(&self) -> &LocalName {
Element::local_name(self)
fn has_local_name(&self, local_name: &LocalName) -> bool {
Element::local_name(self) == local_name
}
fn namespace(&self) -> &Namespace {
Element::namespace(self)
fn has_namespace(&self, ns: &Namespace) -> bool {
Element::namespace(self) == ns
}
fn is_same_type(&self, other: &Self) -> bool {
Element::local_name(self) == Element::local_name(other) &&
Element::namespace(self) == Element::namespace(other)
}
fn match_non_ts_pseudo_class<F>(