From f77bfedb9ea8dee79066ad5186c28a5451b5858b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 13 Jul 2017 15:59:34 +0200 Subject: [PATCH] style: Don't early return before updating the root font-size. We never use the reconstruct path for the root, but feels less handwavy. --- components/style/matching.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/style/matching.rs b/components/style/matching.rs index bf31369ba3a..c8b6b26d6ae 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -482,11 +482,6 @@ pub trait MatchMethods : TElement { } } - // Don't accumulate damage if we're in a restyle for reconstruction. - if context.shared.traversal_flags.for_reconstruct() { - return ChildCascadeRequirement::MustCascadeChildren; - } - let new_primary_style = data.styles.primary.as_ref().unwrap(); let mut cascade_requirement = ChildCascadeRequirement::CanSkipCascade; @@ -506,6 +501,11 @@ pub trait MatchMethods : TElement { } } + // Don't accumulate damage if we're in a restyle for reconstruction. + if context.shared.traversal_flags.for_reconstruct() { + return ChildCascadeRequirement::MustCascadeChildren; + } + // Also, don't do anything if there was no style. let old_primary_style = match old_styles.primary { Some(s) => s,