aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-09-23 03:34:39 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-09-23 04:15:01 +0200
commitfed5960f2c3160cd1dc717db354ef7803f4c89b1 (patch)
treef178487b8efdd8a8476973a35bda26e4a184a8f1
parent352b129dc5b237757ade67448cc42f327780417e (diff)
downloadservo-fed5960f2c3160cd1dc717db354ef7803f4c89b1.tar.gz
servo-fed5960f2c3160cd1dc717db354ef7803f4c89b1.zip
style: Make sure to not run any style invalidation in an unstyled children only traversal.
Bug: 1402472 Reviewed-by: bholley MozReview-Commit-ID: IFPA7LJpvsZ
-rw-r--r--components/style/traversal.rs6
1 files changed, 6 insertions, 0 deletions
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.