From dd1cef1a6c9b4f228137098209a73759dcb42816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 23 Dec 2017 09:23:42 +0100 Subject: [PATCH] style: Stop duplicating slots. Bug: 1427001 Reviewed-by: smaug MozReview-Commit-ID: Cq647BcOzbe --- components/style/gecko/wrapper.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index d399109fee8..5aa09092492 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -536,8 +536,9 @@ impl<'le> GeckoElement<'le> { fn get_extended_slots( &self, ) -> Option<&structs::FragmentOrElement_nsExtendedDOMSlots> { - self.get_dom_slots() - .and_then(|s| unsafe { s.mExtendedSlots.mPtr.as_ref() }) + self.get_dom_slots().and_then(|s| unsafe { + (s._base.mExtendedSlots.mPtr as *const structs::FragmentOrElement_nsExtendedDOMSlots).as_ref() + }) } #[inline] @@ -592,7 +593,7 @@ impl<'le> GeckoElement<'le> { fn get_non_xul_xbl_binding_parent_raw_content(&self) -> *mut nsIContent { debug_assert!(!self.is_xul_element()); 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 {