From 84a8bbc8a69e47cce4f01ea7906157d060bed1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 20 Jun 2017 15:36:16 +0200 Subject: [PATCH 1/2] style: Remove extra-optimistic optimization. We can't really do this :( --- components/style/invalidation/element/invalidator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From ce9cd802dece197d446a64d305c568f7f418d853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 20 Jun 2017 15:42:23 +0200 Subject: [PATCH 2/2] style: Clean up after #17427. --- components/style/gecko/wrapper.rs | 4 ++-- components/style/gecko_string_cache/namespace.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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.