From d4b364200afd33320d925e7e56696869d8fa7bca Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 14 Aug 2017 20:02:01 -0500 Subject: [PATCH] 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 --- components/style/gecko/restyle_damage.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style/gecko/restyle_damage.rs b/components/style/gecko/restyle_damage.rs index c5b10737d8e..b9b6be3bdca 100644 --- a/components/style/gecko/restyle_damage.rs +++ b/components/style/gecko/restyle_damage.rs @@ -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)