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. diff --git a/components/style/invalidation/element/invalidator.rs b/components/style/invalidation/element/invalidator.rs index 12cb10f7172..7a149e951a6 100644 --- a/components/style/invalidation/element/invalidator.rs +++ b/components/style/invalidation/element/invalidator.rs @@ -333,7 +333,7 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E> // // Since we keep the traversal flags in terms of the flattened tree, // we need to propagate it as appropriate. - if invalidated_child && child.parent_element() != Some(self.element) { + if invalidated_child { let mut current = child.traversal_parent(); while let Some(parent) = current.take() { if parent == self.element {