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

@ -188,6 +188,7 @@ COMPILATION_TARGETS = {
"StyleTransition",
"UniquePtr",
],
"bitfield_enum_types": ["nsChangeHint", "nsRestyleHint"],
"opaque_types": [
"atomic___base",
"nsAString_internal_char_traits",
@ -524,6 +525,11 @@ def build(objdir, target_name, debug, debugger, kind_name=None,
flags.append("--whitelist-var")
flags.append(header)
if "bitfield_enum_types" in current_target:
for ty in current_target["bitfield_enum_types"]:
flags.append("--bitfield-enum")
flags.append(ty)
if "opaque_types" in current_target:
for ty in current_target["opaque_types"]:
flags.append("--opaque-type")

View file

@ -4,6 +4,7 @@
use dom::TRestyleDamage;
use gecko_bindings::bindings;
use gecko_bindings::structs;
use gecko_bindings::structs::{nsChangeHint, nsStyleContext};
use gecko_bindings::sugar::ownership::FFIArcHelpers;
use properties::ComputedValues;
@ -23,8 +24,7 @@ impl TRestyleDamage for GeckoRestyleDamage {
type PreExistingComputedValues = nsStyleContext;
fn empty() -> Self {
use std::mem;
GeckoRestyleDamage(unsafe { mem::transmute(0u32) })
GeckoRestyleDamage(nsChangeHint(0))
}
fn compute(source: &nsStyleContext,
@ -38,7 +38,7 @@ impl TRestyleDamage for GeckoRestyleDamage {
}
fn rebuild_and_reflow() -> Self {
GeckoRestyleDamage(nsChangeHint::nsChangeHint_ReconstructFrame)
GeckoRestyleDamage(structs::nsChangeHint_nsChangeHint_ReconstructFrame)
}
}
@ -46,8 +46,7 @@ impl BitOr for GeckoRestyleDamage {
type Output = Self;
fn bitor(self, other: Self) -> Self {
use std::mem;
GeckoRestyleDamage(unsafe { mem::transmute(self.0 as u32 | other.0 as u32) })
GeckoRestyleDamage(self.0 | other.0)
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -162,8 +162,6 @@ cfg_if! {
pub static nsGkAtoms_anonlocation: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms3anyE"]
pub static nsGkAtoms_any: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms6mozappE"]
pub static nsGkAtoms_mozapp: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms6appletE"]
pub static nsGkAtoms_applet: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms12applyImportsE"]
@ -1944,8 +1942,6 @@ cfg_if! {
pub static nsGkAtoms_parameter: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms6parentE"]
pub static nsGkAtoms_parent: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms9parentappE"]
pub static nsGkAtoms_parentapp: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms13parentfocusedE"]
pub static nsGkAtoms_parentfocused: *mut nsIAtom;
#[link_name = "_ZN9nsGkAtoms9parsetypeE"]
@ -5799,8 +5795,6 @@ cfg_if! {
pub static nsGkAtoms_anonlocation: *mut nsIAtom;
#[link_name = "?any@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_any: *mut nsIAtom;
#[link_name = "?mozapp@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_mozapp: *mut nsIAtom;
#[link_name = "?applet@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_applet: *mut nsIAtom;
#[link_name = "?applyImports@nsGkAtoms@@2PEAVnsIAtom@@EA"]
@ -7581,8 +7575,6 @@ cfg_if! {
pub static nsGkAtoms_parameter: *mut nsIAtom;
#[link_name = "?parent@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_parent: *mut nsIAtom;
#[link_name = "?parentapp@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_parentapp: *mut nsIAtom;
#[link_name = "?parentfocused@nsGkAtoms@@2PEAVnsIAtom@@EA"]
pub static nsGkAtoms_parentfocused: *mut nsIAtom;
#[link_name = "?parsetype@nsGkAtoms@@2PEAVnsIAtom@@EA"]
@ -11436,8 +11428,6 @@ cfg_if! {
pub static nsGkAtoms_anonlocation: *mut nsIAtom;
#[link_name = "\x01?any@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_any: *mut nsIAtom;
#[link_name = "\x01?mozapp@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_mozapp: *mut nsIAtom;
#[link_name = "\x01?applet@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_applet: *mut nsIAtom;
#[link_name = "\x01?applyImports@nsGkAtoms@@2PAVnsIAtom@@A"]
@ -13218,8 +13208,6 @@ cfg_if! {
pub static nsGkAtoms_parameter: *mut nsIAtom;
#[link_name = "\x01?parent@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_parent: *mut nsIAtom;
#[link_name = "\x01?parentapp@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_parentapp: *mut nsIAtom;
#[link_name = "\x01?parentfocused@nsGkAtoms@@2PAVnsIAtom@@A"]
pub static nsGkAtoms_parentfocused: *mut nsIAtom;
#[link_name = "\x01?parsetype@nsGkAtoms@@2PAVnsIAtom@@A"]
@ -17076,8 +17064,6 @@ macro_rules! atom {
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_anonlocation as *mut _) } };
("any") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_any as *mut _) } };
("mozapp") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_mozapp as *mut _) } };
("applet") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_applet as *mut _) } };
("apply-imports") =>
@ -18858,8 +18844,6 @@ macro_rules! atom {
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_parameter as *mut _) } };
("parent") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_parent as *mut _) } };
("parentapp") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_parentapp as *mut _) } };
("parentfocused") =>
{ unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_parentfocused as *mut _) } };
("parsetype") =>