From fed5960f2c3160cd1dc717db354ef7803f4c89b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 23 Sep 2017 03:34:39 +0200 Subject: [PATCH] style: Make sure to not run any style invalidation in an unstyled children only traversal. Bug: 1402472 Reviewed-by: bholley MozReview-Commit-ID: IFPA7LJpvsZ --- components/style/traversal.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/style/traversal.rs b/components/style/traversal.rs index 1982589e985..56df2d08728 100644 --- a/components/style/traversal.rs +++ b/components/style/traversal.rs @@ -838,6 +838,12 @@ where propagated_hint, child.implemented_pseudo_element()); + // Make sure to not run style invalidation of styled elements in an + // unstyled-children-only traversal. + if child_data.is_some() && flags.intersects(traversal_flags::UnstyledOnly) { + continue; + } + if let Some(ref mut child_data) = child_data { // Propagate the parent restyle hint, that may make us restyle the whole // subtree.