style: Don't share style with an element that has a different proto binding than us.

See the lengthy comment about why... XBL sucks.

MozReview-Commit-ID: 8UgeJAVkj6a
This commit is contained in:
Emilio Cobos Álvarez 2018-03-07 15:01:03 +01:00
parent c338745b17
commit 9364cd21b8
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 31 additions and 6 deletions

View file

@ -1092,8 +1092,16 @@ impl<'le> TElement for GeckoElement<'le> {
unsafe { slots._base.mContainingShadow.mRawPtr.as_ref().map(GeckoShadowRoot) }
}
/// Execute `f` for each anonymous content child element (apart from
/// ::before and ::after) whose originating element is `self`.
fn has_same_xbl_proto_binding_as(&self, other: Self) -> bool {
match (self.xbl_binding(), other.xbl_binding()) {
(None, None) => true,
(Some(a), Some(b)) => {
a.0.mPrototypeBinding == b.0.mPrototypeBinding
}
_ => false,
}
}
fn each_anonymous_content_child<F>(&self, mut f: F)
where
F: FnMut(Self),