diff --git a/ports/geckolib/binding_tools/regen.py b/ports/geckolib/binding_tools/regen.py index 836b1dcc641..0e51a94675f 100755 --- a/ports/geckolib/binding_tools/regen.py +++ b/ports/geckolib/binding_tools/regen.py @@ -66,6 +66,10 @@ COMPILATION_TARGETS = { "release": { } }, + "raw_lines": [ + # We can get rid of this when the bindings move into the style crate. + "pub enum OpaqueStyleData {}", + ], "whitelist_vars": [ "NS_THEME_.*", "NODE_.*", @@ -77,6 +81,9 @@ COMPILATION_TARGETS = { "BORDER_STYLE_.*" ], "whitelist": [ + "RawGeckoNode", + "RawGeckoElement", + "RawGeckoDocument", "Element", "Side", "nsTArrayHeader", @@ -168,6 +175,21 @@ COMPILATION_TARGETS = { "gfxSize", # <- Same, union { struct { T width; T height; }; T components[2] }; "gfxSize_Super", # Ditto. ], + "servo_mapped_generic_types": [ + { + "generic": True, + "gecko": "ServoUnsafeCell", + "servo": "::std::cell::UnsafeCell" + }, { + "generic": True, + "gecko": "ServoCell", + "servo": "::std::cell::Cell" + }, { + "generic": False, + "gecko": "ServoNodeData", + "servo": "OpaqueStyleData" + } + ], }, # Generation of the ffi bindings. "bindings": { @@ -206,6 +228,8 @@ COMPILATION_TARGETS = { "FontFamilyType", "nsIAtom", "nsStyleContext", "StyleClipPath", "StyleBasicShapeType", "StyleBasicShape", "nsCSSShadowArray", "nsINode", "nsIDocument", "nsIPrincipal", "nsIURI", + "RawGeckoNode", "RawGeckoElement", "RawGeckoDocument", + "ServoNodeData", ], "servo_nullable_arc_types": [ "ServoComputedValues", "RawServoStyleSheet", @@ -213,7 +237,6 @@ COMPILATION_TARGETS = { ], "servo_owned_types": [ "RawServoStyleSet", - "ServoNodeData", "StyleChildrenIterator", ], "servo_immutable_borrow_types": [ @@ -430,7 +453,17 @@ def build(objdir, target_name, debug, debugger, kind_name=None, flags.append("{}BorrowedOrNull".format(ty)) flags.append("--raw-line") flags.append("pub type {0}BorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, {0}>;".format(ty)) - zero_size_type(ty, flags) + # Right now the only immutable borrow types are ones which we import + # from the |structs| module. As such, we don't need to create an opaque + # type with zero_size_type. If we ever introduce immutable borrow types + # which _do_ need to be opaque, we'll need a separate mode. + + if "servo_mapped_generic_types" in current_target: + for ty in current_target["servo_mapped_generic_types"]: + flags.append("--blacklist-type") + flags.append("{}".format(ty["gecko"])) + flags.append("--raw-line") + flags.append("pub type {0}{2} = {1}{2};".format(ty["gecko"], ty["servo"], "" if ty["generic"] else "")) if "servo_owned_types" in current_target: for ty in current_target["servo_owned_types"]: diff --git a/ports/geckolib/gecko_bindings/bindings.rs b/ports/geckolib/gecko_bindings/bindings.rs index 886c5d1b7ca..a4464c2f083 100644 --- a/ports/geckolib/gecko_bindings/bindings.rs +++ b/ports/geckolib/gecko_bindings/bindings.rs @@ -18,16 +18,10 @@ enum ServoDeclarationBlockVoid{ } pub struct ServoDeclarationBlock(ServoDeclarationBlockVoid); pub type RawGeckoNodeBorrowed<'a> = &'a RawGeckoNode; pub type RawGeckoNodeBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, RawGeckoNode>; -enum RawGeckoNodeVoid{ } -pub struct RawGeckoNode(RawGeckoNodeVoid); pub type RawGeckoElementBorrowed<'a> = &'a RawGeckoElement; pub type RawGeckoElementBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, RawGeckoElement>; -enum RawGeckoElementVoid{ } -pub struct RawGeckoElement(RawGeckoElementVoid); pub type RawGeckoDocumentBorrowed<'a> = &'a RawGeckoDocument; pub type RawGeckoDocumentBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, RawGeckoDocument>; -enum RawGeckoDocumentVoid{ } -pub struct RawGeckoDocument(RawGeckoDocumentVoid); pub type RawServoStyleSetBorrowed<'a> = &'a RawServoStyleSet; pub type RawServoStyleSetBorrowedMut<'a> = &'a mut RawServoStyleSet; pub type RawServoStyleSetOwned = ::sugar::ownership::Owned; @@ -36,14 +30,6 @@ pub type RawServoStyleSetBorrowedMutOrNull<'a> = ::sugar::ownership::BorrowedMut pub type RawServoStyleSetOwnedOrNull = ::sugar::ownership::OwnedOrNull; enum RawServoStyleSetVoid{ } pub struct RawServoStyleSet(RawServoStyleSetVoid); -pub type ServoNodeDataBorrowed<'a> = &'a ServoNodeData; -pub type ServoNodeDataBorrowedMut<'a> = &'a mut ServoNodeData; -pub type ServoNodeDataOwned = ::sugar::ownership::Owned; -pub type ServoNodeDataBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, ServoNodeData>; -pub type ServoNodeDataBorrowedMutOrNull<'a> = ::sugar::ownership::BorrowedMut<'a, ServoNodeData>; -pub type ServoNodeDataOwnedOrNull = ::sugar::ownership::OwnedOrNull; -enum ServoNodeDataVoid{ } -pub struct ServoNodeData(ServoNodeDataVoid); pub type StyleChildrenIteratorBorrowed<'a> = &'a StyleChildrenIterator; pub type StyleChildrenIteratorBorrowedMut<'a> = &'a mut StyleChildrenIterator; pub type StyleChildrenIteratorOwned = ::sugar::ownership::Owned; @@ -179,6 +165,10 @@ use structs::nsINode; use structs::nsIDocument; use structs::nsIPrincipal; use structs::nsIURI; +use structs::RawGeckoNode; +use structs::RawGeckoElement; +use structs::RawGeckoDocument; +use structs::ServoNodeData; extern "C" { pub fn Gecko_EnsureTArrayCapacity(aArray: *mut ::std::os::raw::c_void, @@ -189,7 +179,7 @@ extern "C" { aElementSize: usize, aElementAlign: usize); } extern "C" { - pub fn Servo_NodeData_Drop(arg1: *mut ServoNodeData); + pub fn Servo_Node_ClearNodeData(arg1: *mut nsINode); } #[repr(C)] #[derive(Debug, Copy)] @@ -387,14 +377,6 @@ extern "C" { pub fn Gecko_GetServoDeclarationBlock(element: RawGeckoElementBorrowed) -> ServoDeclarationBlockBorrowedOrNull; } -extern "C" { - pub fn Gecko_GetNodeData(node: RawGeckoNodeBorrowed) - -> ServoNodeDataBorrowedOrNull; -} -extern "C" { - pub fn Gecko_SetNodeData(node: RawGeckoNodeBorrowed, - data: ServoNodeDataOwned); -} extern "C" { pub fn Gecko_Atomize(aString: *const ::std::os::raw::c_char, aLength: u32) -> *mut nsIAtom; diff --git a/ports/geckolib/gecko_bindings/structs_debug.rs b/ports/geckolib/gecko_bindings/structs_debug.rs index a64cf3912bd..090359eb467 100644 --- a/ports/geckolib/gecko_bindings/structs_debug.rs +++ b/ports/geckolib/gecko_bindings/structs_debug.rs @@ -1,5 +1,10 @@ /* automatically generated by rust-bindgen */ +pub enum OpaqueStyleData {} +pub type ServoUnsafeCell = ::std::cell::UnsafeCell; +pub type ServoCell = ::std::cell::Cell; +pub type ServoNodeData = OpaqueStyleData; + #[derive(Debug)] #[repr(C)] pub struct __BindgenUnionField(::std::marker::PhantomData); @@ -1437,10 +1442,12 @@ impl Clone for JSCompartment { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] +#[derive(Debug, Copy, Clone)] pub struct atomic<_Tp> { - pub _M_i: _Tp, + pub _base: (), + pub _phantom_0: ::std::marker::PhantomData<_Tp>, } +pub type atomic___base = [u8; 0usize]; #[repr(C)] #[derive(Debug, Copy)] pub struct FreePolicy { @@ -1494,8 +1501,8 @@ pub enum JSWhyMagic { #[derive(Debug, Copy)] pub struct jsval_layout { pub asBits: __BindgenUnionField, - pub debugView: __BindgenUnionField, - pub s: __BindgenUnionField, + pub debugView: __BindgenUnionField, + pub s: __BindgenUnionField, pub asDouble: __BindgenUnionField, pub asPtr: __BindgenUnionField<*mut ::std::os::raw::c_void>, pub asWord: __BindgenUnionField, @@ -1504,20 +1511,20 @@ pub struct jsval_layout { } #[repr(C)] #[derive(Debug, Copy)] -pub struct jsval_layout__bindgen_ty_bindgen_id_62758 { +pub struct jsval_layout__bindgen_ty_bindgen_id_61264 { pub _bitfield_1: u64, } #[test] -fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_62758() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_61264() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for jsval_layout__bindgen_ty_bindgen_id_62758 { +impl Clone for jsval_layout__bindgen_ty_bindgen_id_61264 { fn clone(&self) -> Self { *self } } -impl jsval_layout__bindgen_ty_bindgen_id_62758 { +impl jsval_layout__bindgen_ty_bindgen_id_61264 { #[inline] pub fn payload47(&self) -> u64 { unsafe { @@ -1550,36 +1557,36 @@ impl jsval_layout__bindgen_ty_bindgen_id_62758 { } #[repr(C)] #[derive(Debug, Copy)] -pub struct jsval_layout__bindgen_ty_bindgen_id_62765 { - pub payload: jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766, +pub struct jsval_layout__bindgen_ty_bindgen_id_61271 { + pub payload: jsval_layout__bindgen_ty_bindgen_id_61271__bindgen_ty_bindgen_id_61272, } #[repr(C)] #[derive(Debug, Copy)] -pub struct jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766 { +pub struct jsval_layout__bindgen_ty_bindgen_id_61271__bindgen_ty_bindgen_id_61272 { pub i32: __BindgenUnionField, pub u32: __BindgenUnionField, pub why: __BindgenUnionField, pub bindgen_union_field: u32, } #[test] -fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_61271__bindgen_ty_bindgen_id_61272() { + assert_eq!(::std::mem::size_of::() , 4usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } impl Clone for - jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766 { + jsval_layout__bindgen_ty_bindgen_id_61271__bindgen_ty_bindgen_id_61272 { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_62765() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_61271() { + assert_eq!(::std::mem::size_of::() , 4usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } -impl Clone for jsval_layout__bindgen_ty_bindgen_id_62765 { +impl Clone for jsval_layout__bindgen_ty_bindgen_id_61271 { fn clone(&self) -> Self { *self } } impl Clone for jsval_layout { @@ -1613,7 +1620,7 @@ pub type nsAString_internal_size_type = u32; pub type nsAString_internal_index_type = u32; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsAString_internal__bindgen_ty_bindgen_id_64603 { +pub enum nsAString_internal__bindgen_ty_bindgen_id_63109 { F_NONE = 0, F_TERMINATED = 1, F_VOIDED = 2, @@ -1675,12 +1682,12 @@ fn bindgen_test_layout_nsString() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_65213 { +pub struct bindgen_vtable__bindgen_id_63719 { } #[repr(C)] #[derive(Debug, Copy)] pub struct nsStringComparator { - pub vtable_: *const bindgen_vtable__bindgen_id_65213, + pub vtable_: *const bindgen_vtable__bindgen_id_63719, } pub type nsStringComparator_char_type = u16; #[test] @@ -1722,7 +1729,7 @@ pub type nsACString_internal_size_type = u32; pub type nsACString_internal_index_type = u32; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsACString_internal__bindgen_ty_bindgen_id_66443 { +pub enum nsACString_internal__bindgen_ty_bindgen_id_64949 { F_NONE = 0, F_TERMINATED = 1, F_VOIDED = 2, @@ -1784,12 +1791,12 @@ fn bindgen_test_layout_nsCString() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_66995 { +pub struct bindgen_vtable__bindgen_id_65501 { } #[repr(C)] #[derive(Debug, Copy)] pub struct nsCStringComparator { - pub vtable_: *const bindgen_vtable__bindgen_id_66995, + pub vtable_: *const bindgen_vtable__bindgen_id_65501, } pub type nsCStringComparator_char_type = ::std::os::raw::c_char; #[test] @@ -1801,7 +1808,7 @@ impl Clone for nsCStringComparator { fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_67298 { +pub struct bindgen_vtable__bindgen_id_65545 { } /** * Basic component object model interface. Objects which implement @@ -1812,7 +1819,7 @@ pub struct bindgen_vtable__bindgen_id_67298 { #[repr(C)] #[derive(Debug, Copy)] pub struct nsISupports { - pub vtable_: *const bindgen_vtable__bindgen_id_67298, + pub vtable_: *const bindgen_vtable__bindgen_id_65545, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1830,7 +1837,7 @@ impl Clone for nsISupports { fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_67581 { +pub struct bindgen_vtable__bindgen_id_65828 { } /** * Participant implementation classes @@ -1838,7 +1845,7 @@ pub struct bindgen_vtable__bindgen_id_67581 { #[repr(C)] #[derive(Debug, Copy)] pub struct nsCycleCollectionParticipant { - pub vtable_: *const bindgen_vtable__bindgen_id_67581, + pub vtable_: *const bindgen_vtable__bindgen_id_65828, pub mMightSkip: bool, } #[test] @@ -2147,7 +2154,7 @@ fn bindgen_test_layout_ErrorResult() { #[derive(Debug)] pub struct TErrorResult { pub mResult: nsresult, - pub __bindgen_anon_1: TErrorResult__bindgen_ty_bindgen_id_75451, + pub __bindgen_anon_1: TErrorResult__bindgen_ty_bindgen_id_73321, pub mMightHaveUnreportedJSException: bool, pub mUnionState: TErrorResult_UnionState, pub _mOwningThread: nsAutoOwningThread, @@ -2177,7 +2184,7 @@ pub struct TErrorResult_DOMExceptionInfo { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct TErrorResult__bindgen_ty_bindgen_id_75451 { +pub struct TErrorResult__bindgen_ty_bindgen_id_73321 { pub mMessage: __BindgenUnionField<*mut TErrorResult_Message>, pub mJSException: __BindgenUnionField, pub mDOMExceptionInfo: __BindgenUnionField<*mut TErrorResult_DOMExceptionInfo>, @@ -2324,7 +2331,7 @@ impl nsIAtom { } } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_76438 { +pub struct bindgen_vtable__bindgen_id_74308 { } /** * Class to store the wrapper for an object. This can only be used with objects @@ -2366,7 +2373,7 @@ pub struct bindgen_vtable__bindgen_id_76438 { #[repr(C)] #[derive(Debug)] pub struct nsWrapperCache { - pub vtable_: *const bindgen_vtable__bindgen_id_76438, + pub vtable_: *const bindgen_vtable__bindgen_id_74308, pub mWrapper: *mut JSObject, pub mFlags: nsWrapperCache_FlagsType, } @@ -2391,9 +2398,23 @@ pub type nsWrapperCache_FlagsType = u32; * NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER). */ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsWrapperCache__bindgen_ty_bindgen_id_76645 { +pub enum nsWrapperCache__bindgen_ty_bindgen_id_74515 { WRAPPER_BIT_PRESERVED = 1, } +#[repr(u32)] +/** + * If this bit is set then the wrapper for the native object is not a DOM + * binding. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsWrapperCache__bindgen_ty_bindgen_id_74518 { + WRAPPER_IS_NOT_DOM_BINDING = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsWrapperCache__bindgen_ty_bindgen_id_74521 { + kWrapperFlagsMask = 3, +} #[test] fn bindgen_test_layout_nsWrapperCache() { assert_eq!(::std::mem::size_of::() , 24usize); @@ -2425,6 +2446,78 @@ fn bindgen_test_layout_GlobalObject() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pair<_T1, _T2> { + pub first: _T1, + pub second: _T2, +} +pub type pair_first_type<_T1> = _T1; +pub type pair_second_type<_T2> = _T2; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct input_iterator_tag { + pub _address: u8, +} +impl Clone for input_iterator_tag { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct forward_iterator_tag { + pub _address: u8, +} +impl Clone for forward_iterator_tag { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct bidirectional_iterator_tag { + pub _address: u8, +} +impl Clone for bidirectional_iterator_tag { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct random_access_iterator_tag { + pub _address: u8, +} +impl Clone for random_access_iterator_tag { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +pub struct bindgen_vtable__bindgen_id_93424 { +} +/** + * A class of objects that return source code on demand. + * + * When code is compiled with setSourceIsLazy(true), SpiderMonkey doesn't + * retain the source code (and doesn't do lazy bytecode generation). If we ever + * need the source code, say, in response to a call to Function.prototype. + * toSource or Debugger.Source.prototype.text, then we call the 'load' member + * function of the instance of this class that has hopefully been registered + * with the runtime, passing the code's URL, and hope that it will be able to + * find the source. + */ +#[repr(C)] +#[derive(Debug)] +pub struct SourceHook { + pub vtable_: *const bindgen_vtable__bindgen_id_93424, +} +#[test] +fn bindgen_test_layout_SourceHook() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __bit_const_reference<_Cp> { + pub __seg_: __bit_const_reference___storage_pointer<_Cp>, + pub __mask_: __bit_const_reference___storage_type<_Cp>, +} +pub type __bit_const_reference___storage_type<_Cp> = _Cp; +pub type __bit_const_reference___storage_pointer<_Cp> = _Cp; +#[repr(C)] #[derive(Debug, Copy)] pub struct nsScriptObjectTracer { pub _base: nsCycleCollectionParticipant, @@ -2459,37 +2552,196 @@ fn bindgen_test_layout_nsXPCOMCycleCollectionParticipant() { impl Clone for nsXPCOMCycleCollectionParticipant { fn clone(&self) -> Self { *self } } +pub type PLDHashNumber = u32; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pair<_T1, _T2> { - pub first: _T1, - pub second: _T2, +#[derive(Debug)] +pub struct PLDHashTable { + pub mOps: *const PLDHashTableOps, + pub mHashShift: i16, + pub mEntrySize: u32, + pub mEntryCount: u32, + pub mRemovedCount: u32, + pub mEntryStore: PLDHashTable_EntryStore, + pub mChecker: Checker, } -pub type pair_first_type<_T1> = _T1; -pub type pair_second_type<_T2> = _T2; #[repr(C)] -pub struct bindgen_vtable__bindgen_id_93519 { +#[derive(Debug)] +pub struct PLDHashTable_EntryStore { + pub mEntryStore: *mut ::std::os::raw::c_char, + pub mGeneration: u32, } +#[test] +fn bindgen_test_layout_PLDHashTable_EntryStore() { + assert_eq!(::std::mem::size_of::() , 16usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct PLDHashTable_Iterator { + pub mTable: *mut PLDHashTable, + pub mStart: *mut ::std::os::raw::c_char, + pub mLimit: *mut ::std::os::raw::c_char, + pub mCurrent: *mut ::std::os::raw::c_char, + pub mNexts: u32, + pub mNextsLimit: u32, + pub mHaveRemoved: bool, +} +#[test] +fn bindgen_test_layout_PLDHashTable_Iterator() { + assert_eq!(::std::mem::size_of::() , 48usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } +extern "C" { + #[link_name = "_ZN12PLDHashTable12kMaxCapacityE"] + pub static PLDHashTable_kMaxCapacity: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable12kMinCapacityE"] + pub static PLDHashTable_kMinCapacity: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable17kMaxInitialLengthE"] + pub static PLDHashTable_kMaxInitialLength: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable21kDefaultInitialLengthE"] + pub static PLDHashTable_kDefaultInitialLength: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable9kHashBitsE"] + pub static PLDHashTable_kHashBits: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable12kGoldenRatioE"] + pub static PLDHashTable_kGoldenRatio: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable14kCollisionFlagE"] + pub static PLDHashTable_kCollisionFlag: PLDHashNumber; +} +#[test] +fn bindgen_test_layout_PLDHashTable() { + assert_eq!(::std::mem::size_of::() , 48usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PLDHashTableOps { + pub hashKey: PLDHashHashKey, + pub matchEntry: PLDHashMatchEntry, + pub moveEntry: PLDHashMoveEntry, + pub clearEntry: PLDHashClearEntry, + pub initEntry: PLDHashInitEntry, +} +#[test] +fn bindgen_test_layout_PLDHashTableOps() { + assert_eq!(::std::mem::size_of::() , 40usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +impl Clone for PLDHashTableOps { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PLDHashEntryHdr { + pub mKeyHash: PLDHashNumber, +} +#[test] +fn bindgen_test_layout_PLDHashEntryHdr() { + assert_eq!(::std::mem::size_of::() , 4usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for PLDHashEntryHdr { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Checker { + pub mState: u32, + pub mIsWritable: u32, +} +extern "C" { + #[link_name = "_ZN7Checker5kIdleE"] + pub static Checker_kIdle: u32; +} +extern "C" { + #[link_name = "_ZN7Checker6kRead1E"] + pub static Checker_kRead1: u32; +} +extern "C" { + #[link_name = "_ZN7Checker8kReadMaxE"] + pub static Checker_kReadMax: u32; +} +extern "C" { + #[link_name = "_ZN7Checker6kWriteE"] + pub static Checker_kWrite: u32; +} +#[test] +fn bindgen_test_layout_Checker() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for Checker { + fn clone(&self) -> Self { *self } +} +pub type PLDHashHashKey = + ::std::option::Option ::std::os::raw::c_uint>; +pub type PLDHashMatchEntry = + ::std::option::Option bool>; +pub type PLDHashMoveEntry = + ::std::option::Option; +pub type PLDHashClearEntry = + ::std::option::Option; +pub type PLDHashInitEntry = + ::std::option::Option; /** - * A class of objects that return source code on demand. + * hashkey wrapper using T* KeyType * - * When code is compiled with setSourceIsLazy(true), SpiderMonkey doesn't - * retain the source code (and doesn't do lazy bytecode generation). If we ever - * need the source code, say, in response to a call to Function.prototype. - * toSource or Debugger.Source.prototype.text, then we call the 'load' member - * function of the instance of this class that has hopefully been registered - * with the runtime, passing the code's URL, and hope that it will be able to - * find the source. + * @see nsTHashtable::EntryType for specification */ #[repr(C)] #[derive(Debug)] -pub struct SourceHook { - pub vtable_: *const bindgen_vtable__bindgen_id_93519, +pub struct nsPtrHashKey { + pub _base: PLDHashEntryHdr, + pub mKey: *mut T, +} +pub type nsPtrHashKey_KeyType = *mut T; +pub type nsPtrHashKey_KeyTypePointer = *mut T; +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsPtrHashKey__bindgen_ty_bindgen_id_104414 { ALLOW_MEMMOVE = 0, } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIRunnable { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIRunnable_COMTypeInfo { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData, + pub _phantom_1: ::std::marker::PhantomData, } #[test] -fn bindgen_test_layout_SourceHook() { - assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() , 8usize); +fn bindgen_test_layout_nsIRunnable() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +impl Clone for nsIRunnable { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] @@ -2505,7 +2757,7 @@ pub struct nsIPrincipal_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIPrincipal__bindgen_ty_bindgen_id_98969 { +pub enum nsIPrincipal__bindgen_ty_bindgen_id_106456 { APP_STATUS_NOT_INSTALLED = 0, APP_STATUS_INSTALLED = 1, APP_STATUS_PRIVILEGED = 2, @@ -2828,7 +3080,7 @@ pub type nsIDocument_FrameRequestCallbackList = nsTArray>; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIDocument__bindgen_ty_bindgen_id_107679 { REQUEST_DISCARD = 1, } +pub enum nsIDocument__bindgen_ty_bindgen_id_115186 { REQUEST_DISCARD = 1, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsIDocument_DeprecatedOperations { @@ -3519,10 +3771,9 @@ pub struct nsINode { pub mNextSibling: *mut nsIContent, pub mPreviousSibling: *mut nsIContent, pub mFirstChild: *mut nsIContent, - pub __bindgen_anon_1: nsINode__bindgen_ty_bindgen_id_104382, + pub __bindgen_anon_1: nsINode__bindgen_ty_bindgen_id_111874, pub mSlots: *mut nsINode_nsSlots, - pub mServoNodeData: UniquePtr>, + pub mServoData: ServoCell<*mut ServoNodeData>, } pub type nsINode_BoxQuadOptions = BoxQuadOptions; pub type nsINode_ConvertCoordinateOptions = ConvertCoordinateOptions; @@ -3545,7 +3796,7 @@ pub struct nsINode_COMTypeInfo { * Bit-flags to pass (or'ed together) to IsNodeOfType() */ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsINode__bindgen_ty_bindgen_id_100513 { +pub enum nsINode__bindgen_ty_bindgen_id_107999 { eCONTENT = 1, eDOCUMENT = 2, eATTRIBUTE = 4, @@ -3560,12 +3811,12 @@ pub enum nsINode__bindgen_ty_bindgen_id_100513 { eFILTER = 2048, } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_101282 { +pub struct bindgen_vtable__bindgen_id_108768 { } #[repr(C)] #[derive(Debug)] pub struct nsINode_nsSlots { - pub vtable_: *const bindgen_vtable__bindgen_id_101282, + pub vtable_: *const bindgen_vtable__bindgen_id_108768, /** * A list of mutation observers */ @@ -3634,19 +3885,19 @@ pub enum nsINode_BooleanFlag { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsINode__bindgen_ty_bindgen_id_104382 { +pub struct nsINode__bindgen_ty_bindgen_id_111874 { pub mPrimaryFrame: __BindgenUnionField<*mut nsIFrame>, pub mSubtreeRoot: __BindgenUnionField<*mut nsINode>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsINode__bindgen_ty_bindgen_id_104382() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsINode__bindgen_ty_bindgen_id_111874() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsINode__bindgen_ty_bindgen_id_104382 { +impl Clone for nsINode__bindgen_ty_bindgen_id_111874 { fn clone(&self) -> Self { *self } } #[test] @@ -3930,26 +4181,6 @@ impl Clone for nsIVariant { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsIRunnable { - pub _base: nsISupports, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsIRunnable_COMTypeInfo { - pub _address: u8, - pub _phantom_0: ::std::marker::PhantomData, - pub _phantom_1: ::std::marker::PhantomData, -} -#[test] -fn bindgen_test_layout_nsIRunnable() { - assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for nsIRunnable { - fn clone(&self) -> Self { *self } -} -#[repr(C)] #[derive(Debug)] pub struct Runnable { pub _base: nsIRunnable, @@ -3996,7 +4227,7 @@ pub struct nsIDOMNode_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIDOMNode__bindgen_ty_bindgen_id_112514 { +pub enum nsIDOMNode__bindgen_ty_bindgen_id_120024 { ELEMENT_NODE = 1, ATTRIBUTE_NODE = 2, TEXT_NODE = 3, @@ -4010,6 +4241,16 @@ pub enum nsIDOMNode__bindgen_ty_bindgen_id_112514 { DOCUMENT_FRAGMENT_NODE = 11, NOTATION_NODE = 12, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDOMNode__bindgen_ty_bindgen_id_120243 { + DOCUMENT_POSITION_DISCONNECTED = 1, + DOCUMENT_POSITION_PRECEDING = 2, + DOCUMENT_POSITION_FOLLOWING = 4, + DOCUMENT_POSITION_CONTAINS = 8, + DOCUMENT_POSITION_CONTAINED_BY = 16, + DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32, +} #[test] fn bindgen_test_layout_nsIDOMNode() { assert_eq!(::std::mem::size_of::() , 8usize); @@ -4857,273 +5098,6 @@ pub enum Side { eSideBottom = 2, eSideLeft = 3, } -#[repr(C)] -#[derive(Debug)] -pub struct CallbackFunction { - pub _base: CallbackObject, -} -#[test] -fn bindgen_test_layout_CallbackFunction() { - assert_eq!(::std::mem::size_of::() , 56usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct CallbackObject { - pub _base: nsISupports, - pub mRefCnt: nsCycleCollectingAutoRefCnt, - pub _mOwningThread: nsAutoOwningThread, - pub mCallback: u64, - pub mCreationStack: u64, - pub mIncumbentGlobal: nsCOMPtr, - pub mIncumbentJSGlobal: u64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CallbackObject_COMTypeInfo { - pub _address: u8, - pub _phantom_0: ::std::marker::PhantomData, - pub _phantom_1: ::std::marker::PhantomData, -} -pub type CallbackObject_HasThreadSafeRefCnt = FalseType; -#[repr(C)] -#[derive(Debug, Copy)] -pub struct CallbackObject_cycleCollection { - pub _base: nsXPCOMCycleCollectionParticipant, -} -#[test] -fn bindgen_test_layout_CallbackObject_cycleCollection() { - assert_eq!(::std::mem::size_of::() , - 16usize); - assert_eq!(::std::mem::align_of::() , - 8usize); -} -impl Clone for CallbackObject_cycleCollection { - fn clone(&self) -> Self { *self } -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum CallbackObject_ExceptionHandling { - eReportExceptions = 0, - eRethrowContentExceptions = 1, - eRethrowExceptions = 2, -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct CallbackObject_FastCallbackConstructor { - pub _address: u8, -} -#[test] -fn bindgen_test_layout_CallbackObject_FastCallbackConstructor() { - assert_eq!(::std::mem::size_of::() - , 1usize); - assert_eq!(::std::mem::align_of::() - , 1usize); -} -impl Clone for CallbackObject_FastCallbackConstructor { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug)] -pub struct CallbackObject_CallSetup { - pub mCx: *mut JSContext, - pub mCompartment: *mut JSCompartment, - pub mAutoEntryScript: [u64; 21usize], - pub mAutoIncumbentScript: [u64; 6usize], - pub mRootedCallable: [u64; 4usize], - pub mAsyncStack: [u64; 4usize], - pub mAsyncStackSetter: [u64; 7usize], - pub mAc: [u64; 4usize], - pub mErrorResult: *mut ErrorResult, - pub mExceptionHandling: CallbackObject_ExceptionHandling, - pub mIsMainThread: bool, -} -#[test] -fn bindgen_test_layout_CallbackObject_CallSetup() { - assert_eq!(::std::mem::size_of::() , 400usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -extern "C" { - #[link_name = "_ZN7mozilla3dom14CallbackObject21_cycleCollectorGlobalE"] - pub static mut CallbackObject__cycleCollectorGlobal: - CallbackObject_cycleCollection; -} -#[test] -fn bindgen_test_layout_CallbackObject() { - assert_eq!(::std::mem::size_of::() , 56usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -pub type PLDHashNumber = u32; -#[repr(C)] -#[derive(Debug)] -pub struct PLDHashTable { - pub mOps: *const PLDHashTableOps, - pub mHashShift: i16, - pub mEntrySize: u32, - pub mEntryCount: u32, - pub mRemovedCount: u32, - pub mEntryStore: PLDHashTable_EntryStore, - pub mChecker: Checker, -} -#[repr(C)] -#[derive(Debug)] -pub struct PLDHashTable_EntryStore { - pub mEntryStore: *mut ::std::os::raw::c_char, - pub mGeneration: u32, -} -#[test] -fn bindgen_test_layout_PLDHashTable_EntryStore() { - assert_eq!(::std::mem::size_of::() , 16usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct PLDHashTable_Iterator { - pub mTable: *mut PLDHashTable, - pub mStart: *mut ::std::os::raw::c_char, - pub mLimit: *mut ::std::os::raw::c_char, - pub mCurrent: *mut ::std::os::raw::c_char, - pub mNexts: u32, - pub mNextsLimit: u32, - pub mHaveRemoved: bool, -} -#[test] -fn bindgen_test_layout_PLDHashTable_Iterator() { - assert_eq!(::std::mem::size_of::() , 48usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } -extern "C" { - #[link_name = "_ZN12PLDHashTable12kMaxCapacityE"] - pub static PLDHashTable_kMaxCapacity: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable12kMinCapacityE"] - pub static PLDHashTable_kMinCapacity: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable17kMaxInitialLengthE"] - pub static PLDHashTable_kMaxInitialLength: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable21kDefaultInitialLengthE"] - pub static PLDHashTable_kDefaultInitialLength: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable9kHashBitsE"] - pub static PLDHashTable_kHashBits: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable12kGoldenRatioE"] - pub static PLDHashTable_kGoldenRatio: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable14kCollisionFlagE"] - pub static PLDHashTable_kCollisionFlag: PLDHashNumber; -} -#[test] -fn bindgen_test_layout_PLDHashTable() { - assert_eq!(::std::mem::size_of::() , 48usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct PLDHashTableOps { - pub hashKey: PLDHashHashKey, - pub matchEntry: PLDHashMatchEntry, - pub moveEntry: PLDHashMoveEntry, - pub clearEntry: PLDHashClearEntry, - pub initEntry: PLDHashInitEntry, -} -#[test] -fn bindgen_test_layout_PLDHashTableOps() { - assert_eq!(::std::mem::size_of::() , 40usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for PLDHashTableOps { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct PLDHashEntryHdr { - pub mKeyHash: PLDHashNumber, -} -#[test] -fn bindgen_test_layout_PLDHashEntryHdr() { - assert_eq!(::std::mem::size_of::() , 4usize); - assert_eq!(::std::mem::align_of::() , 4usize); -} -impl Clone for PLDHashEntryHdr { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct Checker { - pub mState: u32, - pub mIsWritable: u32, -} -extern "C" { - #[link_name = "_ZN7Checker5kIdleE"] - pub static Checker_kIdle: u32; -} -extern "C" { - #[link_name = "_ZN7Checker6kRead1E"] - pub static Checker_kRead1: u32; -} -extern "C" { - #[link_name = "_ZN7Checker8kReadMaxE"] - pub static Checker_kReadMax: u32; -} -extern "C" { - #[link_name = "_ZN7Checker6kWriteE"] - pub static Checker_kWrite: u32; -} -#[test] -fn bindgen_test_layout_Checker() { - assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() , 4usize); -} -impl Clone for Checker { - fn clone(&self) -> Self { *self } -} -pub type PLDHashHashKey = - ::std::option::Option ::std::os::raw::c_uint>; -pub type PLDHashMatchEntry = - ::std::option::Option bool>; -pub type PLDHashMoveEntry = - ::std::option::Option; -pub type PLDHashClearEntry = - ::std::option::Option; -pub type PLDHashInitEntry = - ::std::option::Option; -/** - * hashkey wrapper using T* KeyType - * - * @see nsTHashtable::EntryType for specification - */ -#[repr(C)] -#[derive(Debug)] -pub struct nsPtrHashKey { - pub _base: PLDHashEntryHdr, - pub mKey: *mut T, -} -pub type nsPtrHashKey_KeyType = *mut T; -pub type nsPtrHashKey_KeyTypePointer = *mut T; -#[repr(i32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsPtrHashKey__bindgen_ty_bindgen_id_117256 { ALLOW_MEMMOVE = 0, } /** * A node of content in a document's content model. This interface * is supported by all content objects. @@ -5143,11 +5117,17 @@ pub struct nsIContent_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIContent__bindgen_ty_bindgen_id_118596 { +pub enum nsIContent__bindgen_ty_bindgen_id_124178 { eAllChildren = 0, eAllButXBL = 1, eSkipPlaceholderContent = 2, } +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIContent__bindgen_ty_bindgen_id_124414 { + ATTR_MISSING = -1, + ATTR_VALUE_NO_MATCH = -2, +} /** * Check whether this content node's given attribute has one of a given * list of values. If there is a match, we return the index in the list @@ -5350,7 +5330,7 @@ pub struct FragmentOrElement_nsDOMSlots { * @see FragmentOrElement::GetAttributes */ pub mAttributeMap: RefPtr, - pub __bindgen_anon_1: FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962, + pub __bindgen_anon_1: FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_125545, /** * An object implementing the .children property for this element. */ @@ -5387,7 +5367,7 @@ pub struct FragmentOrElement_nsDOMSlots { } #[repr(C)] #[derive(Debug, Copy)] -pub struct FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962 { +pub struct FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_125545 { /** * The nearest enclosing content node with a binding that created us. * @see FragmentOrElement::GetBindingParent @@ -5400,13 +5380,13 @@ pub struct FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962 { pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_125545() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962 { +impl Clone for FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_125545 { fn clone(&self) -> Self { *self } } #[test] @@ -5457,6 +5437,92 @@ impl Clone for PrefSetting { fn clone(&self) -> Self { *self } } #[repr(C)] +#[derive(Debug)] +pub struct CallbackObject { + pub _base: nsISupports, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mCallback: u64, + pub mCreationStack: u64, + pub mIncumbentGlobal: nsCOMPtr, + pub mIncumbentJSGlobal: u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CallbackObject_COMTypeInfo { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData, + pub _phantom_1: ::std::marker::PhantomData, +} +pub type CallbackObject_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct CallbackObject_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_CallbackObject_cycleCollection() { + assert_eq!(::std::mem::size_of::() , + 16usize); + assert_eq!(::std::mem::align_of::() , + 8usize); +} +impl Clone for CallbackObject_cycleCollection { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum CallbackObject_ExceptionHandling { + eReportExceptions = 0, + eRethrowContentExceptions = 1, + eRethrowExceptions = 2, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct CallbackObject_FastCallbackConstructor { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_CallbackObject_FastCallbackConstructor() { + assert_eq!(::std::mem::size_of::() + , 1usize); + assert_eq!(::std::mem::align_of::() + , 1usize); +} +impl Clone for CallbackObject_FastCallbackConstructor { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct CallbackObject_CallSetup { + pub mCx: *mut JSContext, + pub mCompartment: *mut JSCompartment, + pub mAutoEntryScript: [u64; 21usize], + pub mAutoIncumbentScript: [u64; 6usize], + pub mRootedCallable: [u64; 4usize], + pub mAsyncStack: [u64; 4usize], + pub mAsyncStackSetter: [u64; 7usize], + pub mAc: [u64; 4usize], + pub mErrorResult: *mut ErrorResult, + pub mExceptionHandling: CallbackObject_ExceptionHandling, + pub mIsMainThread: bool, +} +#[test] +fn bindgen_test_layout_CallbackObject_CallSetup() { + assert_eq!(::std::mem::size_of::() , 400usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +extern "C" { + #[link_name = "_ZN7mozilla3dom14CallbackObject21_cycleCollectorGlobalE"] + pub static mut CallbackObject__cycleCollectorGlobal: + CallbackObject_cycleCollection; +} +#[test] +fn bindgen_test_layout_CallbackObject() { + assert_eq!(::std::mem::size_of::() , 56usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] #[derive(Debug, Copy)] pub struct nsIChannel { pub _base: nsIRequest, @@ -5470,7 +5536,7 @@ pub struct nsIChannel_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIChannel__bindgen_ty_bindgen_id_135707 { +pub enum nsIChannel__bindgen_ty_bindgen_id_137651 { LOAD_DOCUMENT_URI = 65536, LOAD_RETARGETED_DOCUMENT_URI = 131072, LOAD_REPLACE = 262144, @@ -5482,6 +5548,12 @@ pub enum nsIChannel__bindgen_ty_bindgen_id_135707 { LOAD_EXPLICIT_CREDENTIALS = 16777216, LOAD_BYPASS_SERVICE_WORKER = 33554432, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIChannel__bindgen_ty_bindgen_id_137671 { + DISPOSITION_INLINE = 0, + DISPOSITION_ATTACHMENT = 1, +} #[test] fn bindgen_test_layout_nsIChannel() { assert_eq!(::std::mem::size_of::() , 8usize); @@ -5504,7 +5576,7 @@ pub struct nsIRequest_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIRequest__bindgen_ty_bindgen_id_135545 { +pub enum nsIRequest__bindgen_ty_bindgen_id_137489 { LOAD_REQUESTMASK = 65535, LOAD_NORMAL = 0, LOAD_BACKGROUND = 1, @@ -6059,13 +6131,13 @@ pub enum nsIPresShell_ReflowRootHandling { eNoPositionOrSizeChange = 1, eInferFromBitToAdd = 2, } -pub const SCROLL_LEFT: nsIPresShell__bindgen_ty_bindgen_id_154828 = - nsIPresShell__bindgen_ty_bindgen_id_154828::SCROLL_TOP; -pub const SCROLL_RIGHT: nsIPresShell__bindgen_ty_bindgen_id_154828 = - nsIPresShell__bindgen_ty_bindgen_id_154828::SCROLL_BOTTOM; +pub const SCROLL_LEFT: nsIPresShell__bindgen_ty_bindgen_id_155504 = + nsIPresShell__bindgen_ty_bindgen_id_155504::SCROLL_TOP; +pub const SCROLL_RIGHT: nsIPresShell__bindgen_ty_bindgen_id_155504 = + nsIPresShell__bindgen_ty_bindgen_id_155504::SCROLL_BOTTOM; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIPresShell__bindgen_ty_bindgen_id_154828 { +pub enum nsIPresShell__bindgen_ty_bindgen_id_155504 { SCROLL_TOP = 0, SCROLL_BOTTOM = 100, SCROLL_CENTER = 50, @@ -6091,6 +6163,80 @@ fn bindgen_test_layout_nsIPresShell_ScrollAxis() { impl Clone for nsIPresShell_ScrollAxis { fn clone(&self) -> Self { *self } } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_155535 { + SCROLL_FIRST_ANCESTOR_ONLY = 1, + SCROLL_OVERFLOW_HIDDEN = 2, + SCROLL_NO_PARENT_FRAMES = 4, + SCROLL_SMOOTH = 8, + SCROLL_SMOOTH_AUTO = 16, +} +#[repr(u32)] +/** + * Render the document into an arbitrary gfxContext + * Designed for getting a picture of a document or a piece of a document + * Note that callers will generally want to call FlushPendingNotifications + * to get an up-to-date view of the document + * @param aRect is the region to capture into the offscreen buffer, in the + * root frame's coordinate system (if aIgnoreViewportScrolling is false) + * or in the root scrolled frame's coordinate system + * (if aIgnoreViewportScrolling is true). The coordinates are in appunits. + * @param aFlags see below; + * set RENDER_IS_UNTRUSTED if the contents may be passed to malicious + * agents. E.g. we might choose not to paint the contents of sensitive widgets + * such as the file name in a file upload widget, and we might choose not + * to paint themes. + * set RENDER_IGNORE_VIEWPORT_SCROLLING to ignore + * clipping and scrollbar painting due to scrolling in the viewport + * set RENDER_CARET to draw the caret if one would be visible + * (by default the caret is never drawn) + * set RENDER_USE_LAYER_MANAGER to force rendering to go through + * the layer manager for the window. This may be unexpectedly slow + * (if the layer manager must read back data from the GPU) or low-quality + * (if the layer manager reads back pixel data and scales it + * instead of rendering using the appropriate scaling). It may also + * slow everything down if the area rendered does not correspond to the + * normal visible area of the window. + * set RENDER_ASYNC_DECODE_IMAGES to avoid having images synchronously + * decoded during rendering. + * (by default images decode synchronously with RenderDocument) + * set RENDER_DOCUMENT_RELATIVE to render the document as if there has been + * no scrolling and interpret |aRect| relative to the document instead of the + * CSS viewport. Only considered if RENDER_IGNORE_VIEWPORT_SCROLLING is set + * or the document is in ignore viewport scrolling mode + * (nsIPresShell::SetIgnoreViewportScrolling/IgnoringViewportScrolling). + * @param aBackgroundColor a background color to render onto + * @param aRenderedContext the gfxContext to render to. We render so that + * one CSS pixel in the source document is rendered to one unit in the current + * transform. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_155934 { + RENDER_IS_UNTRUSTED = 1, + RENDER_IGNORE_VIEWPORT_SCROLLING = 2, + RENDER_CARET = 4, + RENDER_USE_WIDGET_LAYERS = 8, + RENDER_ASYNC_DECODE_IMAGES = 16, + RENDER_DOCUMENT_RELATIVE = 32, + RENDER_DRAWWINDOW_NOT_FLUSHING = 64, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_155952 { + RENDER_IS_IMAGE = 256, + RENDER_AUTO_SCALE = 128, +} +#[repr(u32)] +/** + * Add a solid color item to the bottom of aList with frame aFrame and bounds + * aBounds. Checks first if this needs to be done by checking if aFrame is a + * canvas frame (if the FORCE_DRAW flag is passed then this check is skipped). + * aBackstopColor is composed behind the background color of the canvas, it is + * transparent by default. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_156075 { FORCE_DRAW = 1, } #[repr(C)] #[derive(Debug)] pub struct nsIPresShell_PointerCaptureInfo { @@ -6363,14 +6509,6 @@ impl Clone for nsDOMMutationObserver { } #[repr(C)] #[derive(Debug, Copy)] -pub struct ServoNodeData { - pub _address: u8, -} -impl Clone for ServoNodeData { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] pub struct BoxQuadOptions { pub _address: u8, } @@ -6485,67 +6623,67 @@ pub struct DOMPointInit { impl Clone for DOMPointInit { fn clone(&self) -> Self { *self } } -pub const NODE_HAS_LISTENERMANAGER: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_LISTENERMANAGER; -pub const NODE_HAS_PROPERTIES: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_PROPERTIES; -pub const NODE_IS_ANONYMOUS_ROOT: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_IS_ANONYMOUS_ROOT; -pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; -pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_IS_NATIVE_ANONYMOUS_ROOT; -pub const NODE_FORCE_XBL_BINDINGS: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_FORCE_XBL_BINDINGS; -pub const NODE_MAY_BE_IN_BINDING_MNGR: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_MAY_BE_IN_BINDING_MNGR; -pub const NODE_IS_EDITABLE: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_IS_EDITABLE; -pub const NODE_MAY_HAVE_CLASS: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_MAY_HAVE_CLASS; -pub const NODE_IS_IN_SHADOW_TREE: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_IS_IN_SHADOW_TREE; -pub const NODE_HAS_EMPTY_SELECTOR: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_EMPTY_SELECTOR; -pub const NODE_HAS_SLOW_SELECTOR: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_SLOW_SELECTOR; -pub const NODE_HAS_EDGE_CHILD_SELECTOR: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_EDGE_CHILD_SELECTOR; -pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: _bindgen_ty_bindgen_id_156879 +pub const NODE_HAS_LISTENERMANAGER: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_HAS_LISTENERMANAGER; +pub const NODE_HAS_PROPERTIES: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_HAS_PROPERTIES; +pub const NODE_IS_ANONYMOUS_ROOT: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_IS_ANONYMOUS_ROOT; +pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; +pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_IS_NATIVE_ANONYMOUS_ROOT; +pub const NODE_FORCE_XBL_BINDINGS: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_FORCE_XBL_BINDINGS; +pub const NODE_MAY_BE_IN_BINDING_MNGR: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_MAY_BE_IN_BINDING_MNGR; +pub const NODE_IS_EDITABLE: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_IS_EDITABLE; +pub const NODE_MAY_HAVE_CLASS: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_MAY_HAVE_CLASS; +pub const NODE_IS_IN_SHADOW_TREE: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_IS_IN_SHADOW_TREE; +pub const NODE_HAS_EMPTY_SELECTOR: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_HAS_EMPTY_SELECTOR; +pub const NODE_HAS_SLOW_SELECTOR: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_HAS_SLOW_SELECTOR; +pub const NODE_HAS_EDGE_CHILD_SELECTOR: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_HAS_EDGE_CHILD_SELECTOR; +pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: _bindgen_ty_bindgen_id_157496 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; -pub const NODE_ALL_SELECTOR_FLAGS: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_ALL_SELECTOR_FLAGS; -pub const NODE_NEEDS_FRAME: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_NEEDS_FRAME; -pub const NODE_DESCENDANTS_NEED_FRAMES: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_DESCENDANTS_NEED_FRAMES; -pub const NODE_HAS_ACCESSKEY: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_ACCESSKEY; -pub const NODE_HAS_DIRECTION_RTL: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_DIRECTION_RTL; -pub const NODE_HAS_DIRECTION_LTR: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_HAS_DIRECTION_LTR; -pub const NODE_ALL_DIRECTION_FLAGS: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_ALL_DIRECTION_FLAGS; -pub const NODE_CHROME_ONLY_ACCESS: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_CHROME_ONLY_ACCESS; -pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; -pub const NODE_SHARED_RESTYLE_BIT_1: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_SHARED_RESTYLE_BIT_1; -pub const NODE_SHARED_RESTYLE_BIT_2: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_SHARED_RESTYLE_BIT_2; -pub const NODE_IS_DIRTY_FOR_SERVO: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_SHARED_RESTYLE_BIT_1; -pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: _bindgen_ty_bindgen_id_156879 + _bindgen_ty_bindgen_id_157496::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; +pub const NODE_ALL_SELECTOR_FLAGS: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_ALL_SELECTOR_FLAGS; +pub const NODE_NEEDS_FRAME: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_NEEDS_FRAME; +pub const NODE_DESCENDANTS_NEED_FRAMES: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_DESCENDANTS_NEED_FRAMES; +pub const NODE_HAS_ACCESSKEY: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_HAS_ACCESSKEY; +pub const NODE_HAS_DIRECTION_RTL: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_HAS_DIRECTION_RTL; +pub const NODE_HAS_DIRECTION_LTR: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_HAS_DIRECTION_LTR; +pub const NODE_ALL_DIRECTION_FLAGS: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_ALL_DIRECTION_FLAGS; +pub const NODE_CHROME_ONLY_ACCESS: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_CHROME_ONLY_ACCESS; +pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; +pub const NODE_SHARED_RESTYLE_BIT_1: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_SHARED_RESTYLE_BIT_1; +pub const NODE_SHARED_RESTYLE_BIT_2: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_SHARED_RESTYLE_BIT_2; +pub const NODE_IS_DIRTY_FOR_SERVO: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_SHARED_RESTYLE_BIT_1; +pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: _bindgen_ty_bindgen_id_157496 = - _bindgen_ty_bindgen_id_156879::NODE_SHARED_RESTYLE_BIT_2; -pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: _bindgen_ty_bindgen_id_156879 = - _bindgen_ty_bindgen_id_156879::NODE_TYPE_SPECIFIC_BITS_OFFSET; + _bindgen_ty_bindgen_id_157496::NODE_SHARED_RESTYLE_BIT_2; +pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: _bindgen_ty_bindgen_id_157496 = + _bindgen_ty_bindgen_id_157496::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_bindgen_id_156879 { +pub enum _bindgen_ty_bindgen_id_157496 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -6603,7 +6741,7 @@ pub struct nsITimer_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsITimer__bindgen_ty_bindgen_id_173287 { +pub enum nsITimer__bindgen_ty_bindgen_id_174064 { TYPE_ONE_SHOT = 0, TYPE_REPEATING_SLACK = 1, TYPE_REPEATING_PRECISE = 2, @@ -6629,7 +6767,7 @@ pub struct nsExpirationState { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsExpirationState__bindgen_ty_bindgen_id_173763 { +pub enum nsExpirationState__bindgen_ty_bindgen_id_174540 { NOT_TRACKED = 15, MAX_INDEX_IN_GENERATION = 268435455, } @@ -6703,7 +6841,7 @@ pub struct imgIRequest_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum imgIRequest__bindgen_ty_bindgen_id_175185 { +pub enum imgIRequest__bindgen_ty_bindgen_id_175132 { STATUS_NONE = 0, STATUS_SIZE_AVAILABLE = 1, STATUS_LOAD_COMPLETE = 2, @@ -6713,6 +6851,13 @@ pub enum imgIRequest__bindgen_ty_bindgen_id_175185 { STATUS_IS_ANIMATED = 32, STATUS_HAS_TRANSPARENCY = 64, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum imgIRequest__bindgen_ty_bindgen_id_175212 { + CORS_NONE = 1, + CORS_ANONYMOUS = 2, + CORS_USE_CREDENTIALS = 3, +} #[test] fn bindgen_test_layout_imgIRequest() { assert_eq!(::std::mem::size_of::() , 8usize); @@ -6921,6 +7066,16 @@ fn bindgen_test_layout_FrameRequestCallback() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] +#[derive(Debug)] +pub struct CallbackFunction { + pub _base: CallbackObject, +} +#[test] +fn bindgen_test_layout_CallbackFunction() { + assert_eq!(::std::mem::size_of::() , 56usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] #[derive(Debug, Copy)] pub struct FullscreenRequest { pub _address: u8, @@ -7207,7 +7362,7 @@ pub type nsPresArena_FreeList_KeyType = u32; pub type nsPresArena_FreeList_KeyTypePointer = *const ::std::os::raw::c_void; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsPresArena_FreeList__bindgen_ty_bindgen_id_195712 { +pub enum nsPresArena_FreeList__bindgen_ty_bindgen_id_187768 { ALLOW_MEMMOVE = 0, } #[test] @@ -7234,7 +7389,7 @@ pub struct imgINotificationObserver_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum imgINotificationObserver__bindgen_ty_bindgen_id_195859 { +pub enum imgINotificationObserver__bindgen_ty_bindgen_id_187915 { SIZE_AVAILABLE = 1, FRAME_UPDATE = 2, FRAME_COMPLETE = 3, @@ -7483,7 +7638,7 @@ pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyTypePointer = *const gfxFontFeatureValueSet_FeatureValueHashKey; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum gfxFontFeatureValueSet_FeatureValueHashEntry__bindgen_ty_bindgen_id_197113 +pub enum gfxFontFeatureValueSet_FeatureValueHashEntry__bindgen_ty_bindgen_id_189169 { ALLOW_MEMMOVE = 1, } @@ -7879,23 +8034,23 @@ pub enum nsStyleUnit { } #[repr(C)] #[derive(Debug, Copy)] -pub struct _bindgen_ty_bindgen_id_197858 { +pub struct _bindgen_ty_bindgen_id_189922 { pub mInt: __BindgenUnionField, pub mFloat: __BindgenUnionField, pub mPointer: __BindgenUnionField<*mut ::std::os::raw::c_void>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout__bindgen_ty_bindgen_id_197858() { - assert_eq!(::std::mem::size_of::<_bindgen_ty_bindgen_id_197858>() , +fn bindgen_test_layout__bindgen_ty_bindgen_id_189922() { + assert_eq!(::std::mem::size_of::<_bindgen_ty_bindgen_id_189922>() , 8usize); - assert_eq!(::std::mem::align_of::<_bindgen_ty_bindgen_id_197858>() , + assert_eq!(::std::mem::align_of::<_bindgen_ty_bindgen_id_189922>() , 8usize); } -impl Clone for _bindgen_ty_bindgen_id_197858 { +impl Clone for _bindgen_ty_bindgen_id_189922 { fn clone(&self) -> Self { *self } } -pub type nsStyleUnion = _bindgen_ty_bindgen_id_197858; +pub type nsStyleUnion = _bindgen_ty_bindgen_id_189922; /** * Class that hold a single size specification used by the style * system. The size specification consists of two parts -- a number @@ -8340,6 +8495,27 @@ fn bindgen_test_layout_CSSVariableValues() { assert_eq!(::std::mem::size_of::() , 56usize); assert_eq!(::std::mem::align_of::() , 8usize); } +/** + * This struct represents a combined color from a numeric color and + * the current foreground color (currentcolor keyword). + * Conceptually, the formula is "color * (1 - p) + currentcolor * p" + * where p is mForegroundRatio. See mozilla::LinearBlendColors for + * the actual algorithm. + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct StyleComplexColor { + pub mColor: nscolor, + pub mForegroundRatio: u8, +} +#[test] +fn bindgen_test_layout_StyleComplexColor() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for StyleComplexColor { + fn clone(&self) -> Self { *self } +} pub const nsCSSPropertyID_eCSSProperty_COUNT_DUMMY: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_z_index; pub const nsCSSPropertyID_eCSSProperty_all: nsCSSPropertyID = @@ -8920,7 +9096,7 @@ fn bindgen_test_layout_imgRequestProxy() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_206771 { +pub struct bindgen_vtable__bindgen_id_199333 { } /** * An interface for observing changes to image state, as reported by @@ -8937,7 +9113,7 @@ pub struct bindgen_vtable__bindgen_id_206771 { #[repr(C)] #[derive(Debug)] pub struct IProgressObserver { - pub vtable_: *const bindgen_vtable__bindgen_id_206771, + pub vtable_: *const bindgen_vtable__bindgen_id_199333, pub _base: u64, } #[test] @@ -8959,7 +9135,7 @@ pub struct nsISupportsPriority_COMTypeInfo { } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsISupportsPriority__bindgen_ty_bindgen_id_206852 { +pub enum nsISupportsPriority__bindgen_ty_bindgen_id_199414 { PRIORITY_HIGHEST = -20, PRIORITY_HIGH = -10, PRIORITY_NORMAL = 0, @@ -9056,6 +9232,49 @@ fn bindgen_test_layout_FontFamilyListRefCnt() { assert_eq!(::std::mem::size_of::() , 32usize); assert_eq!(::std::mem::align_of::() , 8usize); } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct RGBAColorData { + pub mR: f32, + pub mG: f32, + pub mB: f32, + pub mA: f32, +} +#[test] +fn bindgen_test_layout_RGBAColorData() { + assert_eq!(::std::mem::size_of::() , 16usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for RGBAColorData { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct ComplexColorData { + pub mColor: RGBAColorData, + pub mForegroundRatio: f32, +} +#[test] +fn bindgen_test_layout_ComplexColorData() { + assert_eq!(::std::mem::size_of::() , 20usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for ComplexColorData { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct ComplexColorValue { + pub _base: ComplexColorData, + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, +} +pub type ComplexColorValue_HasThreadSafeRefCnt = FalseType; +#[test] +fn bindgen_test_layout_ComplexColorValue() { + assert_eq!(::std::mem::size_of::() , 40usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSUnit { @@ -9116,6 +9335,7 @@ pub enum nsCSSUnit { eCSSUnit_PercentageRGBAColor = 88, eCSSUnit_HSLColor = 89, eCSSUnit_HSLAColor = 90, + eCSSUnit_ComplexColor = 91, eCSSUnit_Percent = 100, eCSSUnit_Number = 101, eCSSUnit_PhysicalMillimeter = 200, @@ -9350,7 +9570,7 @@ fn bindgen_test_layout_nsCSSValueFloatColor() { #[derive(Debug)] pub struct nsCSSValue { pub mUnit: nsCSSUnit, - pub mValue: nsCSSValue__bindgen_ty_bindgen_id_209746, + pub mValue: nsCSSValue__bindgen_ty_bindgen_id_202409, } #[repr(C)] #[derive(Debug)] @@ -9366,7 +9586,7 @@ fn bindgen_test_layout_nsCSSValue_Array() { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCSSValue__bindgen_ty_bindgen_id_209746 { +pub struct nsCSSValue__bindgen_ty_bindgen_id_202409 { pub mInt: __BindgenUnionField, pub mFloat: __BindgenUnionField, pub mString: __BindgenUnionField<*mut nsStringBuffer>, @@ -9387,16 +9607,17 @@ pub struct nsCSSValue__bindgen_ty_bindgen_id_209746 { pub mPairListDependent: __BindgenUnionField<*mut nsCSSValuePairList>, pub mFloatColor: __BindgenUnionField<*mut nsCSSValueFloatColor>, pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>, + pub mComplexColor: __BindgenUnionField<*mut ComplexColorValue>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsCSSValue__bindgen_ty_bindgen_id_209746() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsCSSValue__bindgen_ty_bindgen_id_202409() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsCSSValue__bindgen_ty_bindgen_id_209746 { +impl Clone for nsCSSValue__bindgen_ty_bindgen_id_202409 { fn clone(&self) -> Self { *self } } #[test] @@ -9417,12 +9638,12 @@ fn bindgen_test_layout_nsCSSValueGradientStop() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_209953 { +pub struct bindgen_vtable__bindgen_id_202617 { } #[repr(C)] #[derive(Debug, Copy)] pub struct CounterStyle { - pub vtable_: *const bindgen_vtable__bindgen_id_209953, + pub vtable_: *const bindgen_vtable__bindgen_id_202617, pub mStyle: i32, } #[test] @@ -9503,6 +9724,9 @@ fn bindgen_test_layout_nsStyleVisibility() { assert_eq!(::std::mem::size_of::() , 7usize); assert_eq!(::std::mem::align_of::() , 1usize); } +pub type RawGeckoNode = nsINode; +pub type RawGeckoElement = Element; +pub type RawGeckoDocument = nsIDocument; #[repr(C)] #[derive(Debug)] pub struct FragmentOrURL { @@ -9619,26 +9843,26 @@ pub struct nsStyleImage { pub mCachedBIData: UniquePtr>, pub mType: nsStyleImageType, - pub __bindgen_anon_1: nsStyleImage__bindgen_ty_bindgen_id_211908, + pub __bindgen_anon_1: nsStyleImage__bindgen_ty_bindgen_id_204585, pub mCropRect: UniquePtr>, pub mImageTracked: bool, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleImage__bindgen_ty_bindgen_id_211908 { +pub struct nsStyleImage__bindgen_ty_bindgen_id_204585 { pub mImage: __BindgenUnionField<*mut imgRequestProxy>, pub mGradient: __BindgenUnionField<*mut nsStyleGradient>, pub mElementId: __BindgenUnionField<*mut u16>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleImage__bindgen_ty_bindgen_id_211908() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsStyleImage__bindgen_ty_bindgen_id_204585() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsStyleImage__bindgen_ty_bindgen_id_211908 { +impl Clone for nsStyleImage__bindgen_ty_bindgen_id_204585 { fn clone(&self) -> Self { *self } } #[test] @@ -9689,7 +9913,7 @@ pub struct nsStyleImageLayers { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsStyleImageLayers__bindgen_ty_bindgen_id_211954 { +pub enum nsStyleImageLayers__bindgen_ty_bindgen_id_204640 { shorthand = 0, color = 1, image = 2, @@ -10115,9 +10339,9 @@ pub struct nsStyleText { pub mTextEmphasisStyle: u8, pub mTextRendering: u8, pub mTabSize: i32, - pub mTextEmphasisColor: nscolor, - pub mWebkitTextFillColor: nscolor, - pub mWebkitTextStrokeColor: nscolor, + pub mTextEmphasisColor: StyleComplexColor, + pub mWebkitTextFillColor: StyleComplexColor, + pub mWebkitTextStrokeColor: StyleComplexColor, pub mWordSpacing: nsStyleCoord, pub mLetterSpacing: nsStyleCoord, pub mLineHeight: nsStyleCoord, @@ -10128,7 +10352,7 @@ pub struct nsStyleText { } #[test] fn bindgen_test_layout_nsStyleText() { - assert_eq!(::std::mem::size_of::() , 136usize); + assert_eq!(::std::mem::size_of::() , 152usize); assert_eq!(::std::mem::align_of::() , 8usize); } impl nsStyleText { @@ -10156,42 +10380,6 @@ impl nsStyleText { self._bitfield_1 &= !(2usize as u8); self._bitfield_1 |= ((val as u8 as u8) << 1u32) & (2usize as u8); } - #[inline] - pub fn mTextEmphasisColorForeground(&self) -> bool { - unsafe { - ::std::mem::transmute(((self._bitfield_1 & (4usize as u8)) >> - 2u32) as u8) - } - } - #[inline] - pub fn set_mTextEmphasisColorForeground(&mut self, val: bool) { - self._bitfield_1 &= !(4usize as u8); - self._bitfield_1 |= ((val as u8 as u8) << 2u32) & (4usize as u8); - } - #[inline] - pub fn mWebkitTextFillColorForeground(&self) -> bool { - unsafe { - ::std::mem::transmute(((self._bitfield_1 & (8usize as u8)) >> - 3u32) as u8) - } - } - #[inline] - pub fn set_mWebkitTextFillColorForeground(&mut self, val: bool) { - self._bitfield_1 &= !(8usize as u8); - self._bitfield_1 |= ((val as u8 as u8) << 3u32) & (8usize as u8); - } - #[inline] - pub fn mWebkitTextStrokeColorForeground(&self) -> bool { - unsafe { - ::std::mem::transmute(((self._bitfield_1 & (16usize as u8)) >> - 4u32) as u8) - } - } - #[inline] - pub fn set_mWebkitTextStrokeColorForeground(&mut self, val: bool) { - self._bitfield_1 &= !(16usize as u8); - self._bitfield_1 |= ((val as u8 as u8) << 4u32) & (16usize as u8); - } } #[repr(C)] #[derive(Debug, Copy)] @@ -10225,7 +10413,7 @@ impl Clone for nsStyleImageOrientation { #[derive(Debug, Copy)] pub struct nsTimingFunction { pub mType: nsTimingFunction_Type, - pub __bindgen_anon_1: nsTimingFunction__bindgen_ty_bindgen_id_213713, + pub __bindgen_anon_1: nsTimingFunction__bindgen_ty_bindgen_id_206393, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -10244,56 +10432,56 @@ pub enum nsTimingFunction_Type { pub enum nsTimingFunction_Keyword { Implicit = 0, Explicit = 1, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction__bindgen_ty_bindgen_id_213713 { - pub mFunc: __BindgenUnionField, - pub __bindgen_anon_1: __BindgenUnionField, +pub struct nsTimingFunction__bindgen_ty_bindgen_id_206393 { + pub mFunc: __BindgenUnionField, + pub __bindgen_anon_1: __BindgenUnionField, pub bindgen_union_field: [u32; 4usize], } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714 { +pub struct nsTimingFunction__bindgen_ty_bindgen_id_206393__bindgen_ty_bindgen_id_206394 { pub mX1: f32, pub mY1: f32, pub mX2: f32, pub mY2: f32, } #[test] -fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_206393__bindgen_ty_bindgen_id_206394() { + assert_eq!(::std::mem::size_of::() , 16usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } impl Clone for - nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714 + nsTimingFunction__bindgen_ty_bindgen_id_206393__bindgen_ty_bindgen_id_206394 { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725 { +pub struct nsTimingFunction__bindgen_ty_bindgen_id_206393__bindgen_ty_bindgen_id_206405 { pub mSteps: u32, } #[test] -fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_206393__bindgen_ty_bindgen_id_206405() { + assert_eq!(::std::mem::size_of::() , 4usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } impl Clone for - nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725 + nsTimingFunction__bindgen_ty_bindgen_id_206393__bindgen_ty_bindgen_id_206405 { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_213713() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_206393() { + assert_eq!(::std::mem::size_of::() , 16usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } -impl Clone for nsTimingFunction__bindgen_ty_bindgen_id_213713 { +impl Clone for nsTimingFunction__bindgen_ty_bindgen_id_206393 { fn clone(&self) -> Self { *self } } #[test] @@ -10354,13 +10542,13 @@ fn bindgen_test_layout_StyleBasicShape() { #[repr(C)] #[derive(Debug)] pub struct StyleShapeSource { - pub __bindgen_anon_1: StyleShapeSource__bindgen_ty_bindgen_id_214096, + pub __bindgen_anon_1: StyleShapeSource__bindgen_ty_bindgen_id_206776, pub mType: StyleShapeSourceType, pub mReferenceBox: ReferenceBox, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct StyleShapeSource__bindgen_ty_bindgen_id_214096 { +pub struct StyleShapeSource__bindgen_ty_bindgen_id_206776 { pub mBasicShape: __BindgenUnionField<*mut StyleBasicShape>, pub mURL: __BindgenUnionField<*mut FragmentOrURL>, pub bindgen_union_field: u64, @@ -10412,25 +10600,25 @@ pub enum nsStyleContentType { #[derive(Debug)] pub struct nsStyleContentData { pub mType: nsStyleContentType, - pub mContent: nsStyleContentData__bindgen_ty_bindgen_id_214180, + pub mContent: nsStyleContentData__bindgen_ty_bindgen_id_206860, pub mImageTracked: bool, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleContentData__bindgen_ty_bindgen_id_214180 { +pub struct nsStyleContentData__bindgen_ty_bindgen_id_206860 { pub mString: __BindgenUnionField<*mut u16>, pub mImage: __BindgenUnionField<*mut imgRequestProxy>, pub mCounters: __BindgenUnionField<*mut nsCSSValue_Array>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleContentData__bindgen_ty_bindgen_id_214180() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsStyleContentData__bindgen_ty_bindgen_id_206860() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsStyleContentData__bindgen_ty_bindgen_id_214180 { +impl Clone for nsStyleContentData__bindgen_ty_bindgen_id_206860 { fn clone(&self) -> Self { *self } } #[test] @@ -10555,25 +10743,25 @@ pub enum nsStyleSVGPaintType { #[repr(C)] #[derive(Debug)] pub struct nsStyleSVGPaint { - pub mPaint: nsStyleSVGPaint__bindgen_ty_bindgen_id_214579, + pub mPaint: nsStyleSVGPaint__bindgen_ty_bindgen_id_207259, pub mType: nsStyleSVGPaintType, pub mFallbackColor: nscolor, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleSVGPaint__bindgen_ty_bindgen_id_214579 { +pub struct nsStyleSVGPaint__bindgen_ty_bindgen_id_207259 { pub mColor: __BindgenUnionField, pub mPaintServer: __BindgenUnionField<*mut FragmentOrURL>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleSVGPaint__bindgen_ty_bindgen_id_214579() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsStyleSVGPaint__bindgen_ty_bindgen_id_207259() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsStyleSVGPaint__bindgen_ty_bindgen_id_214579 { +impl Clone for nsStyleSVGPaint__bindgen_ty_bindgen_id_207259 { fn clone(&self) -> Self { *self } } #[test] @@ -10608,7 +10796,7 @@ pub struct nsStyleSVG { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsStyleSVG__bindgen_ty_bindgen_id_214756 { +pub enum nsStyleSVG__bindgen_ty_bindgen_id_207436 { FILL_OPACITY_SOURCE_MASK = 3, STROKE_OPACITY_SOURCE_MASK = 12, STROKE_DASHARRAY_CONTEXT = 16, @@ -10627,23 +10815,23 @@ fn bindgen_test_layout_nsStyleSVG() { pub struct nsStyleFilter { pub mType: i32, pub mFilterParameter: nsStyleCoord, - pub __bindgen_anon_1: nsStyleFilter__bindgen_ty_bindgen_id_214822, + pub __bindgen_anon_1: nsStyleFilter__bindgen_ty_bindgen_id_207502, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleFilter__bindgen_ty_bindgen_id_214822 { +pub struct nsStyleFilter__bindgen_ty_bindgen_id_207502 { pub mURL: __BindgenUnionField<*mut FragmentOrURL>, pub mDropShadow: __BindgenUnionField<*mut nsCSSShadowArray>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleFilter__bindgen_ty_bindgen_id_214822() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsStyleFilter__bindgen_ty_bindgen_id_207502() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsStyleFilter__bindgen_ty_bindgen_id_214822 { +impl Clone for nsStyleFilter__bindgen_ty_bindgen_id_207502 { fn clone(&self) -> Self { *self } } #[test] diff --git a/ports/geckolib/gecko_bindings/structs_release.rs b/ports/geckolib/gecko_bindings/structs_release.rs index 933032081be..342c1298ccf 100644 --- a/ports/geckolib/gecko_bindings/structs_release.rs +++ b/ports/geckolib/gecko_bindings/structs_release.rs @@ -1,5 +1,10 @@ /* automatically generated by rust-bindgen */ +pub enum OpaqueStyleData {} +pub type ServoUnsafeCell = ::std::cell::UnsafeCell; +pub type ServoCell = ::std::cell::Cell; +pub type ServoNodeData = OpaqueStyleData; + #[derive(Debug)] #[repr(C)] pub struct __BindgenUnionField(::std::marker::PhantomData); @@ -1437,10 +1442,12 @@ impl Clone for JSCompartment { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] +#[derive(Debug, Copy, Clone)] pub struct atomic<_Tp> { - pub _M_i: _Tp, + pub _base: (), + pub _phantom_0: ::std::marker::PhantomData<_Tp>, } +pub type atomic___base = [u8; 0usize]; #[repr(C)] #[derive(Debug, Copy)] pub struct FreePolicy { @@ -1494,8 +1501,8 @@ pub enum JSWhyMagic { #[derive(Debug, Copy)] pub struct jsval_layout { pub asBits: __BindgenUnionField, - pub debugView: __BindgenUnionField, - pub s: __BindgenUnionField, + pub debugView: __BindgenUnionField, + pub s: __BindgenUnionField, pub asDouble: __BindgenUnionField, pub asPtr: __BindgenUnionField<*mut ::std::os::raw::c_void>, pub asWord: __BindgenUnionField, @@ -1504,20 +1511,20 @@ pub struct jsval_layout { } #[repr(C)] #[derive(Debug, Copy)] -pub struct jsval_layout__bindgen_ty_bindgen_id_60705 { +pub struct jsval_layout__bindgen_ty_bindgen_id_58985 { pub _bitfield_1: u64, } #[test] -fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_60705() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_58985() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for jsval_layout__bindgen_ty_bindgen_id_60705 { +impl Clone for jsval_layout__bindgen_ty_bindgen_id_58985 { fn clone(&self) -> Self { *self } } -impl jsval_layout__bindgen_ty_bindgen_id_60705 { +impl jsval_layout__bindgen_ty_bindgen_id_58985 { #[inline] pub fn payload47(&self) -> u64 { unsafe { @@ -1550,36 +1557,36 @@ impl jsval_layout__bindgen_ty_bindgen_id_60705 { } #[repr(C)] #[derive(Debug, Copy)] -pub struct jsval_layout__bindgen_ty_bindgen_id_60712 { - pub payload: jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713, +pub struct jsval_layout__bindgen_ty_bindgen_id_58992 { + pub payload: jsval_layout__bindgen_ty_bindgen_id_58992__bindgen_ty_bindgen_id_58993, } #[repr(C)] #[derive(Debug, Copy)] -pub struct jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713 { +pub struct jsval_layout__bindgen_ty_bindgen_id_58992__bindgen_ty_bindgen_id_58993 { pub i32: __BindgenUnionField, pub u32: __BindgenUnionField, pub why: __BindgenUnionField, pub bindgen_union_field: u32, } #[test] -fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_58992__bindgen_ty_bindgen_id_58993() { + assert_eq!(::std::mem::size_of::() , 4usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } impl Clone for - jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713 { + jsval_layout__bindgen_ty_bindgen_id_58992__bindgen_ty_bindgen_id_58993 { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_60712() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_58992() { + assert_eq!(::std::mem::size_of::() , 4usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } -impl Clone for jsval_layout__bindgen_ty_bindgen_id_60712 { +impl Clone for jsval_layout__bindgen_ty_bindgen_id_58992 { fn clone(&self) -> Self { *self } } impl Clone for jsval_layout { @@ -1613,7 +1620,7 @@ pub type nsAString_internal_size_type = u32; pub type nsAString_internal_index_type = u32; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsAString_internal__bindgen_ty_bindgen_id_62550 { +pub enum nsAString_internal__bindgen_ty_bindgen_id_60817 { F_NONE = 0, F_TERMINATED = 1, F_VOIDED = 2, @@ -1675,12 +1682,12 @@ fn bindgen_test_layout_nsString() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_63160 { +pub struct bindgen_vtable__bindgen_id_61427 { } #[repr(C)] #[derive(Debug, Copy)] pub struct nsStringComparator { - pub vtable_: *const bindgen_vtable__bindgen_id_63160, + pub vtable_: *const bindgen_vtable__bindgen_id_61427, } pub type nsStringComparator_char_type = u16; #[test] @@ -1722,7 +1729,7 @@ pub type nsACString_internal_size_type = u32; pub type nsACString_internal_index_type = u32; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsACString_internal__bindgen_ty_bindgen_id_64390 { +pub enum nsACString_internal__bindgen_ty_bindgen_id_62657 { F_NONE = 0, F_TERMINATED = 1, F_VOIDED = 2, @@ -1784,12 +1791,12 @@ fn bindgen_test_layout_nsCString() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_64942 { +pub struct bindgen_vtable__bindgen_id_63209 { } #[repr(C)] #[derive(Debug, Copy)] pub struct nsCStringComparator { - pub vtable_: *const bindgen_vtable__bindgen_id_64942, + pub vtable_: *const bindgen_vtable__bindgen_id_63209, } pub type nsCStringComparator_char_type = ::std::os::raw::c_char; #[test] @@ -1801,7 +1808,7 @@ impl Clone for nsCStringComparator { fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_65245 { +pub struct bindgen_vtable__bindgen_id_63253 { } /** * Basic component object model interface. Objects which implement @@ -1812,7 +1819,7 @@ pub struct bindgen_vtable__bindgen_id_65245 { #[repr(C)] #[derive(Debug, Copy)] pub struct nsISupports { - pub vtable_: *const bindgen_vtable__bindgen_id_65245, + pub vtable_: *const bindgen_vtable__bindgen_id_63253, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1830,7 +1837,7 @@ impl Clone for nsISupports { fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_65528 { +pub struct bindgen_vtable__bindgen_id_63536 { } /** * Participant implementation classes @@ -1838,7 +1845,7 @@ pub struct bindgen_vtable__bindgen_id_65528 { #[repr(C)] #[derive(Debug, Copy)] pub struct nsCycleCollectionParticipant { - pub vtable_: *const bindgen_vtable__bindgen_id_65528, + pub vtable_: *const bindgen_vtable__bindgen_id_63536, pub mMightSkip: bool, } #[test] @@ -2161,7 +2168,7 @@ fn bindgen_test_layout_ErrorResult() { #[derive(Debug)] pub struct TErrorResult { pub mResult: nsresult, - pub __bindgen_anon_1: TErrorResult__bindgen_ty_bindgen_id_70167, + pub __bindgen_anon_1: TErrorResult__bindgen_ty_bindgen_id_68156, pub _phantom_0: ::std::marker::PhantomData, } #[repr(C)] @@ -2178,7 +2185,7 @@ pub struct TErrorResult_DOMExceptionInfo { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct TErrorResult__bindgen_ty_bindgen_id_70167 { +pub struct TErrorResult__bindgen_ty_bindgen_id_68156 { pub mMessage: __BindgenUnionField<*mut TErrorResult_Message>, pub mJSException: __BindgenUnionField, pub mDOMExceptionInfo: __BindgenUnionField<*mut TErrorResult_DOMExceptionInfo>, @@ -2311,7 +2318,7 @@ impl nsIAtom { } } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_70938 { +pub struct bindgen_vtable__bindgen_id_68927 { } /** * Class to store the wrapper for an object. This can only be used with objects @@ -2353,7 +2360,7 @@ pub struct bindgen_vtable__bindgen_id_70938 { #[repr(C)] #[derive(Debug)] pub struct nsWrapperCache { - pub vtable_: *const bindgen_vtable__bindgen_id_70938, + pub vtable_: *const bindgen_vtable__bindgen_id_68927, pub mWrapper: *mut JSObject, pub mFlags: nsWrapperCache_FlagsType, } @@ -2378,9 +2385,23 @@ pub type nsWrapperCache_FlagsType = u32; * NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER). */ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsWrapperCache__bindgen_ty_bindgen_id_71134 { +pub enum nsWrapperCache__bindgen_ty_bindgen_id_69123 { WRAPPER_BIT_PRESERVED = 1, } +#[repr(u32)] +/** + * If this bit is set then the wrapper for the native object is not a DOM + * binding. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsWrapperCache__bindgen_ty_bindgen_id_69126 { + WRAPPER_IS_NOT_DOM_BINDING = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsWrapperCache__bindgen_ty_bindgen_id_69129 { + kWrapperFlagsMask = 3, +} #[test] fn bindgen_test_layout_nsWrapperCache() { assert_eq!(::std::mem::size_of::() , 24usize); @@ -2412,6 +2433,78 @@ fn bindgen_test_layout_GlobalObject() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pair<_T1, _T2> { + pub first: _T1, + pub second: _T2, +} +pub type pair_first_type<_T1> = _T1; +pub type pair_second_type<_T2> = _T2; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct input_iterator_tag { + pub _address: u8, +} +impl Clone for input_iterator_tag { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct forward_iterator_tag { + pub _address: u8, +} +impl Clone for forward_iterator_tag { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct bidirectional_iterator_tag { + pub _address: u8, +} +impl Clone for bidirectional_iterator_tag { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct random_access_iterator_tag { + pub _address: u8, +} +impl Clone for random_access_iterator_tag { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +pub struct bindgen_vtable__bindgen_id_87800 { +} +/** + * A class of objects that return source code on demand. + * + * When code is compiled with setSourceIsLazy(true), SpiderMonkey doesn't + * retain the source code (and doesn't do lazy bytecode generation). If we ever + * need the source code, say, in response to a call to Function.prototype. + * toSource or Debugger.Source.prototype.text, then we call the 'load' member + * function of the instance of this class that has hopefully been registered + * with the runtime, passing the code's URL, and hope that it will be able to + * find the source. + */ +#[repr(C)] +#[derive(Debug)] +pub struct SourceHook { + pub vtable_: *const bindgen_vtable__bindgen_id_87800, +} +#[test] +fn bindgen_test_layout_SourceHook() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __bit_const_reference<_Cp> { + pub __seg_: __bit_const_reference___storage_pointer<_Cp>, + pub __mask_: __bit_const_reference___storage_type<_Cp>, +} +pub type __bit_const_reference___storage_type<_Cp> = _Cp; +pub type __bit_const_reference___storage_pointer<_Cp> = _Cp; +#[repr(C)] #[derive(Debug, Copy)] pub struct nsScriptObjectTracer { pub _base: nsCycleCollectionParticipant, @@ -2446,37 +2539,165 @@ fn bindgen_test_layout_nsXPCOMCycleCollectionParticipant() { impl Clone for nsXPCOMCycleCollectionParticipant { fn clone(&self) -> Self { *self } } +pub type PLDHashNumber = u32; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pair<_T1, _T2> { - pub first: _T1, - pub second: _T2, +#[derive(Debug)] +pub struct PLDHashTable { + pub mOps: *const PLDHashTableOps, + pub mHashShift: i16, + pub mEntrySize: u32, + pub mEntryCount: u32, + pub mRemovedCount: u32, + pub mEntryStore: PLDHashTable_EntryStore, } -pub type pair_first_type<_T1> = _T1; -pub type pair_second_type<_T2> = _T2; #[repr(C)] -pub struct bindgen_vtable__bindgen_id_87955 { +#[derive(Debug)] +pub struct PLDHashTable_EntryStore { + pub mEntryStore: *mut ::std::os::raw::c_char, + pub mGeneration: u32, } +#[test] +fn bindgen_test_layout_PLDHashTable_EntryStore() { + assert_eq!(::std::mem::size_of::() , 16usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct PLDHashTable_Iterator { + pub mTable: *mut PLDHashTable, + pub mStart: *mut ::std::os::raw::c_char, + pub mLimit: *mut ::std::os::raw::c_char, + pub mCurrent: *mut ::std::os::raw::c_char, + pub mNexts: u32, + pub mNextsLimit: u32, + pub mHaveRemoved: bool, +} +#[test] +fn bindgen_test_layout_PLDHashTable_Iterator() { + assert_eq!(::std::mem::size_of::() , 48usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } +extern "C" { + #[link_name = "_ZN12PLDHashTable12kMaxCapacityE"] + pub static PLDHashTable_kMaxCapacity: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable12kMinCapacityE"] + pub static PLDHashTable_kMinCapacity: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable17kMaxInitialLengthE"] + pub static PLDHashTable_kMaxInitialLength: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable21kDefaultInitialLengthE"] + pub static PLDHashTable_kDefaultInitialLength: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable9kHashBitsE"] + pub static PLDHashTable_kHashBits: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable12kGoldenRatioE"] + pub static PLDHashTable_kGoldenRatio: u32; +} +extern "C" { + #[link_name = "_ZN12PLDHashTable14kCollisionFlagE"] + pub static PLDHashTable_kCollisionFlag: PLDHashNumber; +} +#[test] +fn bindgen_test_layout_PLDHashTable() { + assert_eq!(::std::mem::size_of::() , 40usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PLDHashTableOps { + pub hashKey: PLDHashHashKey, + pub matchEntry: PLDHashMatchEntry, + pub moveEntry: PLDHashMoveEntry, + pub clearEntry: PLDHashClearEntry, + pub initEntry: PLDHashInitEntry, +} +#[test] +fn bindgen_test_layout_PLDHashTableOps() { + assert_eq!(::std::mem::size_of::() , 40usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +impl Clone for PLDHashTableOps { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PLDHashEntryHdr { + pub mKeyHash: PLDHashNumber, +} +#[test] +fn bindgen_test_layout_PLDHashEntryHdr() { + assert_eq!(::std::mem::size_of::() , 4usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for PLDHashEntryHdr { + fn clone(&self) -> Self { *self } +} +pub type PLDHashHashKey = + ::std::option::Option ::std::os::raw::c_uint>; +pub type PLDHashMatchEntry = + ::std::option::Option bool>; +pub type PLDHashMoveEntry = + ::std::option::Option; +pub type PLDHashClearEntry = + ::std::option::Option; +pub type PLDHashInitEntry = + ::std::option::Option; /** - * A class of objects that return source code on demand. + * hashkey wrapper using T* KeyType * - * When code is compiled with setSourceIsLazy(true), SpiderMonkey doesn't - * retain the source code (and doesn't do lazy bytecode generation). If we ever - * need the source code, say, in response to a call to Function.prototype. - * toSource or Debugger.Source.prototype.text, then we call the 'load' member - * function of the instance of this class that has hopefully been registered - * with the runtime, passing the code's URL, and hope that it will be able to - * find the source. + * @see nsTHashtable::EntryType for specification */ #[repr(C)] #[derive(Debug)] -pub struct SourceHook { - pub vtable_: *const bindgen_vtable__bindgen_id_87955, +pub struct nsPtrHashKey { + pub _base: PLDHashEntryHdr, + pub mKey: *mut T, +} +pub type nsPtrHashKey_KeyType = *mut T; +pub type nsPtrHashKey_KeyTypePointer = *mut T; +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsPtrHashKey__bindgen_ty_bindgen_id_98662 { ALLOW_MEMMOVE = 0, } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIRunnable { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIRunnable_COMTypeInfo { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData, + pub _phantom_1: ::std::marker::PhantomData, } #[test] -fn bindgen_test_layout_SourceHook() { - assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() , 8usize); +fn bindgen_test_layout_nsIRunnable() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +impl Clone for nsIRunnable { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] @@ -2492,7 +2713,7 @@ pub struct nsIPrincipal_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIPrincipal__bindgen_ty_bindgen_id_93396 { +pub enum nsIPrincipal__bindgen_ty_bindgen_id_100679 { APP_STATUS_NOT_INSTALLED = 0, APP_STATUS_INSTALLED = 1, APP_STATUS_PRIVILEGED = 2, @@ -2810,7 +3031,7 @@ pub type nsIDocument_FrameRequestCallbackList = nsTArray>; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIDocument__bindgen_ty_bindgen_id_102082 { REQUEST_DISCARD = 1, } +pub enum nsIDocument__bindgen_ty_bindgen_id_109385 { REQUEST_DISCARD = 1, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsIDocument_DeprecatedOperations { @@ -3501,10 +3722,9 @@ pub struct nsINode { pub mNextSibling: *mut nsIContent, pub mPreviousSibling: *mut nsIContent, pub mFirstChild: *mut nsIContent, - pub __bindgen_anon_1: nsINode__bindgen_ty_bindgen_id_98796, + pub __bindgen_anon_1: nsINode__bindgen_ty_bindgen_id_106084, pub mSlots: *mut nsINode_nsSlots, - pub mServoNodeData: UniquePtr>, + pub mServoData: ServoCell<*mut ServoNodeData>, } pub type nsINode_BoxQuadOptions = BoxQuadOptions; pub type nsINode_ConvertCoordinateOptions = ConvertCoordinateOptions; @@ -3527,7 +3747,7 @@ pub struct nsINode_COMTypeInfo { * Bit-flags to pass (or'ed together) to IsNodeOfType() */ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsINode__bindgen_ty_bindgen_id_94940 { +pub enum nsINode__bindgen_ty_bindgen_id_102222 { eCONTENT = 1, eDOCUMENT = 2, eATTRIBUTE = 4, @@ -3542,12 +3762,12 @@ pub enum nsINode__bindgen_ty_bindgen_id_94940 { eFILTER = 2048, } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_95709 { +pub struct bindgen_vtable__bindgen_id_102991 { } #[repr(C)] #[derive(Debug)] pub struct nsINode_nsSlots { - pub vtable_: *const bindgen_vtable__bindgen_id_95709, + pub vtable_: *const bindgen_vtable__bindgen_id_102991, /** * A list of mutation observers */ @@ -3616,19 +3836,19 @@ pub enum nsINode_BooleanFlag { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsINode__bindgen_ty_bindgen_id_98796 { +pub struct nsINode__bindgen_ty_bindgen_id_106084 { pub mPrimaryFrame: __BindgenUnionField<*mut nsIFrame>, pub mSubtreeRoot: __BindgenUnionField<*mut nsINode>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsINode__bindgen_ty_bindgen_id_98796() { - assert_eq!(::std::mem::size_of::() , - 8usize); - assert_eq!(::std::mem::align_of::() +fn bindgen_test_layout_nsINode__bindgen_ty_bindgen_id_106084() { + assert_eq!(::std::mem::size_of::() + , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsINode__bindgen_ty_bindgen_id_98796 { +impl Clone for nsINode__bindgen_ty_bindgen_id_106084 { fn clone(&self) -> Self { *self } } #[test] @@ -3912,26 +4132,6 @@ impl Clone for nsIVariant { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsIRunnable { - pub _base: nsISupports, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsIRunnable_COMTypeInfo { - pub _address: u8, - pub _phantom_0: ::std::marker::PhantomData, - pub _phantom_1: ::std::marker::PhantomData, -} -#[test] -fn bindgen_test_layout_nsIRunnable() { - assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for nsIRunnable { - fn clone(&self) -> Self { *self } -} -#[repr(C)] #[derive(Debug)] pub struct Runnable { pub _base: nsIRunnable, @@ -3978,7 +4178,7 @@ pub struct nsIDOMNode_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIDOMNode__bindgen_ty_bindgen_id_107063 { +pub enum nsIDOMNode__bindgen_ty_bindgen_id_114369 { ELEMENT_NODE = 1, ATTRIBUTE_NODE = 2, TEXT_NODE = 3, @@ -3992,6 +4192,16 @@ pub enum nsIDOMNode__bindgen_ty_bindgen_id_107063 { DOCUMENT_FRAGMENT_NODE = 11, NOTATION_NODE = 12, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDOMNode__bindgen_ty_bindgen_id_114588 { + DOCUMENT_POSITION_DISCONNECTED = 1, + DOCUMENT_POSITION_PRECEDING = 2, + DOCUMENT_POSITION_FOLLOWING = 4, + DOCUMENT_POSITION_CONTAINS = 8, + DOCUMENT_POSITION_CONTAINED_BY = 16, + DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32, +} #[test] fn bindgen_test_layout_nsIDOMNode() { assert_eq!(::std::mem::size_of::() , 8usize); @@ -4836,242 +5046,6 @@ pub enum Side { eSideBottom = 2, eSideLeft = 3, } -#[repr(C)] -#[derive(Debug)] -pub struct CallbackFunction { - pub _base: CallbackObject, -} -#[test] -fn bindgen_test_layout_CallbackFunction() { - assert_eq!(::std::mem::size_of::() , 56usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct CallbackObject { - pub _base: nsISupports, - pub mRefCnt: nsCycleCollectingAutoRefCnt, - pub _mOwningThread: nsAutoOwningThread, - pub mCallback: u64, - pub mCreationStack: u64, - pub mIncumbentGlobal: nsCOMPtr, - pub mIncumbentJSGlobal: u64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CallbackObject_COMTypeInfo { - pub _address: u8, - pub _phantom_0: ::std::marker::PhantomData, - pub _phantom_1: ::std::marker::PhantomData, -} -pub type CallbackObject_HasThreadSafeRefCnt = FalseType; -#[repr(C)] -#[derive(Debug, Copy)] -pub struct CallbackObject_cycleCollection { - pub _base: nsXPCOMCycleCollectionParticipant, -} -#[test] -fn bindgen_test_layout_CallbackObject_cycleCollection() { - assert_eq!(::std::mem::size_of::() , - 16usize); - assert_eq!(::std::mem::align_of::() , - 8usize); -} -impl Clone for CallbackObject_cycleCollection { - fn clone(&self) -> Self { *self } -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum CallbackObject_ExceptionHandling { - eReportExceptions = 0, - eRethrowContentExceptions = 1, - eRethrowExceptions = 2, -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct CallbackObject_FastCallbackConstructor { - pub _address: u8, -} -#[test] -fn bindgen_test_layout_CallbackObject_FastCallbackConstructor() { - assert_eq!(::std::mem::size_of::() - , 1usize); - assert_eq!(::std::mem::align_of::() - , 1usize); -} -impl Clone for CallbackObject_FastCallbackConstructor { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug)] -pub struct CallbackObject_CallSetup { - pub mCx: *mut JSContext, - pub mCompartment: *mut JSCompartment, - pub mAutoEntryScript: [u64; 19usize], - pub mAutoIncumbentScript: [u64; 5usize], - pub mRootedCallable: [u64; 4usize], - pub mAsyncStack: [u64; 4usize], - pub mAsyncStackSetter: [u64; 7usize], - pub mAc: [u64; 3usize], - pub mErrorResult: *mut ErrorResult, - pub mExceptionHandling: CallbackObject_ExceptionHandling, - pub mIsMainThread: bool, -} -#[test] -fn bindgen_test_layout_CallbackObject_CallSetup() { - assert_eq!(::std::mem::size_of::() , 368usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -extern "C" { - #[link_name = "_ZN7mozilla3dom14CallbackObject21_cycleCollectorGlobalE"] - pub static mut CallbackObject__cycleCollectorGlobal: - CallbackObject_cycleCollection; -} -#[test] -fn bindgen_test_layout_CallbackObject() { - assert_eq!(::std::mem::size_of::() , 56usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -pub type PLDHashNumber = u32; -#[repr(C)] -#[derive(Debug)] -pub struct PLDHashTable { - pub mOps: *const PLDHashTableOps, - pub mHashShift: i16, - pub mEntrySize: u32, - pub mEntryCount: u32, - pub mRemovedCount: u32, - pub mEntryStore: PLDHashTable_EntryStore, -} -#[repr(C)] -#[derive(Debug)] -pub struct PLDHashTable_EntryStore { - pub mEntryStore: *mut ::std::os::raw::c_char, - pub mGeneration: u32, -} -#[test] -fn bindgen_test_layout_PLDHashTable_EntryStore() { - assert_eq!(::std::mem::size_of::() , 16usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct PLDHashTable_Iterator { - pub mTable: *mut PLDHashTable, - pub mStart: *mut ::std::os::raw::c_char, - pub mLimit: *mut ::std::os::raw::c_char, - pub mCurrent: *mut ::std::os::raw::c_char, - pub mNexts: u32, - pub mNextsLimit: u32, - pub mHaveRemoved: bool, -} -#[test] -fn bindgen_test_layout_PLDHashTable_Iterator() { - assert_eq!(::std::mem::size_of::() , 48usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } -extern "C" { - #[link_name = "_ZN12PLDHashTable12kMaxCapacityE"] - pub static PLDHashTable_kMaxCapacity: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable12kMinCapacityE"] - pub static PLDHashTable_kMinCapacity: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable17kMaxInitialLengthE"] - pub static PLDHashTable_kMaxInitialLength: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable21kDefaultInitialLengthE"] - pub static PLDHashTable_kDefaultInitialLength: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable9kHashBitsE"] - pub static PLDHashTable_kHashBits: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable12kGoldenRatioE"] - pub static PLDHashTable_kGoldenRatio: u32; -} -extern "C" { - #[link_name = "_ZN12PLDHashTable14kCollisionFlagE"] - pub static PLDHashTable_kCollisionFlag: PLDHashNumber; -} -#[test] -fn bindgen_test_layout_PLDHashTable() { - assert_eq!(::std::mem::size_of::() , 40usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct PLDHashTableOps { - pub hashKey: PLDHashHashKey, - pub matchEntry: PLDHashMatchEntry, - pub moveEntry: PLDHashMoveEntry, - pub clearEntry: PLDHashClearEntry, - pub initEntry: PLDHashInitEntry, -} -#[test] -fn bindgen_test_layout_PLDHashTableOps() { - assert_eq!(::std::mem::size_of::() , 40usize); - assert_eq!(::std::mem::align_of::() , 8usize); -} -impl Clone for PLDHashTableOps { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct PLDHashEntryHdr { - pub mKeyHash: PLDHashNumber, -} -#[test] -fn bindgen_test_layout_PLDHashEntryHdr() { - assert_eq!(::std::mem::size_of::() , 4usize); - assert_eq!(::std::mem::align_of::() , 4usize); -} -impl Clone for PLDHashEntryHdr { - fn clone(&self) -> Self { *self } -} -pub type PLDHashHashKey = - ::std::option::Option ::std::os::raw::c_uint>; -pub type PLDHashMatchEntry = - ::std::option::Option bool>; -pub type PLDHashMoveEntry = - ::std::option::Option; -pub type PLDHashClearEntry = - ::std::option::Option; -pub type PLDHashInitEntry = - ::std::option::Option; -/** - * hashkey wrapper using T* KeyType - * - * @see nsTHashtable::EntryType for specification - */ -#[repr(C)] -#[derive(Debug)] -pub struct nsPtrHashKey { - pub _base: PLDHashEntryHdr, - pub mKey: *mut T, -} -pub type nsPtrHashKey_KeyType = *mut T; -pub type nsPtrHashKey_KeyTypePointer = *mut T; -#[repr(i32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsPtrHashKey__bindgen_ty_bindgen_id_111637 { ALLOW_MEMMOVE = 0, } /** * A node of content in a document's content model. This interface * is supported by all content objects. @@ -5091,11 +5065,17 @@ pub struct nsIContent_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIContent__bindgen_ty_bindgen_id_112977 { +pub enum nsIContent__bindgen_ty_bindgen_id_118479 { eAllChildren = 0, eAllButXBL = 1, eSkipPlaceholderContent = 2, } +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIContent__bindgen_ty_bindgen_id_118715 { + ATTR_MISSING = -1, + ATTR_VALUE_NO_MATCH = -2, +} /** * Check whether this content node's given attribute has one of a given * list of values. If there is a match, we return the index in the list @@ -5298,7 +5278,7 @@ pub struct FragmentOrElement_nsDOMSlots { * @see FragmentOrElement::GetAttributes */ pub mAttributeMap: RefPtr, - pub __bindgen_anon_1: FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307, + pub __bindgen_anon_1: FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119810, /** * An object implementing the .children property for this element. */ @@ -5335,7 +5315,7 @@ pub struct FragmentOrElement_nsDOMSlots { } #[repr(C)] #[derive(Debug, Copy)] -pub struct FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307 { +pub struct FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119810 { /** * The nearest enclosing content node with a binding that created us. * @see FragmentOrElement::GetBindingParent @@ -5348,13 +5328,13 @@ pub struct FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307 { pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119810() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307 { +impl Clone for FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119810 { fn clone(&self) -> Self { *self } } #[test] @@ -5405,6 +5385,92 @@ impl Clone for PrefSetting { fn clone(&self) -> Self { *self } } #[repr(C)] +#[derive(Debug)] +pub struct CallbackObject { + pub _base: nsISupports, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mCallback: u64, + pub mCreationStack: u64, + pub mIncumbentGlobal: nsCOMPtr, + pub mIncumbentJSGlobal: u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CallbackObject_COMTypeInfo { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData, + pub _phantom_1: ::std::marker::PhantomData, +} +pub type CallbackObject_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct CallbackObject_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_CallbackObject_cycleCollection() { + assert_eq!(::std::mem::size_of::() , + 16usize); + assert_eq!(::std::mem::align_of::() , + 8usize); +} +impl Clone for CallbackObject_cycleCollection { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum CallbackObject_ExceptionHandling { + eReportExceptions = 0, + eRethrowContentExceptions = 1, + eRethrowExceptions = 2, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct CallbackObject_FastCallbackConstructor { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_CallbackObject_FastCallbackConstructor() { + assert_eq!(::std::mem::size_of::() + , 1usize); + assert_eq!(::std::mem::align_of::() + , 1usize); +} +impl Clone for CallbackObject_FastCallbackConstructor { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct CallbackObject_CallSetup { + pub mCx: *mut JSContext, + pub mCompartment: *mut JSCompartment, + pub mAutoEntryScript: [u64; 19usize], + pub mAutoIncumbentScript: [u64; 5usize], + pub mRootedCallable: [u64; 4usize], + pub mAsyncStack: [u64; 4usize], + pub mAsyncStackSetter: [u64; 7usize], + pub mAc: [u64; 3usize], + pub mErrorResult: *mut ErrorResult, + pub mExceptionHandling: CallbackObject_ExceptionHandling, + pub mIsMainThread: bool, +} +#[test] +fn bindgen_test_layout_CallbackObject_CallSetup() { + assert_eq!(::std::mem::size_of::() , 368usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +extern "C" { + #[link_name = "_ZN7mozilla3dom14CallbackObject21_cycleCollectorGlobalE"] + pub static mut CallbackObject__cycleCollectorGlobal: + CallbackObject_cycleCollection; +} +#[test] +fn bindgen_test_layout_CallbackObject() { + assert_eq!(::std::mem::size_of::() , 56usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] #[derive(Debug, Copy)] pub struct nsIChannel { pub _base: nsIRequest, @@ -5418,7 +5484,7 @@ pub struct nsIChannel_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIChannel__bindgen_ty_bindgen_id_129733 { +pub enum nsIChannel__bindgen_ty_bindgen_id_131603 { LOAD_DOCUMENT_URI = 65536, LOAD_RETARGETED_DOCUMENT_URI = 131072, LOAD_REPLACE = 262144, @@ -5430,6 +5496,12 @@ pub enum nsIChannel__bindgen_ty_bindgen_id_129733 { LOAD_EXPLICIT_CREDENTIALS = 16777216, LOAD_BYPASS_SERVICE_WORKER = 33554432, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIChannel__bindgen_ty_bindgen_id_131623 { + DISPOSITION_INLINE = 0, + DISPOSITION_ATTACHMENT = 1, +} #[test] fn bindgen_test_layout_nsIChannel() { assert_eq!(::std::mem::size_of::() , 8usize); @@ -5452,7 +5524,7 @@ pub struct nsIRequest_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIRequest__bindgen_ty_bindgen_id_129571 { +pub enum nsIRequest__bindgen_ty_bindgen_id_131441 { LOAD_REQUESTMASK = 65535, LOAD_NORMAL = 0, LOAD_BACKGROUND = 1, @@ -6005,13 +6077,13 @@ pub enum nsIPresShell_ReflowRootHandling { eNoPositionOrSizeChange = 1, eInferFromBitToAdd = 2, } -pub const SCROLL_LEFT: nsIPresShell__bindgen_ty_bindgen_id_148842 = - nsIPresShell__bindgen_ty_bindgen_id_148842::SCROLL_TOP; -pub const SCROLL_RIGHT: nsIPresShell__bindgen_ty_bindgen_id_148842 = - nsIPresShell__bindgen_ty_bindgen_id_148842::SCROLL_BOTTOM; +pub const SCROLL_LEFT: nsIPresShell__bindgen_ty_bindgen_id_149444 = + nsIPresShell__bindgen_ty_bindgen_id_149444::SCROLL_TOP; +pub const SCROLL_RIGHT: nsIPresShell__bindgen_ty_bindgen_id_149444 = + nsIPresShell__bindgen_ty_bindgen_id_149444::SCROLL_BOTTOM; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsIPresShell__bindgen_ty_bindgen_id_148842 { +pub enum nsIPresShell__bindgen_ty_bindgen_id_149444 { SCROLL_TOP = 0, SCROLL_BOTTOM = 100, SCROLL_CENTER = 50, @@ -6037,6 +6109,80 @@ fn bindgen_test_layout_nsIPresShell_ScrollAxis() { impl Clone for nsIPresShell_ScrollAxis { fn clone(&self) -> Self { *self } } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_149475 { + SCROLL_FIRST_ANCESTOR_ONLY = 1, + SCROLL_OVERFLOW_HIDDEN = 2, + SCROLL_NO_PARENT_FRAMES = 4, + SCROLL_SMOOTH = 8, + SCROLL_SMOOTH_AUTO = 16, +} +#[repr(u32)] +/** + * Render the document into an arbitrary gfxContext + * Designed for getting a picture of a document or a piece of a document + * Note that callers will generally want to call FlushPendingNotifications + * to get an up-to-date view of the document + * @param aRect is the region to capture into the offscreen buffer, in the + * root frame's coordinate system (if aIgnoreViewportScrolling is false) + * or in the root scrolled frame's coordinate system + * (if aIgnoreViewportScrolling is true). The coordinates are in appunits. + * @param aFlags see below; + * set RENDER_IS_UNTRUSTED if the contents may be passed to malicious + * agents. E.g. we might choose not to paint the contents of sensitive widgets + * such as the file name in a file upload widget, and we might choose not + * to paint themes. + * set RENDER_IGNORE_VIEWPORT_SCROLLING to ignore + * clipping and scrollbar painting due to scrolling in the viewport + * set RENDER_CARET to draw the caret if one would be visible + * (by default the caret is never drawn) + * set RENDER_USE_LAYER_MANAGER to force rendering to go through + * the layer manager for the window. This may be unexpectedly slow + * (if the layer manager must read back data from the GPU) or low-quality + * (if the layer manager reads back pixel data and scales it + * instead of rendering using the appropriate scaling). It may also + * slow everything down if the area rendered does not correspond to the + * normal visible area of the window. + * set RENDER_ASYNC_DECODE_IMAGES to avoid having images synchronously + * decoded during rendering. + * (by default images decode synchronously with RenderDocument) + * set RENDER_DOCUMENT_RELATIVE to render the document as if there has been + * no scrolling and interpret |aRect| relative to the document instead of the + * CSS viewport. Only considered if RENDER_IGNORE_VIEWPORT_SCROLLING is set + * or the document is in ignore viewport scrolling mode + * (nsIPresShell::SetIgnoreViewportScrolling/IgnoringViewportScrolling). + * @param aBackgroundColor a background color to render onto + * @param aRenderedContext the gfxContext to render to. We render so that + * one CSS pixel in the source document is rendered to one unit in the current + * transform. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_149843 { + RENDER_IS_UNTRUSTED = 1, + RENDER_IGNORE_VIEWPORT_SCROLLING = 2, + RENDER_CARET = 4, + RENDER_USE_WIDGET_LAYERS = 8, + RENDER_ASYNC_DECODE_IMAGES = 16, + RENDER_DOCUMENT_RELATIVE = 32, + RENDER_DRAWWINDOW_NOT_FLUSHING = 64, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_149861 { + RENDER_IS_IMAGE = 256, + RENDER_AUTO_SCALE = 128, +} +#[repr(u32)] +/** + * Add a solid color item to the bottom of aList with frame aFrame and bounds + * aBounds. Checks first if this needs to be done by checking if aFrame is a + * canvas frame (if the FORCE_DRAW flag is passed then this check is skipped). + * aBackstopColor is composed behind the background color of the canvas, it is + * transparent by default. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_149977 { FORCE_DRAW = 1, } #[repr(C)] #[derive(Debug)] pub struct nsIPresShell_PointerCaptureInfo { @@ -6309,14 +6455,6 @@ impl Clone for nsDOMMutationObserver { } #[repr(C)] #[derive(Debug, Copy)] -pub struct ServoNodeData { - pub _address: u8, -} -impl Clone for ServoNodeData { - fn clone(&self) -> Self { *self } -} -#[repr(C)] -#[derive(Debug, Copy)] pub struct BoxQuadOptions { pub _address: u8, } @@ -6431,67 +6569,67 @@ pub struct DOMPointInit { impl Clone for DOMPointInit { fn clone(&self) -> Self { *self } } -pub const NODE_HAS_LISTENERMANAGER: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_LISTENERMANAGER; -pub const NODE_HAS_PROPERTIES: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_PROPERTIES; -pub const NODE_IS_ANONYMOUS_ROOT: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_IS_ANONYMOUS_ROOT; -pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; -pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_IS_NATIVE_ANONYMOUS_ROOT; -pub const NODE_FORCE_XBL_BINDINGS: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_FORCE_XBL_BINDINGS; -pub const NODE_MAY_BE_IN_BINDING_MNGR: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_MAY_BE_IN_BINDING_MNGR; -pub const NODE_IS_EDITABLE: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_IS_EDITABLE; -pub const NODE_MAY_HAVE_CLASS: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_MAY_HAVE_CLASS; -pub const NODE_IS_IN_SHADOW_TREE: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_IS_IN_SHADOW_TREE; -pub const NODE_HAS_EMPTY_SELECTOR: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_EMPTY_SELECTOR; -pub const NODE_HAS_SLOW_SELECTOR: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_SLOW_SELECTOR; -pub const NODE_HAS_EDGE_CHILD_SELECTOR: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_EDGE_CHILD_SELECTOR; -pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: _bindgen_ty_bindgen_id_150829 +pub const NODE_HAS_LISTENERMANAGER: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_HAS_LISTENERMANAGER; +pub const NODE_HAS_PROPERTIES: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_HAS_PROPERTIES; +pub const NODE_IS_ANONYMOUS_ROOT: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_IS_ANONYMOUS_ROOT; +pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; +pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_IS_NATIVE_ANONYMOUS_ROOT; +pub const NODE_FORCE_XBL_BINDINGS: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_FORCE_XBL_BINDINGS; +pub const NODE_MAY_BE_IN_BINDING_MNGR: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_MAY_BE_IN_BINDING_MNGR; +pub const NODE_IS_EDITABLE: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_IS_EDITABLE; +pub const NODE_MAY_HAVE_CLASS: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_MAY_HAVE_CLASS; +pub const NODE_IS_IN_SHADOW_TREE: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_IS_IN_SHADOW_TREE; +pub const NODE_HAS_EMPTY_SELECTOR: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_HAS_EMPTY_SELECTOR; +pub const NODE_HAS_SLOW_SELECTOR: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_HAS_SLOW_SELECTOR; +pub const NODE_HAS_EDGE_CHILD_SELECTOR: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_HAS_EDGE_CHILD_SELECTOR; +pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: _bindgen_ty_bindgen_id_151372 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; -pub const NODE_ALL_SELECTOR_FLAGS: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_ALL_SELECTOR_FLAGS; -pub const NODE_NEEDS_FRAME: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_NEEDS_FRAME; -pub const NODE_DESCENDANTS_NEED_FRAMES: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_DESCENDANTS_NEED_FRAMES; -pub const NODE_HAS_ACCESSKEY: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_ACCESSKEY; -pub const NODE_HAS_DIRECTION_RTL: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_DIRECTION_RTL; -pub const NODE_HAS_DIRECTION_LTR: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_HAS_DIRECTION_LTR; -pub const NODE_ALL_DIRECTION_FLAGS: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_ALL_DIRECTION_FLAGS; -pub const NODE_CHROME_ONLY_ACCESS: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_CHROME_ONLY_ACCESS; -pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; -pub const NODE_SHARED_RESTYLE_BIT_1: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_SHARED_RESTYLE_BIT_1; -pub const NODE_SHARED_RESTYLE_BIT_2: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_SHARED_RESTYLE_BIT_2; -pub const NODE_IS_DIRTY_FOR_SERVO: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_SHARED_RESTYLE_BIT_1; -pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: _bindgen_ty_bindgen_id_150829 + _bindgen_ty_bindgen_id_151372::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; +pub const NODE_ALL_SELECTOR_FLAGS: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_ALL_SELECTOR_FLAGS; +pub const NODE_NEEDS_FRAME: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_NEEDS_FRAME; +pub const NODE_DESCENDANTS_NEED_FRAMES: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_DESCENDANTS_NEED_FRAMES; +pub const NODE_HAS_ACCESSKEY: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_HAS_ACCESSKEY; +pub const NODE_HAS_DIRECTION_RTL: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_HAS_DIRECTION_RTL; +pub const NODE_HAS_DIRECTION_LTR: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_HAS_DIRECTION_LTR; +pub const NODE_ALL_DIRECTION_FLAGS: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_ALL_DIRECTION_FLAGS; +pub const NODE_CHROME_ONLY_ACCESS: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_CHROME_ONLY_ACCESS; +pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; +pub const NODE_SHARED_RESTYLE_BIT_1: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_SHARED_RESTYLE_BIT_1; +pub const NODE_SHARED_RESTYLE_BIT_2: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_SHARED_RESTYLE_BIT_2; +pub const NODE_IS_DIRTY_FOR_SERVO: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_SHARED_RESTYLE_BIT_1; +pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: _bindgen_ty_bindgen_id_151372 = - _bindgen_ty_bindgen_id_150829::NODE_SHARED_RESTYLE_BIT_2; -pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: _bindgen_ty_bindgen_id_150829 = - _bindgen_ty_bindgen_id_150829::NODE_TYPE_SPECIFIC_BITS_OFFSET; + _bindgen_ty_bindgen_id_151372::NODE_SHARED_RESTYLE_BIT_2; +pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: _bindgen_ty_bindgen_id_151372 = + _bindgen_ty_bindgen_id_151372::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _bindgen_ty_bindgen_id_150829 { +pub enum _bindgen_ty_bindgen_id_151372 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -6549,7 +6687,7 @@ pub struct nsITimer_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsITimer__bindgen_ty_bindgen_id_167235 { +pub enum nsITimer__bindgen_ty_bindgen_id_168085 { TYPE_ONE_SHOT = 0, TYPE_REPEATING_SLACK = 1, TYPE_REPEATING_PRECISE = 2, @@ -6575,7 +6713,7 @@ pub struct nsExpirationState { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsExpirationState__bindgen_ty_bindgen_id_167711 { +pub enum nsExpirationState__bindgen_ty_bindgen_id_168561 { NOT_TRACKED = 15, MAX_INDEX_IN_GENERATION = 268435455, } @@ -6649,7 +6787,7 @@ pub struct imgIRequest_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum imgIRequest__bindgen_ty_bindgen_id_169133 { +pub enum imgIRequest__bindgen_ty_bindgen_id_169153 { STATUS_NONE = 0, STATUS_SIZE_AVAILABLE = 1, STATUS_LOAD_COMPLETE = 2, @@ -6659,6 +6797,13 @@ pub enum imgIRequest__bindgen_ty_bindgen_id_169133 { STATUS_IS_ANIMATED = 32, STATUS_HAS_TRANSPARENCY = 64, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum imgIRequest__bindgen_ty_bindgen_id_169233 { + CORS_NONE = 1, + CORS_ANONYMOUS = 2, + CORS_USE_CREDENTIALS = 3, +} #[test] fn bindgen_test_layout_imgIRequest() { assert_eq!(::std::mem::size_of::() , 8usize); @@ -6867,6 +7012,16 @@ fn bindgen_test_layout_FrameRequestCallback() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] +#[derive(Debug)] +pub struct CallbackFunction { + pub _base: CallbackObject, +} +#[test] +fn bindgen_test_layout_CallbackFunction() { + assert_eq!(::std::mem::size_of::() , 56usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} +#[repr(C)] #[derive(Debug, Copy)] pub struct FullscreenRequest { pub _address: u8, @@ -7153,7 +7308,7 @@ pub type nsPresArena_FreeList_KeyType = u32; pub type nsPresArena_FreeList_KeyTypePointer = *const ::std::os::raw::c_void; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsPresArena_FreeList__bindgen_ty_bindgen_id_189570 { +pub enum nsPresArena_FreeList__bindgen_ty_bindgen_id_181711 { ALLOW_MEMMOVE = 0, } #[test] @@ -7180,7 +7335,7 @@ pub struct imgINotificationObserver_COMTypeInfo { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum imgINotificationObserver__bindgen_ty_bindgen_id_189717 { +pub enum imgINotificationObserver__bindgen_ty_bindgen_id_181858 { SIZE_AVAILABLE = 1, FRAME_UPDATE = 2, FRAME_COMPLETE = 3, @@ -7429,7 +7584,7 @@ pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyTypePointer = *const gfxFontFeatureValueSet_FeatureValueHashKey; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum gfxFontFeatureValueSet_FeatureValueHashEntry__bindgen_ty_bindgen_id_190955 +pub enum gfxFontFeatureValueSet_FeatureValueHashEntry__bindgen_ty_bindgen_id_183096 { ALLOW_MEMMOVE = 1, } @@ -7825,23 +7980,23 @@ pub enum nsStyleUnit { } #[repr(C)] #[derive(Debug, Copy)] -pub struct _bindgen_ty_bindgen_id_191700 { +pub struct _bindgen_ty_bindgen_id_183849 { pub mInt: __BindgenUnionField, pub mFloat: __BindgenUnionField, pub mPointer: __BindgenUnionField<*mut ::std::os::raw::c_void>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout__bindgen_ty_bindgen_id_191700() { - assert_eq!(::std::mem::size_of::<_bindgen_ty_bindgen_id_191700>() , +fn bindgen_test_layout__bindgen_ty_bindgen_id_183849() { + assert_eq!(::std::mem::size_of::<_bindgen_ty_bindgen_id_183849>() , 8usize); - assert_eq!(::std::mem::align_of::<_bindgen_ty_bindgen_id_191700>() , + assert_eq!(::std::mem::align_of::<_bindgen_ty_bindgen_id_183849>() , 8usize); } -impl Clone for _bindgen_ty_bindgen_id_191700 { +impl Clone for _bindgen_ty_bindgen_id_183849 { fn clone(&self) -> Self { *self } } -pub type nsStyleUnion = _bindgen_ty_bindgen_id_191700; +pub type nsStyleUnion = _bindgen_ty_bindgen_id_183849; /** * Class that hold a single size specification used by the style * system. The size specification consists of two parts -- a number @@ -8286,6 +8441,27 @@ fn bindgen_test_layout_CSSVariableValues() { assert_eq!(::std::mem::size_of::() , 48usize); assert_eq!(::std::mem::align_of::() , 8usize); } +/** + * This struct represents a combined color from a numeric color and + * the current foreground color (currentcolor keyword). + * Conceptually, the formula is "color * (1 - p) + currentcolor * p" + * where p is mForegroundRatio. See mozilla::LinearBlendColors for + * the actual algorithm. + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct StyleComplexColor { + pub mColor: nscolor, + pub mForegroundRatio: u8, +} +#[test] +fn bindgen_test_layout_StyleComplexColor() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for StyleComplexColor { + fn clone(&self) -> Self { *self } +} pub const nsCSSPropertyID_eCSSProperty_COUNT_DUMMY: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_z_index; pub const nsCSSPropertyID_eCSSProperty_all: nsCSSPropertyID = @@ -8866,7 +9042,7 @@ fn bindgen_test_layout_imgRequestProxy() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_200558 { +pub struct bindgen_vtable__bindgen_id_193205 { } /** * An interface for observing changes to image state, as reported by @@ -8883,7 +9059,7 @@ pub struct bindgen_vtable__bindgen_id_200558 { #[repr(C)] #[derive(Debug)] pub struct IProgressObserver { - pub vtable_: *const bindgen_vtable__bindgen_id_200558, + pub vtable_: *const bindgen_vtable__bindgen_id_193205, pub _base: u64, } #[test] @@ -8905,7 +9081,7 @@ pub struct nsISupportsPriority_COMTypeInfo { } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsISupportsPriority__bindgen_ty_bindgen_id_200634 { +pub enum nsISupportsPriority__bindgen_ty_bindgen_id_193281 { PRIORITY_HIGHEST = -20, PRIORITY_HIGH = -10, PRIORITY_NORMAL = 0, @@ -9002,6 +9178,49 @@ fn bindgen_test_layout_FontFamilyListRefCnt() { assert_eq!(::std::mem::size_of::() , 32usize); assert_eq!(::std::mem::align_of::() , 8usize); } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct RGBAColorData { + pub mR: f32, + pub mG: f32, + pub mB: f32, + pub mA: f32, +} +#[test] +fn bindgen_test_layout_RGBAColorData() { + assert_eq!(::std::mem::size_of::() , 16usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for RGBAColorData { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct ComplexColorData { + pub mColor: RGBAColorData, + pub mForegroundRatio: f32, +} +#[test] +fn bindgen_test_layout_ComplexColorData() { + assert_eq!(::std::mem::size_of::() , 20usize); + assert_eq!(::std::mem::align_of::() , 4usize); +} +impl Clone for ComplexColorData { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct ComplexColorValue { + pub _base: ComplexColorData, + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, +} +pub type ComplexColorValue_HasThreadSafeRefCnt = FalseType; +#[test] +fn bindgen_test_layout_ComplexColorValue() { + assert_eq!(::std::mem::size_of::() , 40usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSUnit { @@ -9062,6 +9281,7 @@ pub enum nsCSSUnit { eCSSUnit_PercentageRGBAColor = 88, eCSSUnit_HSLColor = 89, eCSSUnit_HSLAColor = 90, + eCSSUnit_ComplexColor = 91, eCSSUnit_Percent = 100, eCSSUnit_Number = 101, eCSSUnit_PhysicalMillimeter = 200, @@ -9296,7 +9516,7 @@ fn bindgen_test_layout_nsCSSValueFloatColor() { #[derive(Debug)] pub struct nsCSSValue { pub mUnit: nsCSSUnit, - pub mValue: nsCSSValue__bindgen_ty_bindgen_id_203528, + pub mValue: nsCSSValue__bindgen_ty_bindgen_id_196276, } #[repr(C)] #[derive(Debug)] @@ -9312,7 +9532,7 @@ fn bindgen_test_layout_nsCSSValue_Array() { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCSSValue__bindgen_ty_bindgen_id_203528 { +pub struct nsCSSValue__bindgen_ty_bindgen_id_196276 { pub mInt: __BindgenUnionField, pub mFloat: __BindgenUnionField, pub mString: __BindgenUnionField<*mut nsStringBuffer>, @@ -9333,16 +9553,17 @@ pub struct nsCSSValue__bindgen_ty_bindgen_id_203528 { pub mPairListDependent: __BindgenUnionField<*mut nsCSSValuePairList>, pub mFloatColor: __BindgenUnionField<*mut nsCSSValueFloatColor>, pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>, + pub mComplexColor: __BindgenUnionField<*mut ComplexColorValue>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsCSSValue__bindgen_ty_bindgen_id_203528() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsCSSValue__bindgen_ty_bindgen_id_196276() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsCSSValue__bindgen_ty_bindgen_id_203528 { +impl Clone for nsCSSValue__bindgen_ty_bindgen_id_196276 { fn clone(&self) -> Self { *self } } #[test] @@ -9363,12 +9584,12 @@ fn bindgen_test_layout_nsCSSValueGradientStop() { assert_eq!(::std::mem::align_of::() , 8usize); } #[repr(C)] -pub struct bindgen_vtable__bindgen_id_203735 { +pub struct bindgen_vtable__bindgen_id_196484 { } #[repr(C)] #[derive(Debug, Copy)] pub struct CounterStyle { - pub vtable_: *const bindgen_vtable__bindgen_id_203735, + pub vtable_: *const bindgen_vtable__bindgen_id_196484, pub mStyle: i32, } #[test] @@ -9449,6 +9670,9 @@ fn bindgen_test_layout_nsStyleVisibility() { assert_eq!(::std::mem::size_of::() , 7usize); assert_eq!(::std::mem::align_of::() , 1usize); } +pub type RawGeckoNode = nsINode; +pub type RawGeckoElement = Element; +pub type RawGeckoDocument = nsIDocument; #[repr(C)] #[derive(Debug)] pub struct FragmentOrURL { @@ -9565,25 +9789,25 @@ pub struct nsStyleImage { pub mCachedBIData: UniquePtr>, pub mType: nsStyleImageType, - pub __bindgen_anon_1: nsStyleImage__bindgen_ty_bindgen_id_205690, + pub __bindgen_anon_1: nsStyleImage__bindgen_ty_bindgen_id_198452, pub mCropRect: UniquePtr>, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleImage__bindgen_ty_bindgen_id_205690 { +pub struct nsStyleImage__bindgen_ty_bindgen_id_198452 { pub mImage: __BindgenUnionField<*mut imgRequestProxy>, pub mGradient: __BindgenUnionField<*mut nsStyleGradient>, pub mElementId: __BindgenUnionField<*mut u16>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleImage__bindgen_ty_bindgen_id_205690() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsStyleImage__bindgen_ty_bindgen_id_198452() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsStyleImage__bindgen_ty_bindgen_id_205690 { +impl Clone for nsStyleImage__bindgen_ty_bindgen_id_198452 { fn clone(&self) -> Self { *self } } #[test] @@ -9634,7 +9858,7 @@ pub struct nsStyleImageLayers { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsStyleImageLayers__bindgen_ty_bindgen_id_205734 { +pub enum nsStyleImageLayers__bindgen_ty_bindgen_id_198505 { shorthand = 0, color = 1, image = 2, @@ -10060,9 +10284,9 @@ pub struct nsStyleText { pub mTextEmphasisStyle: u8, pub mTextRendering: u8, pub mTabSize: i32, - pub mTextEmphasisColor: nscolor, - pub mWebkitTextFillColor: nscolor, - pub mWebkitTextStrokeColor: nscolor, + pub mTextEmphasisColor: StyleComplexColor, + pub mWebkitTextFillColor: StyleComplexColor, + pub mWebkitTextStrokeColor: StyleComplexColor, pub mWordSpacing: nsStyleCoord, pub mLetterSpacing: nsStyleCoord, pub mLineHeight: nsStyleCoord, @@ -10073,7 +10297,7 @@ pub struct nsStyleText { } #[test] fn bindgen_test_layout_nsStyleText() { - assert_eq!(::std::mem::size_of::() , 136usize); + assert_eq!(::std::mem::size_of::() , 152usize); assert_eq!(::std::mem::align_of::() , 8usize); } impl nsStyleText { @@ -10101,42 +10325,6 @@ impl nsStyleText { self._bitfield_1 &= !(2usize as u8); self._bitfield_1 |= ((val as u8 as u8) << 1u32) & (2usize as u8); } - #[inline] - pub fn mTextEmphasisColorForeground(&self) -> bool { - unsafe { - ::std::mem::transmute(((self._bitfield_1 & (4usize as u8)) >> - 2u32) as u8) - } - } - #[inline] - pub fn set_mTextEmphasisColorForeground(&mut self, val: bool) { - self._bitfield_1 &= !(4usize as u8); - self._bitfield_1 |= ((val as u8 as u8) << 2u32) & (4usize as u8); - } - #[inline] - pub fn mWebkitTextFillColorForeground(&self) -> bool { - unsafe { - ::std::mem::transmute(((self._bitfield_1 & (8usize as u8)) >> - 3u32) as u8) - } - } - #[inline] - pub fn set_mWebkitTextFillColorForeground(&mut self, val: bool) { - self._bitfield_1 &= !(8usize as u8); - self._bitfield_1 |= ((val as u8 as u8) << 3u32) & (8usize as u8); - } - #[inline] - pub fn mWebkitTextStrokeColorForeground(&self) -> bool { - unsafe { - ::std::mem::transmute(((self._bitfield_1 & (16usize as u8)) >> - 4u32) as u8) - } - } - #[inline] - pub fn set_mWebkitTextStrokeColorForeground(&mut self, val: bool) { - self._bitfield_1 &= !(16usize as u8); - self._bitfield_1 |= ((val as u8 as u8) << 4u32) & (16usize as u8); - } } #[repr(C)] #[derive(Debug, Copy)] @@ -10170,7 +10358,7 @@ impl Clone for nsStyleImageOrientation { #[derive(Debug, Copy)] pub struct nsTimingFunction { pub mType: nsTimingFunction_Type, - pub __bindgen_anon_1: nsTimingFunction__bindgen_ty_bindgen_id_207493, + pub __bindgen_anon_1: nsTimingFunction__bindgen_ty_bindgen_id_200258, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -10189,56 +10377,56 @@ pub enum nsTimingFunction_Type { pub enum nsTimingFunction_Keyword { Implicit = 0, Explicit = 1, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction__bindgen_ty_bindgen_id_207493 { - pub mFunc: __BindgenUnionField, - pub __bindgen_anon_1: __BindgenUnionField, +pub struct nsTimingFunction__bindgen_ty_bindgen_id_200258 { + pub mFunc: __BindgenUnionField, + pub __bindgen_anon_1: __BindgenUnionField, pub bindgen_union_field: [u32; 4usize], } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494 { +pub struct nsTimingFunction__bindgen_ty_bindgen_id_200258__bindgen_ty_bindgen_id_200259 { pub mX1: f32, pub mY1: f32, pub mX2: f32, pub mY2: f32, } #[test] -fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_200258__bindgen_ty_bindgen_id_200259() { + assert_eq!(::std::mem::size_of::() , 16usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } impl Clone for - nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494 + nsTimingFunction__bindgen_ty_bindgen_id_200258__bindgen_ty_bindgen_id_200259 { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505 { +pub struct nsTimingFunction__bindgen_ty_bindgen_id_200258__bindgen_ty_bindgen_id_200270 { pub mSteps: u32, } #[test] -fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_200258__bindgen_ty_bindgen_id_200270() { + assert_eq!(::std::mem::size_of::() , 4usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } impl Clone for - nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505 + nsTimingFunction__bindgen_ty_bindgen_id_200258__bindgen_ty_bindgen_id_200270 { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_207493() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_200258() { + assert_eq!(::std::mem::size_of::() , 16usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 4usize); } -impl Clone for nsTimingFunction__bindgen_ty_bindgen_id_207493 { +impl Clone for nsTimingFunction__bindgen_ty_bindgen_id_200258 { fn clone(&self) -> Self { *self } } #[test] @@ -10299,13 +10487,13 @@ fn bindgen_test_layout_StyleBasicShape() { #[repr(C)] #[derive(Debug)] pub struct StyleShapeSource { - pub __bindgen_anon_1: StyleShapeSource__bindgen_ty_bindgen_id_207876, + pub __bindgen_anon_1: StyleShapeSource__bindgen_ty_bindgen_id_200641, pub mType: StyleShapeSourceType, pub mReferenceBox: ReferenceBox, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct StyleShapeSource__bindgen_ty_bindgen_id_207876 { +pub struct StyleShapeSource__bindgen_ty_bindgen_id_200641 { pub mBasicShape: __BindgenUnionField<*mut StyleBasicShape>, pub mURL: __BindgenUnionField<*mut FragmentOrURL>, pub bindgen_union_field: u64, @@ -10357,24 +10545,24 @@ pub enum nsStyleContentType { #[derive(Debug)] pub struct nsStyleContentData { pub mType: nsStyleContentType, - pub mContent: nsStyleContentData__bindgen_ty_bindgen_id_207960, + pub mContent: nsStyleContentData__bindgen_ty_bindgen_id_200725, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleContentData__bindgen_ty_bindgen_id_207960 { +pub struct nsStyleContentData__bindgen_ty_bindgen_id_200725 { pub mString: __BindgenUnionField<*mut u16>, pub mImage: __BindgenUnionField<*mut imgRequestProxy>, pub mCounters: __BindgenUnionField<*mut nsCSSValue_Array>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleContentData__bindgen_ty_bindgen_id_207960() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsStyleContentData__bindgen_ty_bindgen_id_200725() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsStyleContentData__bindgen_ty_bindgen_id_207960 { +impl Clone for nsStyleContentData__bindgen_ty_bindgen_id_200725 { fn clone(&self) -> Self { *self } } #[test] @@ -10499,25 +10687,25 @@ pub enum nsStyleSVGPaintType { #[repr(C)] #[derive(Debug)] pub struct nsStyleSVGPaint { - pub mPaint: nsStyleSVGPaint__bindgen_ty_bindgen_id_208357, + pub mPaint: nsStyleSVGPaint__bindgen_ty_bindgen_id_201122, pub mType: nsStyleSVGPaintType, pub mFallbackColor: nscolor, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleSVGPaint__bindgen_ty_bindgen_id_208357 { +pub struct nsStyleSVGPaint__bindgen_ty_bindgen_id_201122 { pub mColor: __BindgenUnionField, pub mPaintServer: __BindgenUnionField<*mut FragmentOrURL>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleSVGPaint__bindgen_ty_bindgen_id_208357() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsStyleSVGPaint__bindgen_ty_bindgen_id_201122() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsStyleSVGPaint__bindgen_ty_bindgen_id_208357 { +impl Clone for nsStyleSVGPaint__bindgen_ty_bindgen_id_201122 { fn clone(&self) -> Self { *self } } #[test] @@ -10552,7 +10740,7 @@ pub struct nsStyleSVG { } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum nsStyleSVG__bindgen_ty_bindgen_id_208534 { +pub enum nsStyleSVG__bindgen_ty_bindgen_id_201299 { FILL_OPACITY_SOURCE_MASK = 3, STROKE_OPACITY_SOURCE_MASK = 12, STROKE_DASHARRAY_CONTEXT = 16, @@ -10571,23 +10759,23 @@ fn bindgen_test_layout_nsStyleSVG() { pub struct nsStyleFilter { pub mType: i32, pub mFilterParameter: nsStyleCoord, - pub __bindgen_anon_1: nsStyleFilter__bindgen_ty_bindgen_id_208600, + pub __bindgen_anon_1: nsStyleFilter__bindgen_ty_bindgen_id_201365, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleFilter__bindgen_ty_bindgen_id_208600 { +pub struct nsStyleFilter__bindgen_ty_bindgen_id_201365 { pub mURL: __BindgenUnionField<*mut FragmentOrURL>, pub mDropShadow: __BindgenUnionField<*mut nsCSSShadowArray>, pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleFilter__bindgen_ty_bindgen_id_208600() { - assert_eq!(::std::mem::size_of::() +fn bindgen_test_layout_nsStyleFilter__bindgen_ty_bindgen_id_201365() { + assert_eq!(::std::mem::size_of::() , 8usize); - assert_eq!(::std::mem::align_of::() + assert_eq!(::std::mem::align_of::() , 8usize); } -impl Clone for nsStyleFilter__bindgen_ty_bindgen_id_208600 { +impl Clone for nsStyleFilter__bindgen_ty_bindgen_id_201365 { fn clone(&self) -> Self { *self } } #[test] diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index d6d8865363b..240c86a1ea6 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -9,7 +9,7 @@ use data::{NUM_THREADS, PerDocumentStyleData}; use env_logger; use euclid::Size2D; use gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed}; -use gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned, ServoNodeDataOwned}; +use gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned}; use gecko_bindings::bindings::{RawServoStyleSetBorrowedMut, RawGeckoDocumentBorrowed}; use gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed}; use gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong}; @@ -44,7 +44,7 @@ use style::stylesheets::{Origin, Stylesheet}; use style::timer::Timer; use traversal::RecalcStyleOnly; use url::Url; -use wrapper::{DUMMY_BASE_URL, GeckoDocument, GeckoElement, GeckoNode, NonOpaqueStyleData}; +use wrapper::{DUMMY_BASE_URL, GeckoDocument, GeckoElement, GeckoNode}; /* * For Gecko->Servo function calls, we need to redeclare the same signature that was declared in @@ -126,8 +126,9 @@ pub extern "C" fn Servo_StyleWorkerThreadCount() -> u32 { } #[no_mangle] -pub extern "C" fn Servo_NodeData_Drop(data: ServoNodeDataOwned) -> () { - let _ = data.into_box::(); +pub extern "C" fn Servo_Node_ClearNodeData(node: RawGeckoNodeBorrowed) -> () { + let node = GeckoNode(node); + node.clear_data(); } #[no_mangle] diff --git a/ports/geckolib/string_cache/atom_macro.rs b/ports/geckolib/string_cache/atom_macro.rs index 9792eec6f7d..9ecbdc68bf2 100644 --- a/ports/geckolib/string_cache/atom_macro.rs +++ b/ports/geckolib/string_cache/atom_macro.rs @@ -486,6 +486,8 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_curpos: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms7currentE"] pub static nsGkAtoms_current: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms12cutoutregionE"] + pub static nsGkAtoms_cutoutregion: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms6cyclerE"] pub static nsGkAtoms_cycler: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms4dataE"] @@ -4100,6 +4102,10 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_onencrypted: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms9encryptedE"] pub static nsGkAtoms_encrypted: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms15onwaitingforkeyE"] + pub static nsGkAtoms_onwaitingforkey: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms19onkeystatuseschangeE"] + pub static nsGkAtoms_onkeystatuseschange: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms13onremovetrackE"] pub static nsGkAtoms_onremovetrack: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms9loadstartE"] @@ -4320,8 +4326,6 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_windows_default_theme: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms18mac_graphite_themeE"] pub static nsGkAtoms_mac_graphite_theme: *mut nsIAtom; - #[link_name = "_ZN9nsGkAtoms14mac_lion_themeE"] - pub static nsGkAtoms_mac_lion_theme: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms18mac_yosemite_themeE"] pub static nsGkAtoms_mac_yosemite_theme: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms18windows_compositorE"] @@ -4376,8 +4380,6 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms23_moz_mac_graphite_themeE"] pub static nsGkAtoms__moz_mac_graphite_theme: *mut nsIAtom; - #[link_name = "_ZN9nsGkAtoms19_moz_mac_lion_themeE"] - pub static nsGkAtoms__moz_mac_lion_theme: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms23_moz_mac_yosemite_themeE"] pub static nsGkAtoms__moz_mac_yosemite_theme: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms23_moz_windows_compositorE"] @@ -5405,6 +5407,8 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_curpos: *mut nsIAtom; #[link_name = "?current@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_current: *mut nsIAtom; + #[link_name = "?cutoutregion@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_cutoutregion: *mut nsIAtom; #[link_name = "?cycler@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_cycler: *mut nsIAtom; #[link_name = "?data@nsGkAtoms@@2PEAVnsIAtom@@EA"] @@ -9019,6 +9023,10 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_onencrypted: *mut nsIAtom; #[link_name = "?encrypted@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_encrypted: *mut nsIAtom; + #[link_name = "?onwaitingforkey@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_onwaitingforkey: *mut nsIAtom; + #[link_name = "?onkeystatuseschange@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_onkeystatuseschange: *mut nsIAtom; #[link_name = "?onremovetrack@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_onremovetrack: *mut nsIAtom; #[link_name = "?loadstart@nsGkAtoms@@2PEAVnsIAtom@@EA"] @@ -9239,8 +9247,6 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_windows_default_theme: *mut nsIAtom; #[link_name = "?mac_graphite_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_mac_graphite_theme: *mut nsIAtom; - #[link_name = "?mac_lion_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"] - pub static nsGkAtoms_mac_lion_theme: *mut nsIAtom; #[link_name = "?mac_yosemite_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_mac_yosemite_theme: *mut nsIAtom; #[link_name = "?windows_compositor@nsGkAtoms@@2PEAVnsIAtom@@EA"] @@ -9295,8 +9301,6 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom; #[link_name = "?_moz_mac_graphite_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms__moz_mac_graphite_theme: *mut nsIAtom; - #[link_name = "?_moz_mac_lion_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"] - pub static nsGkAtoms__moz_mac_lion_theme: *mut nsIAtom; #[link_name = "?_moz_mac_yosemite_theme@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms__moz_mac_yosemite_theme: *mut nsIAtom; #[link_name = "?_moz_windows_compositor@nsGkAtoms@@2PEAVnsIAtom@@EA"] @@ -10324,6 +10328,8 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_curpos: *mut nsIAtom; #[link_name = "\x01?current@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_current: *mut nsIAtom; + #[link_name = "\x01?cutoutregion@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_cutoutregion: *mut nsIAtom; #[link_name = "\x01?cycler@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_cycler: *mut nsIAtom; #[link_name = "\x01?data@nsGkAtoms@@2PAVnsIAtom@@A"] @@ -13938,6 +13944,10 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_onencrypted: *mut nsIAtom; #[link_name = "\x01?encrypted@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_encrypted: *mut nsIAtom; + #[link_name = "\x01?onwaitingforkey@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_onwaitingforkey: *mut nsIAtom; + #[link_name = "\x01?onkeystatuseschange@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_onkeystatuseschange: *mut nsIAtom; #[link_name = "\x01?onremovetrack@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_onremovetrack: *mut nsIAtom; #[link_name = "\x01?loadstart@nsGkAtoms@@2PAVnsIAtom@@A"] @@ -14158,8 +14168,6 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms_windows_default_theme: *mut nsIAtom; #[link_name = "\x01?mac_graphite_theme@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_mac_graphite_theme: *mut nsIAtom; - #[link_name = "\x01?mac_lion_theme@nsGkAtoms@@2PAVnsIAtom@@A"] - pub static nsGkAtoms_mac_lion_theme: *mut nsIAtom; #[link_name = "\x01?mac_yosemite_theme@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_mac_yosemite_theme: *mut nsIAtom; #[link_name = "\x01?windows_compositor@nsGkAtoms@@2PAVnsIAtom@@A"] @@ -14214,8 +14222,6 @@ pub enum nsICSSAnonBoxPseudo {} pub static nsGkAtoms__moz_windows_default_theme: *mut nsIAtom; #[link_name = "\x01?_moz_mac_graphite_theme@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms__moz_mac_graphite_theme: *mut nsIAtom; - #[link_name = "\x01?_moz_mac_lion_theme@nsGkAtoms@@2PAVnsIAtom@@A"] - pub static nsGkAtoms__moz_mac_lion_theme: *mut nsIAtom; #[link_name = "\x01?_moz_mac_yosemite_theme@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms__moz_mac_yosemite_theme: *mut nsIAtom; #[link_name = "\x01?_moz_windows_compositor@nsGkAtoms@@2PAVnsIAtom@@A"] @@ -15013,6 +15019,7 @@ macro_rules! atom { ("crossorigin") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_crossorigin as *mut _) }; ("curpos") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_curpos as *mut _) }; ("current") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_current as *mut _) }; +("cutoutregion") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_cutoutregion as *mut _) }; ("cycler") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_cycler as *mut _) }; ("data") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_data as *mut _) }; ("datalist") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_datalist as *mut _) }; @@ -16820,6 +16827,8 @@ macro_rules! atom { ("onexit") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_onexit as *mut _) }; ("onencrypted") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_onencrypted as *mut _) }; ("encrypted") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_encrypted as *mut _) }; +("onwaitingforkey") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_onwaitingforkey as *mut _) }; +("onkeystatuseschange") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_onkeystatuseschange as *mut _) }; ("onremovetrack") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_onremovetrack as *mut _) }; ("loadstart") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_loadstart as *mut _) }; ("suspend") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_suspend as *mut _) }; @@ -16930,7 +16939,6 @@ macro_rules! atom { ("overlay-scrollbars") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_overlay_scrollbars as *mut _) }; ("windows-default-theme") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_windows_default_theme as *mut _) }; ("mac-graphite-theme") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_mac_graphite_theme as *mut _) }; -("mac-lion-theme") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_mac_lion_theme as *mut _) }; ("mac-yosemite-theme") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_mac_yosemite_theme as *mut _) }; ("windows-compositor") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_windows_compositor as *mut _) }; ("windows-glass") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms_windows_glass as *mut _) }; @@ -16958,7 +16966,6 @@ macro_rules! atom { ("-moz-overlay-scrollbars") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms__moz_overlay_scrollbars as *mut _) }; ("-moz-windows-default-theme") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms__moz_windows_default_theme as *mut _) }; ("-moz-mac-graphite-theme") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms__moz_mac_graphite_theme as *mut _) }; -("-moz-mac-lion-theme") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms__moz_mac_lion_theme as *mut _) }; ("-moz-mac-yosemite-theme") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms__moz_mac_yosemite_theme as *mut _) }; ("-moz-windows-compositor") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms__moz_windows_compositor as *mut _) }; ("-moz-windows-classic") => { $crate::atom_macro::unsafe_atom_from_static($crate::atom_macro::nsGkAtoms__moz_windows_classic as *mut _) }; diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index 8255c13755c..fde9f10cdf7 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -17,16 +17,14 @@ use gecko_bindings::bindings::{Gecko_GetPrevSibling, Gecko_GetPrevSiblingElement use gecko_bindings::bindings::{Gecko_GetServoDeclarationBlock, Gecko_IsHTMLElementInHTMLDocument}; use gecko_bindings::bindings::{Gecko_IsLink, Gecko_IsRootElement, Gecko_IsTextNode}; use gecko_bindings::bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink}; -use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsElement, Gecko_SetNodeData}; -use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode}; +use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsElement}; use gecko_bindings::bindings::Gecko_ClassOrClassList; -use gecko_bindings::bindings::Gecko_GetNodeData; use gecko_bindings::bindings::Gecko_GetStyleContext; -use gecko_bindings::bindings::ServoNodeData; use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO}; +use gecko_bindings::structs::{RawGeckoDocument, RawGeckoElement, RawGeckoNode}; use gecko_bindings::structs::{nsChangeHint, nsIAtom, nsStyleContext}; -use gecko_bindings::sugar::ownership::{FFIArcHelpers, HasBoxFFI, HasFFI, HasSimpleFFI}; -use gecko_bindings::sugar::ownership::Borrowed; +use gecko_bindings::structs::OpaqueStyleData; +use gecko_bindings::sugar::ownership::FFIArcHelpers; use gecko_string_cache::{Atom, Namespace, WeakAtom, WeakNamespace}; use glue::GeckoDeclarationBlock; use libc::uintptr_t; @@ -55,18 +53,21 @@ use url::Url; pub struct NonOpaqueStyleData(RefCell); -unsafe impl HasFFI for NonOpaqueStyleData { - type FFIType = ServoNodeData; -} -unsafe impl HasSimpleFFI for NonOpaqueStyleData {} -unsafe impl HasBoxFFI for NonOpaqueStyleData {} - impl NonOpaqueStyleData { pub fn new() -> Self { NonOpaqueStyleData(RefCell::new(PrivateStyleData::new())) } } + +// We can eliminate OpaqueStyleData when the bindings move into the style crate. +fn to_opaque_style_data(d: *mut NonOpaqueStyleData) -> *mut OpaqueStyleData { + d as *mut OpaqueStyleData +} +fn from_opaque_style_data(d: *mut OpaqueStyleData) -> *mut NonOpaqueStyleData { + d as *mut NonOpaqueStyleData +} + // Important: We don't currently refcount the DOM, because the wrapper lifetime // magic guarantees that our LayoutFoo references won't outlive the root, and // we don't mutate any of the references on the Gecko side during restyle. We @@ -76,18 +77,25 @@ impl NonOpaqueStyleData { pub struct GeckoNode<'ln>(pub &'ln RawGeckoNode); impl<'ln> GeckoNode<'ln> { - fn get_node_data(&self) -> Borrowed { + fn get_node_data(&self) -> Option<&NonOpaqueStyleData> { unsafe { - Borrowed::from_ffi(Gecko_GetNodeData(&*self.0)) + from_opaque_style_data(self.0.mServoData.get()).as_ref() } } pub fn initialize_data(self) { - unsafe { - if self.get_node_data().is_null() { - let ptr = Box::new(NonOpaqueStyleData::new()); - Gecko_SetNodeData(self.0, ptr.into_ffi()); - } + if self.get_node_data().is_none() { + let ptr = Box::new(NonOpaqueStyleData::new()); + debug_assert!(self.0.mServoData.get().is_null()); + self.0.mServoData.set(to_opaque_style_data(Box::into_raw(ptr))); + } + } + + pub fn clear_data(self) { + if !self.get_node_data().is_none() { + let d = from_opaque_style_data(self.0.mServoData.get()); + let _ = unsafe { Box::from_raw(d) }; + self.0.mServoData.set(ptr::null_mut()); } } } @@ -210,7 +218,7 @@ impl<'ln> TNode for GeckoNode<'ln> { fn is_dirty(&self) -> bool { // Return true unconditionally if we're not yet styled. This is a hack // and should go away soon. - if self.get_node_data().is_null() { + if self.get_node_data().is_none() { return true; } @@ -229,7 +237,7 @@ impl<'ln> TNode for GeckoNode<'ln> { fn has_dirty_descendants(&self) -> bool { // Return true unconditionally if we're not yet styled. This is a hack // and should go away soon. - if self.get_node_data().is_null() { + if self.get_node_data().is_none() { return true; } let flags = unsafe { Gecko_GetNodeFlags(self.0) }; @@ -257,18 +265,18 @@ impl<'ln> TNode for GeckoNode<'ln> { #[inline(always)] unsafe fn borrow_data_unchecked(&self) -> Option<*const PrivateStyleData> { - self.get_node_data().borrow_opt().map(|d| d.0.as_unsafe_cell().get() + self.get_node_data().as_ref().map(|d| d.0.as_unsafe_cell().get() as *const PrivateStyleData) } #[inline(always)] fn borrow_data(&self) -> Option> { - self.get_node_data().borrow_opt().map(|d| d.0.borrow()) + self.get_node_data().as_ref().map(|d| d.0.borrow()) } #[inline(always)] fn mutate_data(&self) -> Option> { - self.get_node_data().borrow_opt().map(|d| d.0.borrow_mut()) + self.get_node_data().as_ref().map(|d| d.0.borrow_mut()) } fn restyle_damage(self) -> Self::ConcreteRestyleDamage {