Skip to content

Commit

Permalink
Fix up Gecko_CalcStyleDifference for Linux 32-bit ABI
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jryans committed Aug 16, 2017
1 parent 2d65fc8 commit d4b3642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/style/gecko/restyle_damage.rs
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit d4b3642

Please sign in to comment.