mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
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:
parent
c338745b17
commit
9364cd21b8
3 changed files with 31 additions and 6 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue