Fix up Gecko_CalcStyleDifference for Linux 32-bit ABI

Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the callee expects space for the struct
return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: FRBqlZuMiAR
This commit is contained in:
J. Ryan Stinnett 2017-08-14 20:02:01 -05:00
parent 2d65fc899e
commit d4b364200a

View file

@ -59,7 +59,7 @@ impl GeckoRestyleDamage {
&mut any_style_changed)
};
let change = if any_style_changed { StyleChange::Changed } else { StyleChange::Unchanged };
StyleDifference::new(GeckoRestyleDamage(hint), change)
StyleDifference::new(GeckoRestyleDamage(nsChangeHint(hint)), change)
}
/// Computes the `StyleDifference` between the two `ComputedValues` objects
@ -84,7 +84,7 @@ impl GeckoRestyleDamage {
};
// Only pay attention to a reconstruct change hint.
let damage = GeckoRestyleDamage(hint) & Self::reconstruct();
let damage = GeckoRestyleDamage(nsChangeHint(hint)) & Self::reconstruct();
let change = if damage.is_empty() { StyleChange::Changed } else { StyleChange::Unchanged };
StyleDifference::new(damage, change)