style: Skip custom properties comparison if other inherited properties changed.

This commit is contained in:
Cameron McCormack 2017-10-12 09:13:38 +08:00
parent dbf0991f8c
commit c05e45fdd1

View file

@ -57,6 +57,16 @@ impl GeckoRestyleDamage {
&mut reset_only,
)
};
if reset_only &&
old_style.custom_properties() != new_style.custom_properties() {
// The Gecko_CalcStyleDifference call only checks the non-custom
// property structs, so we check the custom properties here. Since
// they generate no damage themselves, we can skip this check if we
// already know we had some inherited (regular) property
// differences.
any_style_changed = true;
reset_only = false;
}
let change = if any_style_changed {
StyleChange::Changed { reset_only }
} else {