From ecdb10ef5c07aa41797d5c30fc42e1d942825504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 12 Oct 2017 17:35:14 +0200 Subject: [PATCH] Be more precise in should_process_descendants. --- components/style/invalidation/element/collector.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/style/invalidation/element/collector.rs b/components/style/invalidation/element/collector.rs index 271e16f323c..08456e032e7 100644 --- a/components/style/invalidation/element/collector.rs +++ b/components/style/invalidation/element/collector.rs @@ -186,11 +186,8 @@ where Some(ref data) => data, }; - // FIXME(emilio): should check only RESTYLE_DESCENDANTS. - // - // Also, could probably return false if data.styles.is_display_none() - // returns true. - !data.hint.contains_subtree() + !data.styles.is_display_none() && + !data.hint.contains(RESTYLE_DESCENDANTS) } fn recursion_limit_exceeded(