diff options
author | Cameron McCormack <cam@mcc.id.au> | 2017-10-12 09:13:38 +0800 |
---|---|---|
committer | Cameron McCormack <cam@mcc.id.au> | 2017-10-12 10:44:46 +0800 |
commit | c05e45fdd1649163f8e558a64c84629f86866bbc (patch) | |
tree | a7685b9c464a415e32cef7bfed08936bc0239586 /components/style/gecko | |
parent | dbf0991f8cab54516c5b0211e1818a16cfbf9e19 (diff) | |
download | servo-c05e45fdd1649163f8e558a64c84629f86866bbc.tar.gz servo-c05e45fdd1649163f8e558a64c84629f86866bbc.zip |
style: Skip custom properties comparison if other inherited properties changed.
Diffstat (limited to 'components/style/gecko')
-rw-r--r-- | components/style/gecko/restyle_damage.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/style/gecko/restyle_damage.rs b/components/style/gecko/restyle_damage.rs index f325e7916ed..f8a43e8b7ea 100644 --- a/components/style/gecko/restyle_damage.rs +++ b/components/style/gecko/restyle_damage.rs @@ -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 { |