mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Make nsIContent::GetBindingParent return an element.
Differential Revision: https://phabricator.services.mozilla.com/D33308
This commit is contained in:
parent
6722e2ce6c
commit
f7240751f5
1 changed files with 4 additions and 5 deletions
|
@ -704,9 +704,8 @@ impl<'le> GeckoElement<'le> {
|
||||||
.map(GeckoElement)
|
.map(GeckoElement)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let binding_parent = unsafe { self.non_xul_xbl_binding_parent_raw_content().as_ref() }
|
let binding_parent = unsafe { self.non_xul_xbl_binding_parent().as_ref() }
|
||||||
.map(GeckoNode::from_content)
|
.map(GeckoElement);
|
||||||
.and_then(|n| n.as_element());
|
|
||||||
|
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
binding_parent ==
|
binding_parent ==
|
||||||
|
@ -721,10 +720,10 @@ impl<'le> GeckoElement<'le> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn non_xul_xbl_binding_parent_raw_content(&self) -> *mut nsIContent {
|
fn non_xul_xbl_binding_parent(&self) -> *mut RawGeckoElement {
|
||||||
debug_assert!(!self.is_xul_element());
|
debug_assert!(!self.is_xul_element());
|
||||||
self.extended_slots().map_or(ptr::null_mut(), |slots| {
|
self.extended_slots().map_or(ptr::null_mut(), |slots| {
|
||||||
slots._base.mBindingParent.raw::<nsIContent>()
|
slots._base.mBindingParent.mRawPtr
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue