mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
Auto merge of #18842 - heycam:skip-var-check, r=emilio
style: Skip custom properties comparison if other inherited properties changed. Servo half of https://bugzilla.mozilla.org/show_bug.cgi?id=1407246, reviewed there by Emilio.
This commit is contained in:
commit
9f8514d2b9
1 changed files with 10 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue