mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Add also a containing_shadow API.
This commit is contained in:
parent
2f0df1b421
commit
a19219ec79
3 changed files with 13 additions and 0 deletions
|
@ -1068,6 +1068,12 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
unsafe { slots.mShadowRoot.mRawPtr.as_ref().map(GeckoShadowRoot) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn containing_shadow(&self) -> Option<GeckoShadowRoot<'le>> {
|
||||
let slots = self.extended_slots()?;
|
||||
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 each_anonymous_content_child<F>(&self, mut f: F)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue