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,12 +132,14 @@ impl FontRelativeLength {
match *self {
FontRelativeLength::Em(length) => {
if context.for_non_inherited_property.is_some() {
if matches!(base_size, FontBaseSize::CurrentStyle) {
context.rule_cache_conditions.borrow_mut()
.set_font_size_dependency(
reference_font_size.into()
);
}
}
(reference_font_size, length)
},
FontRelativeLength::Ex(length) => {