From 536b3d603bd1efdf23b85aab32b19bca0f20d0b5 Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Tue, 21 Mar 2023 10:23:54 +0000 Subject: [PATCH] style: Check that the lowercase attribute is different before trying to track it Differential Revision: https://phabricator.services.mozilla.com/D173112 --- components/style/stylist.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 482115524e2..5d7551e81b1 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -2004,12 +2004,16 @@ impl<'a> SelectorVisitor for StylistSelectorVisitor<'a> { ) -> bool { if self.in_selector_list_of.in_nth_of() { self.nth_of_attribute_dependencies.insert(name.clone()); - self.nth_of_attribute_dependencies - .insert(lower_name.clone()); + if name != lower_name { + self.nth_of_attribute_dependencies + .insert(lower_name.clone()); + } } self.attribute_dependencies.insert(name.clone()); - self.attribute_dependencies.insert(lower_name.clone()); + if name != lower_name { + self.attribute_dependencies.insert(lower_name.clone()); + } true }