Auto merge of #14268 - Manishearth:regen, r=bholley

Regenerate bindings

Don't merge yet

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14268)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-21 12:19:39 -06:00 committed by GitHub
commit 95bc7ece47
6 changed files with 1401 additions and 1228 deletions

View file

@ -23,24 +23,24 @@ macro_rules! check_enum_value {
// const-fn and no other way to access the numerical value :-(
macro_rules! check_enum_value_non_static {
($a:expr, $b:expr) => {
assert_eq!($a as usize, $b as usize);
assert_eq!($a.0 as usize, $b as usize);
}
}
#[test]
fn assert_restyle_hints_match() {
use style::restyle_hints::*; // For flags
use style::gecko_bindings::structs::nsRestyleHint;
use style::gecko_bindings::structs;
check_enum_value_non_static!(nsRestyleHint::eRestyle_Self, RESTYLE_SELF.bits());
check_enum_value_non_static!(structs::nsRestyleHint_eRestyle_Self, RESTYLE_SELF.bits());
// XXX This for Servo actually means something like an hypothetical
// Restyle_AllDescendants (but without running selector matching on the
// element). ServoRestyleManager interprets it like that, but in practice we
// should align the behavior with Gecko adding a new restyle hint, maybe?
//
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1291786
check_enum_value_non_static!(nsRestyleHint::eRestyle_SomeDescendants, RESTYLE_DESCENDANTS.bits());
check_enum_value_non_static!(nsRestyleHint::eRestyle_LaterSiblings, RESTYLE_LATER_SIBLINGS.bits());
check_enum_value_non_static!(structs::nsRestyleHint_eRestyle_SomeDescendants, RESTYLE_DESCENDANTS.bits());
check_enum_value_non_static!(structs::nsRestyleHint_eRestyle_LaterSiblings, RESTYLE_LATER_SIBLINGS.bits());
}
// Note that we can't call each_pseudo_element, parse_pseudo_element, or