stylo: Don't add a font-size dependency to the rule cache if the reference size is not our current style.

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 <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-09-17 04:57:22 +02:00
parent 4b72eb7168
commit 60511611bb
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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()