diff options
-rw-r--r-- | components/style/gecko/wrapper.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index ae8612fa490..6902093be7d 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -1121,6 +1121,10 @@ impl<'le> TElement for GeckoElement<'le> { where F: FnMut(Self), { + if !self.may_have_anonymous_children() { + return; + } + let array: *mut structs::nsTArray<*mut nsIContent> = unsafe { bindings::Gecko_GetAnonymousContentForElement(self.0) }; |