diff --git a/components/style/context.rs b/components/style/context.rs index 7843c424046..a40537a5a9b 100644 --- a/components/style/context.rs +++ b/components/style/context.rs @@ -553,8 +553,9 @@ impl SelectorFlagsMap { } /// Applies the flags. Must be called on the main thread. - pub fn apply_flags(&mut self) { + fn apply_flags(&mut self) { debug_assert!(thread_state::get() == ThreadState::LAYOUT); + self.cache.evict_all(); for (el, flags) in self.map.drain() { unsafe { el.set_selector_flags(flags); } }