diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 75558dffcf9..47df5dbf5cf 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -31,7 +31,7 @@ use gecko_bindings::bindings; use gecko_bindings::bindings::{Gecko_ConstructStyleChildrenIterator, Gecko_DestroyStyleChildrenIterator}; use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetDocumentLWTheme}; use gecko_bindings::bindings::{Gecko_GetLastChild, Gecko_GetNextStyleChild}; -use gecko_bindings::bindings::{Gecko_IsRootElement, Gecko_MatchesElement, Gecko_Namespace}; +use gecko_bindings::bindings::{Gecko_IsRootElement, Gecko_MatchesElement}; use gecko_bindings::bindings::{Gecko_SetNodeFlags, Gecko_UnsetNodeFlags}; use gecko_bindings::bindings::Gecko_ClassOrClassList; use gecko_bindings::bindings::Gecko_ElementHasAnimations; @@ -610,6 +610,7 @@ impl<'le> GeckoElement<'le> { } } + #[inline] fn namespace_id(&self) -> i32 { self.as_node().node_info().mInner.mNamespaceID } @@ -1939,7 +1940,8 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { #[inline] fn get_namespace(&self) -> &WeakNamespace { unsafe { - WeakNamespace::new(Gecko_Namespace(self.0)) + let namespace_manager = structs::nsContentUtils_sNameSpaceManager; + WeakNamespace::new((*namespace_manager).mURIArray[self.namespace_id() as usize].mRawPtr) } }