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

@ -391,7 +391,7 @@ pub trait ThreadSafeLayoutElement:
#[inline]
fn get_details_summary_pseudo(&self) -> Option<Self> {
if self.local_name() == &local_name!("details") && self.namespace() == &ns!(html) {
if self.has_local_name(&local_name!("details")) && self.has_namespace(&ns!(html)) {
Some(self.with_pseudo(PseudoElementType::DetailsSummary))
} else {
None
@ -400,8 +400,8 @@ pub trait ThreadSafeLayoutElement:
#[inline]
fn get_details_content_pseudo(&self) -> Option<Self> {
if self.local_name() == &local_name!("details") &&
self.namespace() == &ns!(html) &&
if self.has_local_name(&local_name!("details")) &&
self.has_namespace(&ns!(html)) &&
self.get_attr(&ns!(), &local_name!("open")).is_some()
{
Some(self.with_pseudo(PseudoElementType::DetailsContent))