diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 937d1422e1d..42c9997e691 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1747,8 +1747,8 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { // If this element is the shadow root of an use-element shadow // tree, according to the spec, we should not match rules // cross the shadow DOM boundary. - e.get_local_name().as_ptr() == atom!("use").as_ptr() && - e.get_namespace() == &*Namespace(atom!("http://www.w3.org/2000/svg")) + e.get_local_name() == &*local_name!("use") && + e.get_namespace() == &*ns!("http://www.w3.org/2000/svg") }, None => false, } diff --git a/components/style/gecko_string_cache/namespace.rs b/components/style/gecko_string_cache/namespace.rs index 9368c16286f..319f15222a9 100644 --- a/components/style/gecko_string_cache/namespace.rs +++ b/components/style/gecko_string_cache/namespace.rs @@ -13,7 +13,8 @@ use string_cache::{Atom, WeakAtom}; #[macro_export] macro_rules! ns { - () => { $crate::string_cache::Namespace(atom!("")) } + () => { $crate::string_cache::Namespace(atom!("")) }; + ($s: tt) => { $crate::string_cache::Namespace(atom!($s)) }; } /// A Gecko namespace is just a wrapped atom.