From bea7b31445aa65c3537874e9fce3cd801869ea9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 1 Dec 2017 20:36:29 +0100 Subject: [PATCH] style: Add a missing fast-path in GeckoElement::each_class. This shows up when inserting elements in the bloom filter. --- components/style/gecko/wrapper.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 15d3f785b6e..dd82ec8cea8 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1124,6 +1124,10 @@ impl<'le> TElement for GeckoElement<'le> { where F: FnMut(&Atom), { + if !self.may_have_class() { + return; + } + snapshot_helpers::each_class(self.0, callback, Gecko_ClassOrClassList) }