style: bonus point: only add the condition when computing reset properties.

This commit is contained in:
Emilio Cobos Álvarez 2017-09-17 05:07:27 +02:00
parent 60511611bb
commit ee49f0eaec
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -132,11 +132,13 @@ impl FontRelativeLength {
match *self { match *self {
FontRelativeLength::Em(length) => { FontRelativeLength::Em(length) => {
if matches!(base_size, FontBaseSize::CurrentStyle) { if context.for_non_inherited_property.is_some() {
context.rule_cache_conditions.borrow_mut() if matches!(base_size, FontBaseSize::CurrentStyle) {
.set_font_size_dependency( context.rule_cache_conditions.borrow_mut()
reference_font_size.into() .set_font_size_dependency(
); reference_font_size.into()
);
}
} }
(reference_font_size, length) (reference_font_size, length)
}, },