servo: Merge #19660 - style: Stop duplicating slots (from emilio:dupe-slots); r=smaug

Bug: 1427001
Reviewed-by: smaug
MozReview-Commit-ID: Cq647BcOzbe
Source-Repo: https://github.com/servo/servo
Source-Revision: d3f603ecbae8c55062142d3979f433a1b6b903a4

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 50a7494bbf13646ba014d3a1ca4c8784986086bb
This commit is contained in:
Emilio Cobos Álvarez 2017-12-30 17:31:38 -06:00
Родитель 9bd39a3393
Коммит 42b7b3a0a0
2 изменённых файлов: 100 добавлений и 72 удалений

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -536,8 +536,9 @@ impl<'le> GeckoElement<'le> {
fn get_extended_slots( fn get_extended_slots(
&self, &self,
) -> Option<&structs::FragmentOrElement_nsExtendedDOMSlots> { ) -> Option<&structs::FragmentOrElement_nsExtendedDOMSlots> {
self.get_dom_slots() self.get_dom_slots().and_then(|s| unsafe {
.and_then(|s| unsafe { s.mExtendedSlots.mPtr.as_ref() }) (s._base.mExtendedSlots.mPtr as *const structs::FragmentOrElement_nsExtendedDOMSlots).as_ref()
})
} }
#[inline] #[inline]
@ -592,7 +593,7 @@ impl<'le> GeckoElement<'le> {
fn get_non_xul_xbl_binding_parent_raw_content(&self) -> *mut nsIContent { fn get_non_xul_xbl_binding_parent_raw_content(&self) -> *mut nsIContent {
debug_assert!(!self.is_xul_element()); debug_assert!(!self.is_xul_element());
self.get_extended_slots() self.get_extended_slots()
.map_or(ptr::null_mut(), |slots| slots.mBindingParent) .map_or(ptr::null_mut(), |slots| slots._base.mBindingParent)
} }
fn has_xbl_binding_parent(&self) -> bool { fn has_xbl_binding_parent(&self) -> bool {