diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index c8028acaee2..1c0208c1c40 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1665,7 +1665,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { fn get_local_name(&self) -> &WeakAtom { unsafe { - WeakAtom::new(self.as_node().node_info().mInner.mName.raw::()) + WeakAtom::new(self.as_node().node_info().mInner.mName) } } diff --git a/components/style/gecko_string_cache/mod.rs b/components/style/gecko_string_cache/mod.rs index 0adf5c09da1..fed06fbeec5 100644 --- a/components/style/gecko_string_cache/mod.rs +++ b/components/style/gecko_string_cache/mod.rs @@ -94,7 +94,7 @@ unsafe impl Sync for WeakAtom {} impl WeakAtom { /// Construct a `WeakAtom` from a raw `nsIAtom`. #[inline] - pub unsafe fn new<'a>(atom: *mut nsIAtom) -> &'a mut Self { + pub unsafe fn new<'a>(atom: *const nsIAtom) -> &'a mut Self { &mut *(atom as *mut WeakAtom) }