diff --git a/components/style/gecko/snapshot_helpers.rs b/components/style/gecko/snapshot_helpers.rs index 4c5b65b13cb..f1163d2609f 100644 --- a/components/style/gecko/snapshot_helpers.rs +++ b/components/style/gecko/snapshot_helpers.rs @@ -34,7 +34,7 @@ pub fn has_class( let classes = slice::from_raw_parts(list, n as usize); match case_sensitivity { CaseSensitivity::CaseSensitive => { - classes.iter().any(|ptr| name == WeakAtom::new(*ptr)) + classes.iter().any(|ptr| &**name == WeakAtom::new(*ptr)) } CaseSensitivity::AsciiCaseInsensitive => { classes.iter().any(|ptr| name.eq_ignore_ascii_case(WeakAtom::new(*ptr))) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 4cffefdc599..0f8626eaa0e 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -2191,7 +2191,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { } } - #[inline] + #[inline(always)] fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool { if !self.may_have_class() { return false;