From 60511611bb5adf80d13a6c3474919d3c5f3c51c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 17 Sep 2017 04:57:22 +0200 Subject: [PATCH] stylo: Don't add a font-size dependency to the rule cache if the reference size is not our current style. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We enter the Custom(..) code path from other random places, like to remove the relative lengths from a calc expression while zooming, or whatever craziness MathML font-size uses, and we don't want to set the dependency on those cases. MozReview-Commit-ID: HNatSGlzDkK Signed-off-by: Emilio Cobos Álvarez --- components/style/values/specified/length.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs index c4da56cf600..4a5f213d976 100644 --- a/components/style/values/specified/length.rs +++ b/components/style/values/specified/length.rs @@ -132,7 +132,7 @@ impl FontRelativeLength { match *self { FontRelativeLength::Em(length) => { - if !matches!(base_size, FontBaseSize::InheritedStyle) { + if matches!(base_size, FontBaseSize::CurrentStyle) { context.rule_cache_conditions.borrow_mut() .set_font_size_dependency( reference_font_size.into()