diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-09-21 17:46:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-21 17:46:01 -0500 |
commit | ecb44e748b090655bea9d519448c02d290b9e957 (patch) | |
tree | e586a42747f537ddc8f3f05f9ed134e75fb1ae98 | |
parent | 7b98c8a78819c57d90ed06c83f1376d4f38c8748 (diff) | |
parent | cce67c995d077d21874285442e5d9d79505a0ed5 (diff) | |
download | servo-ecb44e748b090655bea9d519448c02d290b9e957.tar.gz servo-ecb44e748b090655bea9d519448c02d290b9e957.zip |
Auto merge of #13269 - emilio:new-bindgen, r=Manishearth
stylo: Use the bindgen rewrite to generate the bindings.
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
<!-- Either: -->
- [x] These changes do not require tests because stylo ci is not there yet.
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
r? @Manishearth
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13269)
<!-- Reviewable:end -->
-rw-r--r-- | components/style/properties/gecko.mako.rs | 4 | ||||
-rwxr-xr-x | ports/geckolib/binding_tools/regen.py | 205 | ||||
-rw-r--r-- | ports/geckolib/gecko_bindings/bindings.rs | 525 | ||||
-rw-r--r-- | ports/geckolib/gecko_bindings/structs_debug.rs | 10192 | ||||
-rw-r--r-- | ports/geckolib/gecko_bindings/structs_release.rs | 10123 |
5 files changed, 14613 insertions, 6436 deletions
diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 1f75fdb5737..c4f34be3e14 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -1640,7 +1640,7 @@ clip-path fn init_shape(clip_path: &mut StyleClipPath, ty: StyleBasicShapeType) -> &mut StyleBasicShape { unsafe { // We have to be very careful to avoid a copy here! - let ref mut union = clip_path.StyleShapeSource_nsStyleStruct_h_unnamed_26; + let ref mut union = clip_path.__bindgen_anon_1; let mut shape: &mut *mut StyleBasicShape = union.mBasicShape.as_mut(); *shape = Gecko_NewBasicShape(ty); &mut **shape @@ -1738,7 +1738,7 @@ clip-path } else { Some(clip_path.mReferenceBox.into()) }; - let union = clip_path.StyleShapeSource_nsStyleStruct_h_unnamed_26; + let union = clip_path.__bindgen_anon_1; let shape = unsafe { &**union.mBasicShape.as_ref() }; ShapeSource::Shape(shape.into(), reference) } diff --git a/ports/geckolib/binding_tools/regen.py b/ports/geckolib/binding_tools/regen.py index 0ff54c16031..836b1dcc641 100755 --- a/ports/geckolib/binding_tools/regen.py +++ b/ports/geckolib/binding_tools/regen.py @@ -23,13 +23,12 @@ COMPILATION_TARGETS = { # Flags common for all the targets. COMMON_BUILD_KEY: { "flags": [ - "--allow-unknown-types", "--no-unstable-rust", - "--no-type-renaming", "--no-namespaced-constants", + "--no-unstable-rust", "--no-type-renaming", ], "clang_flags": [ "-x", "c++", "-std=c++14", "-DTRACING=1", "-DIMPL_LIBXUL", "-DMOZ_STYLO_BINDINGS=1", - "-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN", + "-DMOZILLA_INTERNAL_API", "-DRUST_BINDGEN", "-DMOZ_STYLO" ], "search_dirs": [ "{}/dist/include", @@ -52,6 +51,7 @@ COMPILATION_TARGETS = { "{}/dist/include/nsThemeConstants.h", "{}/dist/include/mozilla/dom/AnimationEffectReadOnlyBinding.h", "{}/dist/include/mozilla/ServoElementSnapshot.h", + "{}/dist/include/mozilla/dom/Element.h", ], "files": [ "{}/dist/include/nsStyleStruct.h", @@ -66,48 +66,107 @@ COMPILATION_TARGETS = { "release": { } }, - "match_headers": [ - "RefCountType.h", "nscore.h", "nsError.h", "nsID.h", "nsString", - "nsAString", "nsSubstring", "nsTSubstring", "nsTString", - "nsISupportsBase.h", "nsCOMPtr.h", "nsIAtom.h", "nsIURI.h", - "nsAutoPtr.h", "nsColor.h", "nsCoord.h", "nsPoint.h", "nsRect.h", - "nsMargin.h", "nsThemeConstants.h", "nsCSSProperty.h", "nsCSSPropertyID.h", - "CSSVariableValues.h", "nsFont.h", "nsTHashtable.h", - "PLDHashTable.h", "nsColor.h", "nsStyleStruct.h", "nsStyleCoord.h", - "RefPtr.h", "nsISupportsImpl.h", "gfxFontConstants.h", - "gfxFontFamilyList.h", "gfxFontFeatures.h", "imgRequestProxy.h", - "nsIRequest.h", "imgIRequest.h", "CounterStyleManager.h", - "nsStyleConsts.h", "nsCSSValue.h", "SheetType.h", "nsIPrincipal.h", - "nsDataHashtable.h", "nsCSSScanner.h", "nsTArray", - "pair", "SheetParsingMode.h", "StaticPtr.h", "nsProxyRelease.h", - "mozilla/dom/AnimationEffectReadOnlyBinding.h", - "nsChangeHint.h", "ServoElementSnapshot.h", - "EventStates.h", "nsAttrValue.h", "nsAttrName.h", - "/Types.h", # <- Disallow UnionTypes.h - "/utility", # <- Disallow xutility - "nsINode.h", # <- For `NodeFlags`. - "UniquePtr.h" + "whitelist_vars": [ + "NS_THEME_.*", + "NODE_.*", + "NS_FONT_STYLE_.*", + "NS_STYLE_.*", + "NS_CORNER_.*", + "NS_RADIUS_.*", + "BORDER_COLOR_.*", + "BORDER_STYLE_.*" ], - "blacklist": [ - "IsDestructibleFallbackImpl", "IsDestructibleFallback", - "ProxyReleaseEvent", "FallibleTArray", "nsTArray_Impl", - "__is_tuple_like_impl", "tuple_size", "tuple", - "__make_pair_return_impl", "__make_pair_return", "tuple_element", - "_Itup_cat", "AnimationEffectTimingProperties", - "FastAnimationEffectTimingProperties", "ComputedTimingProperties", - "FastComputedTimingProperties", - "nsINode", - "HasPointerType" + "whitelist": [ + "Element", + "Side", + "nsTArrayHeader", + "nsCSSValueGradient", + "nsCSSValueList_heap", + "FrameRequestCallback", + "nsCSSValueTriplet_heap", + "nsCSSRect_heap", + "AnonymousContent", + "nsCSSValuePairList", + "nsCSSValuePairList_heap", + "nsCSSValuePair_heap", + "CapturingContentInfo", + "Runnable", + "AudioContext", + "FontFamilyListRefCnt", + "ImageURL", + "Image", + "nsCSSValueFloatColor", + "ServoAttrSnapshot", + "GridNamedArea", + "nsAttrName", + "nsAttrValue", + "nsCSSRect", + "gfxFontFeature", + "gfxAlternateValue", + "nsCSSValueTokenStream", + "nsSize", + "pair", + "StyleClipPathGeometryBox", + "FontFamilyName", + "nsCSSPropertyID", + "StyleAnimation", + "StyleTransition", + "nsresult", + "nsCSSValueGradientStop", + "nsBorderColors", + "Position", + "nsCSSValueList", + "nsCSSValue", + "UniquePtr", "DefaultDelete", + "StyleBasicShape", + "nsMargin", + "nsStyleContentData", + "nsStyleFilter", "nsRect", "FragmentOrURL", "nsStyleCoord", + "nsStyleCounterData", "StaticRefPtr", "nsTArray", "nsStyleFont", + "nsStyleColor", "nsStyleList", "nsStyleText", "nsStyleVisibility", + "nsStyleUserInterface", "nsStyleTableBorder", "nsStyleSVG", + "nsStyleVariables", "nsStyleBackground", "nsStylePosition", + "nsStyleTextReset", "nsStyleDisplay", "nsStyleContent", + "nsStyleUIReset", "nsStyleTable", "nsStyleMargin", + "nsStylePadding", "nsStyleBorder", "nsStyleOutline", "nsStyleXUL", + "nsStyleSVGReset", "nsStyleColumn", "nsStyleEffects", + "nsStyleImage", "nsStyleGradient", "nsStyleCoord", + "nsStyleGradientStop", "nsStyleImageLayers", + "nsStyleImageLayers_Layer", "nsStyleImageLayers_LayerType", + "nsStyleUnit", "nsStyleUnion", "nsStyleCoord", "nsRestyleHint", + "ServoElementSnapshot", "nsChangeHint", "SheetParsingMode", + "nsMainThreadPtrHandle", "nsMainThreadPtrHolder", "nscolor", + "nsFont", "FontFamilyList", "FontFamilyType", "nsIAtom", + "nsStyleContext", "StyleClipPath", "StyleBasicShapeType", + "StyleBasicShape", "nsCSSShadowArray", ], "opaque_types": [ - "nsIntMargin", "nsIntPoint", "nsIntRect", "nsCOMArray", - "nsDependentString", "EntryStore", "gfxFontFeatureValueSet", - "imgRequestProxy", "imgRequestProxyStatic", "CounterStyleManager", - "ImageValue", "URLValue", "URLValueData", "nsIPrincipal", - "nsDataHashtable", "imgIRequest", + "atomic___base", + "nsAString_internal_char_traits", + "nsAString_internal_incompatible_char_type", + "nsACString_internal_char_traits", + "nsACString_internal_incompatible_char_type", + "RefPtr_Proxy", "nsAutoPtr_Proxy", "Pair_Base", + "RefPtr_Proxy_member_function", "nsAutoPtr_Proxy_member_function", + "nsWritingIterator_reference", "nsReadingIterator_reference", + "Heap", "TenuredHeap", "Rooted", "WeakPtr", # <- More template magic than what + # we support. + "nsTObserverArray", # <- Inherits from nsAutoTObserverArray<T, 0> + "PLArenaPool", # <- Bindgen bug + "nsTHashtable", # <- Inheriting from inner typedefs that clang + # doesn't expose properly. + "nsRefPtrHashtable", "nsDataHashtable", "nsClassHashtable", # <- Ditto + "nsIDocument_SelectorCache", # <- Inherits from nsExpirationTracker<.., 4> + "nsIPresShell_ScrollAxis", # <- For some reason the alignment of this is 4 + # for clang. + "nsPIDOMWindow", # <- Takes the vtable from a template parameter, and we can't + # generate it conditionally. + "SupportsWeakPtr", "Maybe", # <- AlignedStorage, which means templated union, which - # means impossible to represent in stable rust as of - # right now. + # means impossible to represent in stable rust as of + # right now. + "gfxSize", # <- Same, union { struct { T width; T height; }; T components[2] }; + "gfxSize_Super", # Ditto. ], }, # Generation of the ffi bindings. @@ -139,15 +198,13 @@ COMPILATION_TARGETS = { "nsStyleOutline", "nsStyleXUL", "nsStyleSVGReset", "nsStyleColumn", "nsStyleEffects", "nsStyleImage", "nsStyleGradient", "nsStyleCoord", "nsStyleGradientStop", "nsStyleImageLayers", - "nsStyleImageLayers::Layer", "nsStyleImageLayers::LayerType", - "nsStyleUnit", "nsStyleUnion", "nsStyleCoord::CalcValue", - "nsStyleCoord::Calc", "nsRestyleHint", "ServoElementSnapshot", + "nsStyleImageLayers_Layer", "nsStyleImageLayers_LayerType", + "nsStyleUnit", "nsStyleUnion", "nsStyleCoord_CalcValue", + "nsStyleCoord_Calc", "nsRestyleHint", "ServoElementSnapshot", "nsChangeHint", "SheetParsingMode", "nsMainThreadPtrHandle", "nsMainThreadPtrHolder", "nscolor", "nsFont", "FontFamilyList", "FontFamilyType", "nsIAtom", "nsStyleContext", "StyleClipPath", "StyleBasicShapeType", "StyleBasicShape", "nsCSSShadowArray", - ], - "void_types": [ "nsINode", "nsIDocument", "nsIPrincipal", "nsIURI", ], "servo_nullable_arc_types": [ @@ -164,6 +221,10 @@ COMPILATION_TARGETS = { "RawGeckoElement", "RawGeckoDocument", ], + "whitelist_functions": [ + "Servo_.*", + "Gecko_.*" + ] }, "atoms": { @@ -323,24 +384,26 @@ def build(objdir, target_name, debug, debugger, kind_name=None, clang_flags.append("-include") clang_flags.append(file_name.format(objdir)) - if "match_headers" in current_target: - for header in current_target["match_headers"]: - flags.append("--match") - flags.append(header.format(objdir)) + if "whitelist" in current_target: + for header in current_target["whitelist"]: + flags.append("--whitelist-type") + flags.append(header) - if "blacklist" in current_target: - for ty in current_target["blacklist"]: - flags.append("--blacklist-type") - flags.append(ty) + if "whitelist_functions" in current_target: + for header in current_target["whitelist_functions"]: + flags.append("--whitelist-function") + flags.append(header) + + if "whitelist_vars" in current_target: + for header in current_target["whitelist_vars"]: + flags.append("--whitelist-var") + flags.append(header) if "opaque_types" in current_target: for ty in current_target["opaque_types"]: flags.append("--opaque-type") flags.append(ty) - if "void_types" in current_target: - for ty in current_target["void_types"]: - flags.append("--raw-line") - flags.append("pub enum {} {{}}".format(ty)) + if "servo_nullable_arc_types" in current_target: for ty in current_target["servo_nullable_arc_types"]: flags.append("--blacklist-type") @@ -356,6 +419,7 @@ def build(objdir, target_name, debug, debugger, kind_name=None, flags.append("--raw-line") flags.append("pub type {0}Borrowed<'a> = &'a {0};".format(ty)) zero_size_type(ty, flags) + if "servo_immutable_borrow_types" in current_target: for ty in current_target["servo_immutable_borrow_types"]: flags.append("--blacklist-type") @@ -367,6 +431,7 @@ def build(objdir, target_name, debug, debugger, kind_name=None, flags.append("--raw-line") flags.append("pub type {0}BorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, {0}>;".format(ty)) zero_size_type(ty, flags) + if "servo_owned_types" in current_target: for ty in current_target["servo_owned_types"]: flags.append("--blacklist-type") @@ -396,39 +461,35 @@ def build(objdir, target_name, debug, debugger, kind_name=None, flags.append("--raw-line") flags.append("pub type {0}OwnedOrNull = ::sugar::ownership::OwnedOrNull<{0}>;".format(ty)) zero_size_type(ty, flags) + if "structs_types" in current_target: for ty in current_target["structs_types"]: - ty_fragments = ty.split("::") - mangled_name = ty.replace("::", "_") flags.append("--blacklist-type") - flags.append(ty_fragments[-1]) + flags.append(ty) flags.append("--raw-line") - if len(ty_fragments) > 1: - flags.append("use structs::{} as {};".format(mangled_name, ty_fragments[-1])) - else: - flags.append("use structs::{};".format(mangled_name)) + flags.append("use structs::{};".format(ty)) + # TODO: this is hacky, figure out a better way to do it without # hardcoding everything... - if ty_fragments[-1].startswith("nsStyle"): + if ty.startswith("nsStyle"): flags.extend([ "--raw-line", - "unsafe impl Send for {} {{}}".format(ty_fragments[-1]), - "--raw-line", - "unsafe impl Sync for {} {{}}".format(ty_fragments[-1]), + "unsafe impl Send for {} {{}}".format(ty), "--raw-line", - "impl HeapSizeOf for {} {{ fn heap_size_of_children(&self) -> usize {{ 0 }} }}" - .format(ty_fragments[-1]) + "unsafe impl Sync for {} {{}}".format(ty), ]) flags.append("-o") flags.append(output_filename) - # TODO: support more files, that's the whole point of this. assert len(current_target["files"]) == 1 flags.append(current_target["files"][0].format(objdir)) flags = bindgen + flags + ["--"] + clang_flags + if verbose: + print(flags) + output = "" try: if debug: diff --git a/ports/geckolib/gecko_bindings/bindings.rs b/ports/geckolib/gecko_bindings/bindings.rs index d9a863b7e89..7bace3da666 100644 --- a/ports/geckolib/gecko_bindings/bindings.rs +++ b/ports/geckolib/gecko_bindings/bindings.rs @@ -1,10 +1,6 @@ /* automatically generated by rust-bindgen */ use heapsize::HeapSizeOf; -pub enum nsINode {} -pub enum nsIDocument {} -pub enum nsIPrincipal {} -pub enum nsIURI {} pub type ServoComputedValuesStrong = ::sugar::ownership::Strong<ServoComputedValues>; pub type ServoComputedValuesBorrowedOrNull<'a> = ::sugar::ownership::Borrowed<'a, ServoComputedValues>; pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues; @@ -59,131 +55,108 @@ pub struct StyleChildrenIterator(StyleChildrenIteratorVoid); use structs::nsStyleFont; unsafe impl Send for nsStyleFont {} unsafe impl Sync for nsStyleFont {} -impl HeapSizeOf for nsStyleFont { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleColor; unsafe impl Send for nsStyleColor {} unsafe impl Sync for nsStyleColor {} -impl HeapSizeOf for nsStyleColor { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleList; unsafe impl Send for nsStyleList {} unsafe impl Sync for nsStyleList {} -impl HeapSizeOf for nsStyleList { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleText; unsafe impl Send for nsStyleText {} unsafe impl Sync for nsStyleText {} -impl HeapSizeOf for nsStyleText { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleVisibility; unsafe impl Send for nsStyleVisibility {} unsafe impl Sync for nsStyleVisibility {} -impl HeapSizeOf for nsStyleVisibility { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleUserInterface; unsafe impl Send for nsStyleUserInterface {} unsafe impl Sync for nsStyleUserInterface {} -impl HeapSizeOf for nsStyleUserInterface { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleTableBorder; unsafe impl Send for nsStyleTableBorder {} unsafe impl Sync for nsStyleTableBorder {} -impl HeapSizeOf for nsStyleTableBorder { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleSVG; unsafe impl Send for nsStyleSVG {} unsafe impl Sync for nsStyleSVG {} -impl HeapSizeOf for nsStyleSVG { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleVariables; unsafe impl Send for nsStyleVariables {} unsafe impl Sync for nsStyleVariables {} -impl HeapSizeOf for nsStyleVariables { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleBackground; unsafe impl Send for nsStyleBackground {} unsafe impl Sync for nsStyleBackground {} -impl HeapSizeOf for nsStyleBackground { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStylePosition; unsafe impl Send for nsStylePosition {} unsafe impl Sync for nsStylePosition {} -impl HeapSizeOf for nsStylePosition { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleTextReset; unsafe impl Send for nsStyleTextReset {} unsafe impl Sync for nsStyleTextReset {} -impl HeapSizeOf for nsStyleTextReset { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleDisplay; unsafe impl Send for nsStyleDisplay {} unsafe impl Sync for nsStyleDisplay {} -impl HeapSizeOf for nsStyleDisplay { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleContent; unsafe impl Send for nsStyleContent {} unsafe impl Sync for nsStyleContent {} -impl HeapSizeOf for nsStyleContent { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleUIReset; unsafe impl Send for nsStyleUIReset {} unsafe impl Sync for nsStyleUIReset {} -impl HeapSizeOf for nsStyleUIReset { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleTable; unsafe impl Send for nsStyleTable {} unsafe impl Sync for nsStyleTable {} -impl HeapSizeOf for nsStyleTable { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleMargin; unsafe impl Send for nsStyleMargin {} unsafe impl Sync for nsStyleMargin {} -impl HeapSizeOf for nsStyleMargin { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStylePadding; unsafe impl Send for nsStylePadding {} unsafe impl Sync for nsStylePadding {} -impl HeapSizeOf for nsStylePadding { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleBorder; unsafe impl Send for nsStyleBorder {} unsafe impl Sync for nsStyleBorder {} -impl HeapSizeOf for nsStyleBorder { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleOutline; unsafe impl Send for nsStyleOutline {} unsafe impl Sync for nsStyleOutline {} -impl HeapSizeOf for nsStyleOutline { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleXUL; unsafe impl Send for nsStyleXUL {} unsafe impl Sync for nsStyleXUL {} -impl HeapSizeOf for nsStyleXUL { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleSVGReset; unsafe impl Send for nsStyleSVGReset {} unsafe impl Sync for nsStyleSVGReset {} -impl HeapSizeOf for nsStyleSVGReset { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleColumn; unsafe impl Send for nsStyleColumn {} unsafe impl Sync for nsStyleColumn {} -impl HeapSizeOf for nsStyleColumn { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleEffects; unsafe impl Send for nsStyleEffects {} unsafe impl Sync for nsStyleEffects {} -impl HeapSizeOf for nsStyleEffects { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleImage; unsafe impl Send for nsStyleImage {} unsafe impl Sync for nsStyleImage {} -impl HeapSizeOf for nsStyleImage { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleGradient; unsafe impl Send for nsStyleGradient {} unsafe impl Sync for nsStyleGradient {} -impl HeapSizeOf for nsStyleGradient { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleCoord; unsafe impl Send for nsStyleCoord {} unsafe impl Sync for nsStyleCoord {} -impl HeapSizeOf for nsStyleCoord { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleGradientStop; unsafe impl Send for nsStyleGradientStop {} unsafe impl Sync for nsStyleGradientStop {} -impl HeapSizeOf for nsStyleGradientStop { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleImageLayers; unsafe impl Send for nsStyleImageLayers {} unsafe impl Sync for nsStyleImageLayers {} -impl HeapSizeOf for nsStyleImageLayers { fn heap_size_of_children(&self) -> usize { 0 } } -use structs::nsStyleImageLayers_Layer as Layer; -use structs::nsStyleImageLayers_LayerType as LayerType; +use structs::nsStyleImageLayers_Layer; +unsafe impl Send for nsStyleImageLayers_Layer {} +unsafe impl Sync for nsStyleImageLayers_Layer {} +use structs::nsStyleImageLayers_LayerType; +unsafe impl Send for nsStyleImageLayers_LayerType {} +unsafe impl Sync for nsStyleImageLayers_LayerType {} use structs::nsStyleUnit; unsafe impl Send for nsStyleUnit {} unsafe impl Sync for nsStyleUnit {} -impl HeapSizeOf for nsStyleUnit { fn heap_size_of_children(&self) -> usize { 0 } } use structs::nsStyleUnion; unsafe impl Send for nsStyleUnion {} unsafe impl Sync for nsStyleUnion {} -impl HeapSizeOf for nsStyleUnion { fn heap_size_of_children(&self) -> usize { 0 } } -use structs::nsStyleCoord_CalcValue as CalcValue; -use structs::nsStyleCoord_Calc as Calc; +use structs::nsStyleCoord_CalcValue; +unsafe impl Send for nsStyleCoord_CalcValue {} +unsafe impl Sync for nsStyleCoord_CalcValue {} +use structs::nsStyleCoord_Calc; +unsafe impl Send for nsStyleCoord_Calc {} +unsafe impl Sync for nsStyleCoord_Calc {} use structs::nsRestyleHint; use structs::ServoElementSnapshot; use structs::nsChangeHint; @@ -198,311 +171,653 @@ use structs::nsIAtom; use structs::nsStyleContext; unsafe impl Send for nsStyleContext {} unsafe impl Sync for nsStyleContext {} -impl HeapSizeOf for nsStyleContext { fn heap_size_of_children(&self) -> usize { 0 } } use structs::StyleClipPath; use structs::StyleBasicShapeType; use structs::StyleBasicShape; use structs::nsCSSShadowArray; +use structs::nsINode; +use structs::nsIDocument; +use structs::nsIPrincipal; +use structs::nsIURI; -pub enum Element { } -pub enum nsHTMLCSSStyleSheet { } -pub type ThreadSafePrincipalHolder = nsMainThreadPtrHolder<nsIPrincipal>; -pub type ThreadSafeURIHolder = nsMainThreadPtrHolder<nsIURI>; +extern "C" { + pub fn Gecko_EnsureTArrayCapacity(aArray: *mut ::std::os::raw::c_void, + aCapacity: usize, aElementSize: usize); +} +extern "C" { + pub fn Gecko_ClearPODTArray(aArray: *mut ::std::os::raw::c_void, + aElementSize: usize, aElementAlign: usize); +} +extern "C" { + pub fn Servo_NodeData_Drop(arg1: *mut ServoNodeData); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsHTMLCSSStyleSheet { + pub _address: u8, +} +impl Clone for nsHTMLCSSStyleSheet { + fn clone(&self) -> Self { *self } +} extern "C" { pub fn Gecko_ChildrenCount(node: RawGeckoNodeBorrowed) -> u32; +} +extern "C" { pub fn Gecko_NodeIsElement(node: RawGeckoNodeBorrowed) -> bool; +} +extern "C" { pub fn Gecko_GetParentNode(node: RawGeckoNodeBorrowed) -> RawGeckoNodeBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetFirstChild(node: RawGeckoNodeBorrowed) -> RawGeckoNodeBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetLastChild(node: RawGeckoNodeBorrowed) -> RawGeckoNodeBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetPrevSibling(node: RawGeckoNodeBorrowed) -> RawGeckoNodeBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetNextSibling(node: RawGeckoNodeBorrowed) -> RawGeckoNodeBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetParentElement(element: RawGeckoElementBorrowed) -> RawGeckoElementBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetFirstChildElement(element: RawGeckoElementBorrowed) -> RawGeckoElementBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetLastChildElement(element: RawGeckoElementBorrowed) -> RawGeckoElementBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetPrevSiblingElement(element: RawGeckoElementBorrowed) -> RawGeckoElementBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetNextSiblingElement(element: RawGeckoElementBorrowed) -> RawGeckoElementBorrowedOrNull; +} +extern "C" { pub fn Gecko_GetDocumentElement(document: RawGeckoDocumentBorrowed) -> RawGeckoElementBorrowedOrNull; +} +extern "C" { pub fn Gecko_MaybeCreateStyleChildrenIterator(node: RawGeckoNodeBorrowed) -> StyleChildrenIteratorOwnedOrNull; +} +extern "C" { pub fn Gecko_DropStyleChildrenIterator(it: StyleChildrenIteratorOwned); +} +extern "C" { pub fn Gecko_GetNextStyleChild(it: StyleChildrenIteratorBorrowed) -> RawGeckoNodeBorrowedOrNull; +} +extern "C" { pub fn Gecko_ElementState(element: RawGeckoElementBorrowed) -> u8; +} +extern "C" { pub fn Gecko_IsHTMLElementInHTMLDocument(element: RawGeckoElementBorrowed) -> bool; +} +extern "C" { pub fn Gecko_IsLink(element: RawGeckoElementBorrowed) -> bool; +} +extern "C" { pub fn Gecko_IsTextNode(node: RawGeckoNodeBorrowed) -> bool; +} +extern "C" { pub fn Gecko_IsVisitedLink(element: RawGeckoElementBorrowed) -> bool; +} +extern "C" { pub fn Gecko_IsUnvisitedLink(element: RawGeckoElementBorrowed) -> bool; +} +extern "C" { pub fn Gecko_IsRootElement(element: RawGeckoElementBorrowed) -> bool; +} +extern "C" { pub fn Gecko_LocalName(element: RawGeckoElementBorrowed) -> *mut nsIAtom; +} +extern "C" { pub fn Gecko_Namespace(element: RawGeckoElementBorrowed) -> *mut nsIAtom; +} +extern "C" { pub fn Gecko_GetElementId(element: RawGeckoElementBorrowed) -> *mut nsIAtom; +} +extern "C" { pub fn Gecko_AtomAttrValue(element: RawGeckoElementBorrowed, attribute: *mut nsIAtom) -> *mut nsIAtom; +} +extern "C" { pub fn Gecko_HasAttr(element: RawGeckoElementBorrowed, ns: *mut nsIAtom, name: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_AttrEquals(element: RawGeckoElementBorrowed, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom, ignoreCase: bool) -> bool; +} +extern "C" { pub fn Gecko_AttrDashEquals(element: RawGeckoElementBorrowed, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_AttrIncludes(element: RawGeckoElementBorrowed, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_AttrHasSubstring(element: RawGeckoElementBorrowed, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_AttrHasPrefix(element: RawGeckoElementBorrowed, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_AttrHasSuffix(element: RawGeckoElementBorrowed, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_ClassOrClassList(element: RawGeckoElementBorrowed, class_: *mut *mut nsIAtom, classList: *mut *mut *mut nsIAtom) -> u32; +} +extern "C" { pub fn Gecko_SnapshotAtomAttrValue(element: *mut ServoElementSnapshot, attribute: *mut nsIAtom) -> *mut nsIAtom; +} +extern "C" { pub fn Gecko_SnapshotHasAttr(element: *mut ServoElementSnapshot, ns: *mut nsIAtom, name: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_SnapshotAttrEquals(element: *mut ServoElementSnapshot, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom, ignoreCase: bool) -> bool; +} +extern "C" { pub fn Gecko_SnapshotAttrDashEquals(element: *mut ServoElementSnapshot, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_SnapshotAttrIncludes(element: *mut ServoElementSnapshot, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_SnapshotAttrHasSubstring(element: *mut ServoElementSnapshot, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_SnapshotAttrHasPrefix(element: *mut ServoElementSnapshot, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_SnapshotAttrHasSuffix(element: *mut ServoElementSnapshot, ns: *mut nsIAtom, name: *mut nsIAtom, str: *mut nsIAtom) -> bool; +} +extern "C" { pub fn Gecko_SnapshotClassOrClassList(element: *mut ServoElementSnapshot, class_: *mut *mut nsIAtom, classList: *mut *mut *mut nsIAtom) -> u32; +} +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; +} +extern "C" { pub fn Gecko_AddRefAtom(aAtom: *mut nsIAtom); +} +extern "C" { pub fn Gecko_ReleaseAtom(aAtom: *mut nsIAtom); +} +extern "C" { pub fn Gecko_GetAtomAsUTF16(aAtom: *mut nsIAtom, aLength: *mut u32) -> *const u16; +} +extern "C" { pub fn Gecko_AtomEqualsUTF8(aAtom: *mut nsIAtom, aString: *const ::std::os::raw::c_char, aLength: u32) -> bool; +} +extern "C" { pub fn Gecko_AtomEqualsUTF8IgnoreCase(aAtom: *mut nsIAtom, aString: *const ::std::os::raw::c_char, aLength: u32) -> bool; +} +extern "C" { pub fn Gecko_FontFamilyList_Clear(aList: *mut FontFamilyList); +} +extern "C" { pub fn Gecko_FontFamilyList_AppendNamed(aList: *mut FontFamilyList, aName: *mut nsIAtom); +} +extern "C" { pub fn Gecko_FontFamilyList_AppendGeneric(list: *mut FontFamilyList, familyType: FontFamilyType); +} +extern "C" { pub fn Gecko_CopyFontFamilyFrom(dst: *mut nsFont, src: *const nsFont); +} +extern "C" { pub fn Gecko_SetListStyleType(style_struct: *mut nsStyleList, type_: u32); +} +extern "C" { pub fn Gecko_CopyListStyleTypeFrom(dst: *mut nsStyleList, src: *const nsStyleList); +} +extern "C" { pub fn Gecko_SetNullImageValue(image: *mut nsStyleImage); +} +extern "C" { pub fn Gecko_SetGradientImageValue(image: *mut nsStyleImage, gradient: *mut nsStyleGradient); +} +extern "C" { pub fn Gecko_CopyImageValueFrom(image: *mut nsStyleImage, other: *const nsStyleImage); +} +extern "C" { pub fn Gecko_CreateGradient(shape: u8, size: u8, repeating: bool, legacy_syntax: bool, stops: u32) -> *mut nsStyleGradient; +} +pub type ThreadSafePrincipalHolder = nsMainThreadPtrHolder<nsIPrincipal>; +extern "C" { pub fn Gecko_AddRefPrincipalArbitraryThread(aPtr: *mut ThreadSafePrincipalHolder); +} +extern "C" { pub fn Gecko_ReleasePrincipalArbitraryThread(aPtr: *mut ThreadSafePrincipalHolder); +} +pub type ThreadSafeURIHolder = nsMainThreadPtrHolder<nsIURI>; +extern "C" { pub fn Gecko_AddRefURIArbitraryThread(aPtr: *mut ThreadSafeURIHolder); +} +extern "C" { pub fn Gecko_ReleaseURIArbitraryThread(aPtr: *mut ThreadSafeURIHolder); +} +extern "C" { pub fn Gecko_SetMozBinding(style_struct: *mut nsStyleDisplay, string_bytes: *const u8, string_length: u32, base_uri: *mut ThreadSafeURIHolder, referrer: *mut ThreadSafeURIHolder, principal: *mut ThreadSafePrincipalHolder); +} +extern "C" { pub fn Gecko_CopyMozBindingFrom(des: *mut nsStyleDisplay, src: *const nsStyleDisplay); +} +extern "C" { pub fn Gecko_GetNodeFlags(node: RawGeckoNodeBorrowed) -> u32; +} +extern "C" { pub fn Gecko_SetNodeFlags(node: RawGeckoNodeBorrowed, flags: u32); +} +extern "C" { pub fn Gecko_UnsetNodeFlags(node: RawGeckoNodeBorrowed, flags: u32); +} +extern "C" { pub fn Gecko_GetStyleContext(node: RawGeckoNodeBorrowed, aPseudoTagOrNull: *mut nsIAtom) -> *mut nsStyleContext; +} +extern "C" { pub fn Gecko_CalcStyleDifference(oldstyle: *mut nsStyleContext, newstyle: ServoComputedValuesBorrowed) -> nsChangeHint; +} +extern "C" { pub fn Gecko_StoreStyleDifference(node: RawGeckoNodeBorrowed, change: nsChangeHint); - pub fn Gecko_EnsureTArrayCapacity(array: *mut ::std::os::raw::c_void, - capacity: usize, elem_size: usize); - pub fn Gecko_ClearPODTArray(array: *mut ::std::os::raw::c_void, - elem_size: usize, elem_align: usize); +} +extern "C" { pub fn Gecko_ClearStyleContents(content: *mut nsStyleContent); +} +extern "C" { pub fn Gecko_CopyStyleContentsFrom(content: *mut nsStyleContent, other: *const nsStyleContent); +} +extern "C" { pub fn Gecko_EnsureImageLayersLength(layers: *mut nsStyleImageLayers, len: usize); - pub fn Gecko_InitializeImageLayer(layer: *mut Layer, - layer_type: LayerType); +} +extern "C" { + pub fn Gecko_InitializeImageLayer(layer: *mut nsStyleImageLayers_Layer, + layer_type: + nsStyleImageLayers_LayerType); +} +extern "C" { pub fn Gecko_ResetStyleCoord(unit: *mut nsStyleUnit, value: *mut nsStyleUnion); +} +extern "C" { pub fn Gecko_SetStyleCoordCalcValue(unit: *mut nsStyleUnit, value: *mut nsStyleUnion, - calc: CalcValue); + calc: nsStyleCoord_CalcValue); +} +extern "C" { pub fn Gecko_CopyClipPathValueFrom(dst: *mut StyleClipPath, src: *const StyleClipPath); +} +extern "C" { pub fn Gecko_DestroyClipPath(clip: *mut StyleClipPath); +} +extern "C" { pub fn Gecko_NewBasicShape(type_: StyleBasicShapeType) -> *mut StyleBasicShape; +} +extern "C" { pub fn Gecko_FillAllBackgroundLists(layers: *mut nsStyleImageLayers, max_len: u32); +} +extern "C" { pub fn Gecko_FillAllMaskLists(layers: *mut nsStyleImageLayers, max_len: u32); - pub fn Gecko_AddRefCalcArbitraryThread(aPtr: *mut Calc); - pub fn Gecko_ReleaseCalcArbitraryThread(aPtr: *mut Calc); +} +extern "C" { + pub fn Gecko_AddRefCalcArbitraryThread(aPtr: *mut nsStyleCoord_Calc); +} +extern "C" { + pub fn Gecko_ReleaseCalcArbitraryThread(aPtr: *mut nsStyleCoord_Calc); +} +extern "C" { pub fn Gecko_NewCSSShadowArray(len: u32) -> *mut nsCSSShadowArray; +} +extern "C" { pub fn Gecko_AddRefCSSShadowArrayArbitraryThread(aPtr: *mut nsCSSShadowArray); +} +extern "C" { pub fn Gecko_ReleaseCSSShadowArrayArbitraryThread(aPtr: *mut nsCSSShadowArray); +} +extern "C" { pub fn Gecko_Construct_nsStyleFont(ptr: *mut nsStyleFont); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleFont(ptr: *mut nsStyleFont, other: *const nsStyleFont); +} +extern "C" { pub fn Gecko_Destroy_nsStyleFont(ptr: *mut nsStyleFont); +} +extern "C" { pub fn Gecko_Construct_nsStyleColor(ptr: *mut nsStyleColor); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleColor(ptr: *mut nsStyleColor, other: *const nsStyleColor); +} +extern "C" { pub fn Gecko_Destroy_nsStyleColor(ptr: *mut nsStyleColor); +} +extern "C" { pub fn Gecko_Construct_nsStyleList(ptr: *mut nsStyleList); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleList(ptr: *mut nsStyleList, other: *const nsStyleList); +} +extern "C" { pub fn Gecko_Destroy_nsStyleList(ptr: *mut nsStyleList); +} +extern "C" { pub fn Gecko_Construct_nsStyleText(ptr: *mut nsStyleText); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleText(ptr: *mut nsStyleText, other: *const nsStyleText); +} +extern "C" { pub fn Gecko_Destroy_nsStyleText(ptr: *mut nsStyleText); +} +extern "C" { pub fn Gecko_Construct_nsStyleVisibility(ptr: *mut nsStyleVisibility); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleVisibility(ptr: *mut nsStyleVisibility, other: *const nsStyleVisibility); +} +extern "C" { pub fn Gecko_Destroy_nsStyleVisibility(ptr: *mut nsStyleVisibility); +} +extern "C" { pub fn Gecko_Construct_nsStyleUserInterface(ptr: *mut nsStyleUserInterface); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleUserInterface(ptr: *mut nsStyleUserInterface, other: *const nsStyleUserInterface); +} +extern "C" { pub fn Gecko_Destroy_nsStyleUserInterface(ptr: *mut nsStyleUserInterface); +} +extern "C" { pub fn Gecko_Construct_nsStyleTableBorder(ptr: *mut nsStyleTableBorder); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleTableBorder(ptr: *mut nsStyleTableBorder, other: *const nsStyleTableBorder); +} +extern "C" { pub fn Gecko_Destroy_nsStyleTableBorder(ptr: *mut nsStyleTableBorder); +} +extern "C" { pub fn Gecko_Construct_nsStyleSVG(ptr: *mut nsStyleSVG); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleSVG(ptr: *mut nsStyleSVG, other: *const nsStyleSVG); +} +extern "C" { pub fn Gecko_Destroy_nsStyleSVG(ptr: *mut nsStyleSVG); +} +extern "C" { pub fn Gecko_Construct_nsStyleVariables(ptr: *mut nsStyleVariables); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleVariables(ptr: *mut nsStyleVariables, other: *const nsStyleVariables); +} +extern "C" { pub fn Gecko_Destroy_nsStyleVariables(ptr: *mut nsStyleVariables); +} +extern "C" { pub fn Gecko_Construct_nsStyleBackground(ptr: *mut nsStyleBackground); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleBackground(ptr: *mut nsStyleBackground, other: *const nsStyleBackground); +} +extern "C" { pub fn Gecko_Destroy_nsStyleBackground(ptr: *mut nsStyleBackground); +} +extern "C" { pub fn Gecko_Construct_nsStylePosition(ptr: *mut nsStylePosition); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStylePosition(ptr: *mut nsStylePosition, other: *const nsStylePosition); +} +extern "C" { pub fn Gecko_Destroy_nsStylePosition(ptr: *mut nsStylePosition); +} +extern "C" { pub fn Gecko_Construct_nsStyleTextReset(ptr: *mut nsStyleTextReset); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleTextReset(ptr: *mut nsStyleTextReset, other: *const nsStyleTextReset); +} +extern "C" { pub fn Gecko_Destroy_nsStyleTextReset(ptr: *mut nsStyleTextReset); +} +extern "C" { pub fn Gecko_Construct_nsStyleDisplay(ptr: *mut nsStyleDisplay); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleDisplay(ptr: *mut nsStyleDisplay, other: *const nsStyleDisplay); +} +extern "C" { pub fn Gecko_Destroy_nsStyleDisplay(ptr: *mut nsStyleDisplay); +} +extern "C" { pub fn Gecko_Construct_nsStyleContent(ptr: *mut nsStyleContent); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleContent(ptr: *mut nsStyleContent, other: *const nsStyleContent); +} +extern "C" { pub fn Gecko_Destroy_nsStyleContent(ptr: *mut nsStyleContent); +} +extern "C" { pub fn Gecko_Construct_nsStyleUIReset(ptr: *mut nsStyleUIReset); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleUIReset(ptr: *mut nsStyleUIReset, other: *const nsStyleUIReset); +} +extern "C" { pub fn Gecko_Destroy_nsStyleUIReset(ptr: *mut nsStyleUIReset); +} +extern "C" { pub fn Gecko_Construct_nsStyleTable(ptr: *mut nsStyleTable); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleTable(ptr: *mut nsStyleTable, other: *const nsStyleTable); +} +extern "C" { pub fn Gecko_Destroy_nsStyleTable(ptr: *mut nsStyleTable); +} +extern "C" { pub fn Gecko_Construct_nsStyleMargin(ptr: *mut nsStyleMargin); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleMargin(ptr: *mut nsStyleMargin, other: *const nsStyleMargin); +} +extern "C" { pub fn Gecko_Destroy_nsStyleMargin(ptr: *mut nsStyleMargin); +} +extern "C" { pub fn Gecko_Construct_nsStylePadding(ptr: *mut nsStylePadding); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStylePadding(ptr: *mut nsStylePadding, other: *const nsStylePadding); +} +extern "C" { pub fn Gecko_Destroy_nsStylePadding(ptr: *mut nsStylePadding); +} +extern "C" { pub fn Gecko_Construct_nsStyleBorder(ptr: *mut nsStyleBorder); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleBorder(ptr: *mut nsStyleBorder, other: *const nsStyleBorder); +} +extern "C" { pub fn Gecko_Destroy_nsStyleBorder(ptr: *mut nsStyleBorder); +} +extern "C" { pub fn Gecko_Construct_nsStyleOutline(ptr: *mut nsStyleOutline); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleOutline(ptr: *mut nsStyleOutline, other: *const nsStyleOutline); +} +extern "C" { pub fn Gecko_Destroy_nsStyleOutline(ptr: *mut nsStyleOutline); +} +extern "C" { pub fn Gecko_Construct_nsStyleXUL(ptr: *mut nsStyleXUL); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleXUL(ptr: *mut nsStyleXUL, other: *const nsStyleXUL); +} +extern "C" { pub fn Gecko_Destroy_nsStyleXUL(ptr: *mut nsStyleXUL); +} +extern "C" { pub fn Gecko_Construct_nsStyleSVGReset(ptr: *mut nsStyleSVGReset); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleSVGReset(ptr: *mut nsStyleSVGReset, other: *const nsStyleSVGReset); +} +extern "C" { pub fn Gecko_Destroy_nsStyleSVGReset(ptr: *mut nsStyleSVGReset); +} +extern "C" { pub fn Gecko_Construct_nsStyleColumn(ptr: *mut nsStyleColumn); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleColumn(ptr: *mut nsStyleColumn, other: *const nsStyleColumn); +} +extern "C" { pub fn Gecko_Destroy_nsStyleColumn(ptr: *mut nsStyleColumn); +} +extern "C" { pub fn Gecko_Construct_nsStyleEffects(ptr: *mut nsStyleEffects); +} +extern "C" { pub fn Gecko_CopyConstruct_nsStyleEffects(ptr: *mut nsStyleEffects, other: *const nsStyleEffects); +} +extern "C" { pub fn Gecko_Destroy_nsStyleEffects(ptr: *mut nsStyleEffects); - pub fn Servo_NodeData_Drop(data: ServoNodeDataOwned); +} +extern "C" { pub fn Servo_StyleSheet_FromUTF8Bytes(bytes: *const u8, length: u32, parsing_mode: SheetParsingMode, base_bytes: *const u8, @@ -512,49 +827,87 @@ extern "C" { principal: *mut ThreadSafePrincipalHolder) -> RawServoStyleSheetStrong; +} +extern "C" { pub fn Servo_StyleSheet_AddRef(sheet: RawServoStyleSheetBorrowed); +} +extern "C" { pub fn Servo_StyleSheet_Release(sheet: RawServoStyleSheetBorrowed); +} +extern "C" { pub fn Servo_StyleSheet_HasRules(sheet: RawServoStyleSheetBorrowed) -> bool; +} +extern "C" { pub fn Servo_StyleSet_Init() -> RawServoStyleSetOwned; +} +extern "C" { pub fn Servo_StyleSet_Drop(set: RawServoStyleSetOwned); +} +extern "C" { pub fn Servo_StyleSet_AppendStyleSheet(set: RawServoStyleSetBorrowedMut, sheet: RawServoStyleSheetBorrowed); +} +extern "C" { pub fn Servo_StyleSet_PrependStyleSheet(set: RawServoStyleSetBorrowedMut, sheet: RawServoStyleSheetBorrowed); +} +extern "C" { pub fn Servo_StyleSet_RemoveStyleSheet(set: RawServoStyleSetBorrowedMut, sheet: RawServoStyleSheetBorrowed); +} +extern "C" { pub fn Servo_StyleSet_InsertStyleSheetBefore(set: RawServoStyleSetBorrowedMut, sheet: RawServoStyleSheetBorrowed, reference: RawServoStyleSheetBorrowed); +} +extern "C" { pub fn Servo_ParseStyleAttribute(bytes: *const u8, length: u32, cache: *mut nsHTMLCSSStyleSheet) -> ServoDeclarationBlockStrong; +} +extern "C" { pub fn Servo_DeclarationBlock_AddRef(declarations: ServoDeclarationBlockBorrowed); +} +extern "C" { pub fn Servo_DeclarationBlock_Release(declarations: ServoDeclarationBlockBorrowed); +} +extern "C" { pub fn Servo_DeclarationBlock_GetCache(declarations: ServoDeclarationBlockBorrowed) -> *mut nsHTMLCSSStyleSheet; +} +extern "C" { pub fn Servo_DeclarationBlock_SetImmutable(declarations: ServoDeclarationBlockBorrowed); +} +extern "C" { pub fn Servo_DeclarationBlock_ClearCachePointer(declarations: ServoDeclarationBlockBorrowed); +} +extern "C" { pub fn Servo_CSSSupports(name: *const u8, name_length: u32, value: *const u8, value_length: u32) -> bool; +} +extern "C" { pub fn Servo_ComputedValues_Get(node: RawGeckoNodeBorrowed) -> ServoComputedValuesStrong; +} +extern "C" { pub fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null: ServoComputedValuesBorrowedOrNull, pseudoTag: *mut nsIAtom, set: RawServoStyleSetBorrowedMut) -> ServoComputedValuesStrong; +} +extern "C" { pub fn Servo_ComputedValues_GetForPseudoElement(parent_style: ServoComputedValuesBorrowed, match_element: @@ -564,77 +917,141 @@ extern "C" { RawServoStyleSetBorrowedMut, is_probe: bool) -> ServoComputedValuesStrong; +} +extern "C" { pub fn Servo_ComputedValues_Inherit(parent_style: ServoComputedValuesBorrowedOrNull) -> ServoComputedValuesStrong; +} +extern "C" { pub fn Servo_ComputedValues_AddRef(computed_values: ServoComputedValuesBorrowed); +} +extern "C" { pub fn Servo_ComputedValues_Release(computed_values: ServoComputedValuesBorrowed); +} +extern "C" { pub fn Servo_Initialize(); +} +extern "C" { pub fn Servo_Shutdown(); +} +extern "C" { pub fn Servo_ComputeRestyleHint(element: *mut RawGeckoElement, snapshot: *mut ServoElementSnapshot, set: RawServoStyleSetBorrowed) -> nsRestyleHint; +} +extern "C" { pub fn Servo_RestyleDocument(doc: RawGeckoDocumentBorrowed, set: RawServoStyleSetBorrowedMut); +} +extern "C" { pub fn Servo_RestyleSubtree(node: RawGeckoNodeBorrowed, set: RawServoStyleSetBorrowedMut); +} +extern "C" { pub fn Servo_GetStyleFont(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleFont; +} +extern "C" { pub fn Servo_GetStyleColor(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleColor; +} +extern "C" { pub fn Servo_GetStyleList(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleList; +} +extern "C" { pub fn Servo_GetStyleText(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleText; +} +extern "C" { pub fn Servo_GetStyleVisibility(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleVisibility; +} +extern "C" { pub fn Servo_GetStyleUserInterface(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleUserInterface; +} +extern "C" { pub fn Servo_GetStyleTableBorder(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleTableBorder; +} +extern "C" { pub fn Servo_GetStyleSVG(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleSVG; +} +extern "C" { pub fn Servo_GetStyleVariables(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleVariables; +} +extern "C" { pub fn Servo_GetStyleBackground(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleBackground; +} +extern "C" { pub fn Servo_GetStylePosition(computed_values: ServoComputedValuesBorrowed) -> *const nsStylePosition; +} +extern "C" { pub fn Servo_GetStyleTextReset(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleTextReset; +} +extern "C" { pub fn Servo_GetStyleDisplay(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleDisplay; +} +extern "C" { pub fn Servo_GetStyleContent(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleContent; +} +extern "C" { pub fn Servo_GetStyleUIReset(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleUIReset; +} +extern "C" { pub fn Servo_GetStyleTable(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleTable; +} +extern "C" { pub fn Servo_GetStyleMargin(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleMargin; +} +extern "C" { pub fn Servo_GetStylePadding(computed_values: ServoComputedValuesBorrowed) -> *const nsStylePadding; +} +extern "C" { pub fn Servo_GetStyleBorder(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleBorder; +} +extern "C" { pub fn Servo_GetStyleOutline(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleOutline; +} +extern "C" { pub fn Servo_GetStyleXUL(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleXUL; +} +extern "C" { pub fn Servo_GetStyleSVGReset(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleSVGReset; +} +extern "C" { pub fn Servo_GetStyleColumn(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleColumn; +} +extern "C" { pub fn Servo_GetStyleEffects(computed_values: ServoComputedValuesBorrowed) -> *const nsStyleEffects; } diff --git a/ports/geckolib/gecko_bindings/structs_debug.rs b/ports/geckolib/gecko_bindings/structs_debug.rs index 2e7500bb587..a64cf3912bd 100644 --- a/ports/geckolib/gecko_bindings/structs_debug.rs +++ b/ports/geckolib/gecko_bindings/structs_debug.rs @@ -1,6 +1,6 @@ /* automatically generated by rust-bindgen */ -#[derive(Copy, Debug)] +#[derive(Debug)] #[repr(C)] pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); impl <T> __BindgenUnionField<T> { @@ -19,6 +19,7 @@ impl <T> ::std::clone::Clone for __BindgenUnionField<T> { #[inline] fn clone(&self) -> Self { Self::new() } } +impl <T> ::std::marker::Copy for __BindgenUnionField<T> { } pub const NS_THEME_NONE: ::std::os::raw::c_uint = 0; pub const NS_THEME_BUTTON: ::std::os::raw::c_uint = 1; pub const NS_THEME_RADIO: ::std::os::raw::c_uint = 2; @@ -142,63 +143,9 @@ pub const NS_THEME_MAC_DISCLOSURE_BUTTON_OPEN: ::std::os::raw::c_uint = 245; pub const NS_THEME_MAC_DISCLOSURE_BUTTON_CLOSED: ::std::os::raw::c_uint = 246; pub const NS_THEME_GTK_INFO_BAR: ::std::os::raw::c_uint = 247; pub const NS_THEME_MAC_SOURCE_LIST: ::std::os::raw::c_uint = 248; -pub const NS_ERROR_MODULE_XPCOM: ::std::os::raw::c_uint = 1; -pub const NS_ERROR_MODULE_BASE: ::std::os::raw::c_uint = 2; -pub const NS_ERROR_MODULE_GFX: ::std::os::raw::c_uint = 3; -pub const NS_ERROR_MODULE_WIDGET: ::std::os::raw::c_uint = 4; -pub const NS_ERROR_MODULE_CALENDAR: ::std::os::raw::c_uint = 5; -pub const NS_ERROR_MODULE_NETWORK: ::std::os::raw::c_uint = 6; -pub const NS_ERROR_MODULE_PLUGINS: ::std::os::raw::c_uint = 7; -pub const NS_ERROR_MODULE_LAYOUT: ::std::os::raw::c_uint = 8; -pub const NS_ERROR_MODULE_HTMLPARSER: ::std::os::raw::c_uint = 9; -pub const NS_ERROR_MODULE_RDF: ::std::os::raw::c_uint = 10; -pub const NS_ERROR_MODULE_UCONV: ::std::os::raw::c_uint = 11; -pub const NS_ERROR_MODULE_REG: ::std::os::raw::c_uint = 12; -pub const NS_ERROR_MODULE_FILES: ::std::os::raw::c_uint = 13; -pub const NS_ERROR_MODULE_DOM: ::std::os::raw::c_uint = 14; -pub const NS_ERROR_MODULE_IMGLIB: ::std::os::raw::c_uint = 15; -pub const NS_ERROR_MODULE_MAILNEWS: ::std::os::raw::c_uint = 16; -pub const NS_ERROR_MODULE_EDITOR: ::std::os::raw::c_uint = 17; -pub const NS_ERROR_MODULE_XPCONNECT: ::std::os::raw::c_uint = 18; -pub const NS_ERROR_MODULE_PROFILE: ::std::os::raw::c_uint = 19; -pub const NS_ERROR_MODULE_LDAP: ::std::os::raw::c_uint = 20; -pub const NS_ERROR_MODULE_SECURITY: ::std::os::raw::c_uint = 21; -pub const NS_ERROR_MODULE_DOM_XPATH: ::std::os::raw::c_uint = 22; -pub const NS_ERROR_MODULE_URILOADER: ::std::os::raw::c_uint = 24; -pub const NS_ERROR_MODULE_CONTENT: ::std::os::raw::c_uint = 25; -pub const NS_ERROR_MODULE_PYXPCOM: ::std::os::raw::c_uint = 26; -pub const NS_ERROR_MODULE_XSLT: ::std::os::raw::c_uint = 27; -pub const NS_ERROR_MODULE_IPC: ::std::os::raw::c_uint = 28; -pub const NS_ERROR_MODULE_SVG: ::std::os::raw::c_uint = 29; -pub const NS_ERROR_MODULE_STORAGE: ::std::os::raw::c_uint = 30; -pub const NS_ERROR_MODULE_SCHEMA: ::std::os::raw::c_uint = 31; -pub const NS_ERROR_MODULE_DOM_FILE: ::std::os::raw::c_uint = 32; -pub const NS_ERROR_MODULE_DOM_INDEXEDDB: ::std::os::raw::c_uint = 33; -pub const NS_ERROR_MODULE_DOM_FILEHANDLE: ::std::os::raw::c_uint = 34; -pub const NS_ERROR_MODULE_SIGNED_JAR: ::std::os::raw::c_uint = 35; -pub const NS_ERROR_MODULE_DOM_FILESYSTEM: ::std::os::raw::c_uint = 36; -pub const NS_ERROR_MODULE_DOM_BLUETOOTH: ::std::os::raw::c_uint = 37; -pub const NS_ERROR_MODULE_SIGNED_APP: ::std::os::raw::c_uint = 38; -pub const NS_ERROR_MODULE_DOM_ANIM: ::std::os::raw::c_uint = 39; -pub const NS_ERROR_MODULE_DOM_PUSH: ::std::os::raw::c_uint = 40; -pub const NS_ERROR_MODULE_DOM_MEDIA: ::std::os::raw::c_uint = 41; -pub const NS_ERROR_MODULE_GENERAL: ::std::os::raw::c_uint = 51; -pub const NS_ERROR_SEVERITY_SUCCESS: ::std::os::raw::c_uint = 0; -pub const NS_ERROR_SEVERITY_ERROR: ::std::os::raw::c_uint = 1; -pub const NS_ERROR_MODULE_BASE_OFFSET: ::std::os::raw::c_uint = 69; -pub const MOZ_STRING_WITH_OBSOLETE_API: ::std::os::raw::c_uint = 1; -pub const NSID_LENGTH: ::std::os::raw::c_uint = 39; -pub const NS_NUMBER_OF_FLAGS_IN_REFCNT: ::std::os::raw::c_uint = 2; -pub const NS_EVENT_STATE_HIGHEST_SERVO_BIT: ::std::os::raw::c_uint = 6; -pub const DOM_USER_DATA: ::std::os::raw::c_uint = 1; -pub const SMIL_MAPPED_ATTR_ANIMVAL: ::std::os::raw::c_uint = 2; -pub const TWIPS_PER_POINT_INT: ::std::os::raw::c_uint = 20; -pub const POINTS_PER_INCH_INT: ::std::os::raw::c_uint = 72; -pub const NS_ATTRNAME_NODEINFO_BIT: ::std::os::raw::c_uint = 1; -pub const NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM: ::std::os::raw::c_uint = 12; -pub const NS_ATTRVALUE_INTEGERTYPE_BITS: ::std::os::raw::c_uint = 4; -pub const NS_FONT_VARIANT_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_VARIANT_SMALL_CAPS: ::std::os::raw::c_uint = 1; +pub const NS_FONT_STYLE_NORMAL: ::std::os::raw::c_uint = 0; +pub const NS_FONT_STYLE_ITALIC: ::std::os::raw::c_uint = 1; +pub const NS_FONT_STYLE_OBLIQUE: ::std::os::raw::c_uint = 2; pub const NS_CORNER_TOP_LEFT_X: ::std::os::raw::c_uint = 0; pub const NS_CORNER_TOP_LEFT_Y: ::std::os::raw::c_uint = 1; pub const NS_CORNER_TOP_RIGHT_X: ::std::os::raw::c_uint = 2; @@ -451,31 +398,6 @@ pub const NS_STYLE_GRID_TRACK_BREADTH_MAX_CONTENT: ::std::os::raw::c_uint = 1; pub const NS_STYLE_GRID_TRACK_BREADTH_MIN_CONTENT: ::std::os::raw::c_uint = 2; pub const NS_STYLE_GRID_REPEAT_AUTO_FILL: ::std::os::raw::c_uint = 0; pub const NS_STYLE_GRID_REPEAT_AUTO_FIT: ::std::os::raw::c_uint = 1; -pub const NS_MATHML_DEFAULT_SCRIPT_MIN_SIZE_PT: ::std::os::raw::c_uint = 8; -pub const NS_MATHML_MATHVARIANT_NONE: ::std::os::raw::c_uint = 0; -pub const NS_MATHML_MATHVARIANT_NORMAL: ::std::os::raw::c_uint = 1; -pub const NS_MATHML_MATHVARIANT_BOLD: ::std::os::raw::c_uint = 2; -pub const NS_MATHML_MATHVARIANT_ITALIC: ::std::os::raw::c_uint = 3; -pub const NS_MATHML_MATHVARIANT_BOLD_ITALIC: ::std::os::raw::c_uint = 4; -pub const NS_MATHML_MATHVARIANT_SCRIPT: ::std::os::raw::c_uint = 5; -pub const NS_MATHML_MATHVARIANT_BOLD_SCRIPT: ::std::os::raw::c_uint = 6; -pub const NS_MATHML_MATHVARIANT_FRAKTUR: ::std::os::raw::c_uint = 7; -pub const NS_MATHML_MATHVARIANT_DOUBLE_STRUCK: ::std::os::raw::c_uint = 8; -pub const NS_MATHML_MATHVARIANT_BOLD_FRAKTUR: ::std::os::raw::c_uint = 9; -pub const NS_MATHML_MATHVARIANT_SANS_SERIF: ::std::os::raw::c_uint = 10; -pub const NS_MATHML_MATHVARIANT_BOLD_SANS_SERIF: ::std::os::raw::c_uint = 11; -pub const NS_MATHML_MATHVARIANT_SANS_SERIF_ITALIC: ::std::os::raw::c_uint = - 12; -pub const NS_MATHML_MATHVARIANT_SANS_SERIF_BOLD_ITALIC: ::std::os::raw::c_uint - = - 13; -pub const NS_MATHML_MATHVARIANT_MONOSPACE: ::std::os::raw::c_uint = 14; -pub const NS_MATHML_MATHVARIANT_INITIAL: ::std::os::raw::c_uint = 15; -pub const NS_MATHML_MATHVARIANT_TAILED: ::std::os::raw::c_uint = 16; -pub const NS_MATHML_MATHVARIANT_LOOPED: ::std::os::raw::c_uint = 17; -pub const NS_MATHML_MATHVARIANT_STRETCHED: ::std::os::raw::c_uint = 18; -pub const NS_MATHML_DISPLAYSTYLE_INLINE: ::std::os::raw::c_uint = 0; -pub const NS_MATHML_DISPLAYSTYLE_BLOCK: ::std::os::raw::c_uint = 1; pub const NS_STYLE_WIDTH_MAX_CONTENT: ::std::os::raw::c_uint = 0; pub const NS_STYLE_WIDTH_MIN_CONTENT: ::std::os::raw::c_uint = 1; pub const NS_STYLE_WIDTH_FIT_CONTENT: ::std::os::raw::c_uint = 2; @@ -847,44 +769,6 @@ pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; -pub const NS_FONT_STYLE_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_STYLE_ITALIC: ::std::os::raw::c_uint = 1; -pub const NS_FONT_STYLE_OBLIQUE: ::std::os::raw::c_uint = 2; -pub const NS_FONT_WEIGHT_NORMAL: ::std::os::raw::c_uint = 400; -pub const NS_FONT_WEIGHT_BOLD: ::std::os::raw::c_uint = 700; -pub const NS_FONT_WEIGHT_THIN: ::std::os::raw::c_uint = 100; -pub const NS_FONT_STRETCH_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_STRETCH_SEMI_EXPANDED: ::std::os::raw::c_uint = 1; -pub const NS_FONT_STRETCH_EXPANDED: ::std::os::raw::c_uint = 2; -pub const NS_FONT_STRETCH_EXTRA_EXPANDED: ::std::os::raw::c_uint = 3; -pub const NS_FONT_STRETCH_ULTRA_EXPANDED: ::std::os::raw::c_uint = 4; -pub const NS_FONT_SMOOTHING_AUTO: ::std::os::raw::c_uint = 0; -pub const NS_FONT_SMOOTHING_GRAYSCALE: ::std::os::raw::c_uint = 1; -pub const NS_FONT_KERNING_AUTO: ::std::os::raw::c_uint = 0; -pub const NS_FONT_KERNING_NONE: ::std::os::raw::c_uint = 1; -pub const NS_FONT_KERNING_NORMAL: ::std::os::raw::c_uint = 2; -pub const NS_FONT_SYNTHESIS_WEIGHT: ::std::os::raw::c_uint = 1; -pub const NS_FONT_SYNTHESIS_STYLE: ::std::os::raw::c_uint = 2; -pub const NS_FONT_DISPLAY_AUTO: ::std::os::raw::c_uint = 0; -pub const NS_FONT_DISPLAY_BLOCK: ::std::os::raw::c_uint = 1; -pub const NS_FONT_DISPLAY_SWAP: ::std::os::raw::c_uint = 2; -pub const NS_FONT_DISPLAY_FALLBACK: ::std::os::raw::c_uint = 3; -pub const NS_FONT_DISPLAY_OPTIONAL: ::std::os::raw::c_uint = 4; -pub const NS_FONT_VARIANT_CAPS_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_VARIANT_CAPS_SMALLCAPS: ::std::os::raw::c_uint = 1; -pub const NS_FONT_VARIANT_CAPS_ALLSMALL: ::std::os::raw::c_uint = 2; -pub const NS_FONT_VARIANT_CAPS_PETITECAPS: ::std::os::raw::c_uint = 3; -pub const NS_FONT_VARIANT_CAPS_ALLPETITE: ::std::os::raw::c_uint = 4; -pub const NS_FONT_VARIANT_CAPS_TITLING: ::std::os::raw::c_uint = 5; -pub const NS_FONT_VARIANT_CAPS_UNICASE: ::std::os::raw::c_uint = 6; -pub const NS_FONT_VARIANT_POSITION_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_VARIANT_POSITION_SUPER: ::std::os::raw::c_uint = 1; -pub const NS_FONT_VARIANT_POSITION_SUB: ::std::os::raw::c_uint = 2; -pub const NS_FONT_VARIANT_WIDTH_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_VARIANT_WIDTH_FULL: ::std::os::raw::c_uint = 1; -pub const NS_FONT_VARIANT_WIDTH_HALF: ::std::os::raw::c_uint = 2; -pub const NS_FONT_VARIANT_WIDTH_THIRD: ::std::os::raw::c_uint = 3; -pub const NS_FONT_VARIANT_WIDTH_QUARTER: ::std::os::raw::c_uint = 4; pub const NS_STYLE_INHERIT_MASK: ::std::os::raw::c_uint = 16777215; pub const NS_STYLE_HAS_TEXT_DECORATION_LINES: ::std::os::raw::c_uint = 16777216; @@ -906,20 +790,25 @@ pub const NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE: pub const NS_STYLE_IS_TEXT_COMBINED: ::std::os::raw::c_ulonglong = 34359738368; pub const NS_STYLE_CONTEXT_TYPE_SHIFT: ::std::os::raw::c_uint = 36; -pub const NS_RULE_NODE_IS_ANIMATION_RULE: ::std::os::raw::c_uint = 16777216; -pub const NS_RULE_NODE_USED_DIRECTLY: ::std::os::raw::c_uint = 67108864; -pub const NS_RULE_NODE_IS_IMPORTANT: ::std::os::raw::c_uint = 134217728; -pub const NS_RULE_NODE_LEVEL_MASK: ::std::os::raw::c_uint = 4026531840; -pub const NS_RULE_NODE_LEVEL_SHIFT: ::std::os::raw::c_uint = 28; -pub const NS_RULE_NODE_HAS_ANIMATION_DATA: ::std::os::raw::c_uint = - 2147483648; pub const BORDER_COLOR_FOREGROUND: ::std::os::raw::c_uint = 32; -pub const OUTLINE_COLOR_INITIAL: ::std::os::raw::c_uint = 128; pub const BORDER_COLOR_SPECIAL: ::std::os::raw::c_uint = 160; pub const BORDER_STYLE_MASK: ::std::os::raw::c_uint = 31; -pub const NS_SPACING_MARGIN: ::std::os::raw::c_uint = 0; -pub const NS_SPACING_PADDING: ::std::os::raw::c_uint = 1; -pub const NS_SPACING_BORDER: ::std::os::raw::c_uint = 2; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct fallible_t { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_fallible_t() { + assert_eq!(::std::mem::size_of::<fallible_t>() , 1usize); + assert_eq!(::std::mem::align_of::<fallible_t>() , 1usize); +} +impl Clone for fallible_t { + fn clone(&self) -> Self { *self } +} +/** Convenient aliases. */ +pub type TrueType = u8; +pub type FalseType = u8; /** * MozRefCountType is Mozilla's reference count type. * @@ -931,179 +820,184 @@ pub const NS_SPACING_BORDER: ::std::os::raw::c_uint = 2; * usable for both C and C++ code. */ pub type MozRefCountType = usize; -pub type MozExternalRefCountType = u32; -pub const NS_ERROR_NO_INTERFACE: nsresult = nsresult::NS_NOINTERFACE; -pub const NS_ERROR_INVALID_ARG: nsresult = nsresult::NS_ERROR_ILLEGAL_VALUE; -pub const NS_ERROR_INVALID_POINTER: nsresult = +pub const nsresult_NS_ERROR_NO_INTERFACE: nsresult = nsresult::NS_NOINTERFACE; +pub const nsresult_NS_ERROR_INVALID_ARG: nsresult = + nsresult::NS_ERROR_ILLEGAL_VALUE; +pub const nsresult_NS_ERROR_INVALID_POINTER: nsresult = nsresult::NS_ERROR_ILLEGAL_VALUE; -pub const NS_ERROR_NULL_POINTER: nsresult = nsresult::NS_ERROR_ILLEGAL_VALUE; -pub const NS_BINDING_SUCCEEDED: nsresult = nsresult::NS_OK; -pub const NS_NET_STATUS_RESOLVING_HOST: nsresult = +pub const nsresult_NS_ERROR_NULL_POINTER: nsresult = + nsresult::NS_ERROR_ILLEGAL_VALUE; +pub const nsresult_NS_BINDING_SUCCEEDED: nsresult = nsresult::NS_OK; +pub const nsresult_NS_NET_STATUS_RESOLVING_HOST: nsresult = nsresult::NS_BINDING_REDIRECTED; -pub const NS_NET_STATUS_RESOLVED_HOST: nsresult = +pub const nsresult_NS_NET_STATUS_RESOLVED_HOST: nsresult = nsresult::NS_ERROR_ALREADY_CONNECTED; -pub const NS_NET_STATUS_CONNECTED_TO: nsresult = +pub const nsresult_NS_NET_STATUS_CONNECTED_TO: nsresult = nsresult::NS_BINDING_RETARGETED; -pub const NS_NET_STATUS_WAITING_FOR: nsresult = +pub const nsresult_NS_NET_STATUS_WAITING_FOR: nsresult = nsresult::NS_ERROR_MALFORMED_URI; -pub const NS_STATE_PROPERTY_EXISTS: nsresult = nsresult::NS_OK; -pub const NS_ERROR_HTMLPARSER_CONTINUE: nsresult = nsresult::NS_OK; -pub const NS_RDF_ASSERTION_ACCEPTED: nsresult = nsresult::NS_OK; -pub const NS_EXACT_LENGTH: nsresult = nsresult::NS_OK_UDEC_EXACTLENGTH; -pub const NS_PARTIAL_MORE_INPUT: nsresult = nsresult::NS_OK_UDEC_MOREINPUT; -pub const NS_PARTIAL_MORE_OUTPUT: nsresult = nsresult::NS_OK_UDEC_MOREOUTPUT; -pub const NS_ERROR_ILLEGAL_INPUT: nsresult = +pub const nsresult_NS_STATE_PROPERTY_EXISTS: nsresult = nsresult::NS_OK; +pub const nsresult_NS_ERROR_HTMLPARSER_CONTINUE: nsresult = nsresult::NS_OK; +pub const nsresult_NS_RDF_ASSERTION_ACCEPTED: nsresult = nsresult::NS_OK; +pub const nsresult_NS_EXACT_LENGTH: nsresult = + nsresult::NS_OK_UDEC_EXACTLENGTH; +pub const nsresult_NS_PARTIAL_MORE_INPUT: nsresult = + nsresult::NS_OK_UDEC_MOREINPUT; +pub const nsresult_NS_PARTIAL_MORE_OUTPUT: nsresult = + nsresult::NS_OK_UDEC_MOREOUTPUT; +pub const nsresult_NS_ERROR_ILLEGAL_INPUT: nsresult = nsresult::NS_ERROR_UDEC_ILLEGALINPUT; -pub const NS_ERROR_XPATH_INVALID_ARG: nsresult = +pub const nsresult_NS_ERROR_XPATH_INVALID_ARG: nsresult = nsresult::NS_ERROR_ILLEGAL_VALUE; -pub const NS_SUCCESS_RESTART_APP: nsresult = nsresult::NS_SUCCESS_DONT_FIXUP; -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub const nsresult_NS_SUCCESS_RESTART_APP: nsresult = + nsresult::NS_SUCCESS_DONT_FIXUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsresult { NS_OK = 0, - NS_ERROR_BASE = -1041039360, - NS_ERROR_NOT_INITIALIZED = -1041039359, - NS_ERROR_ALREADY_INITIALIZED = -1041039358, - NS_ERROR_NOT_IMPLEMENTED = -2147467263, - NS_NOINTERFACE = -2147467262, - NS_ERROR_ABORT = -2147467260, - NS_ERROR_FAILURE = -2147467259, - NS_ERROR_UNEXPECTED = -2147418113, - NS_ERROR_OUT_OF_MEMORY = -2147024882, - NS_ERROR_ILLEGAL_VALUE = -2147024809, - NS_ERROR_NO_AGGREGATION = -2147221232, - NS_ERROR_NOT_AVAILABLE = -2147221231, - NS_ERROR_FACTORY_NOT_REGISTERED = -2147221164, - NS_ERROR_FACTORY_REGISTER_AGAIN = -2147221163, - NS_ERROR_FACTORY_NOT_LOADED = -2147221000, - NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT = -1041039103, - NS_ERROR_FACTORY_EXISTS = -1041039104, - NS_ERROR_CANNOT_CONVERT_DATA = -2142896127, - NS_ERROR_OBJECT_IS_IMMUTABLE = -2142896126, - NS_ERROR_LOSS_OF_SIGNIFICANT_DATA = -2142896125, - NS_ERROR_NOT_SAME_THREAD = -2142896124, - NS_ERROR_ILLEGAL_DURING_SHUTDOWN = -2142896098, - NS_ERROR_SERVICE_NOT_AVAILABLE = -2142896106, + NS_ERROR_BASE = 3253927936, + NS_ERROR_NOT_INITIALIZED = 3253927937, + NS_ERROR_ALREADY_INITIALIZED = 3253927938, + NS_ERROR_NOT_IMPLEMENTED = 2147500033, + NS_NOINTERFACE = 2147500034, + NS_ERROR_ABORT = 2147500036, + NS_ERROR_FAILURE = 2147500037, + NS_ERROR_UNEXPECTED = 2147549183, + NS_ERROR_OUT_OF_MEMORY = 2147942414, + NS_ERROR_ILLEGAL_VALUE = 2147942487, + NS_ERROR_NO_AGGREGATION = 2147746064, + NS_ERROR_NOT_AVAILABLE = 2147746065, + NS_ERROR_FACTORY_NOT_REGISTERED = 2147746132, + NS_ERROR_FACTORY_REGISTER_AGAIN = 2147746133, + NS_ERROR_FACTORY_NOT_LOADED = 2147746296, + NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT = 3253928193, + NS_ERROR_FACTORY_EXISTS = 3253928192, + NS_ERROR_CANNOT_CONVERT_DATA = 2152071169, + NS_ERROR_OBJECT_IS_IMMUTABLE = 2152071170, + NS_ERROR_LOSS_OF_SIGNIFICANT_DATA = 2152071171, + NS_ERROR_NOT_SAME_THREAD = 2152071172, + NS_ERROR_ILLEGAL_DURING_SHUTDOWN = 2152071198, + NS_ERROR_SERVICE_NOT_AVAILABLE = 2152071190, NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA = 4587521, NS_SUCCESS_INTERRUPTED_TRAVERSE = 4587522, NS_ERROR_SERVICE_NOT_FOUND = 4587542, NS_ERROR_SERVICE_IN_USE = 4587543, - NS_BASE_STREAM_CLOSED = -2142830590, - NS_BASE_STREAM_OSERROR = -2142830589, - NS_BASE_STREAM_ILLEGAL_ARGS = -2142830588, - NS_BASE_STREAM_NO_CONVERTER = -2142830587, - NS_BASE_STREAM_BAD_CONVERSION = -2142830586, - NS_BASE_STREAM_WOULD_BLOCK = -2142830585, - NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE = -2142765055, - NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND = -2142765054, - NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE = -2142765053, - NS_ERROR_GFX_PRINTER_STARTDOC = -2142765052, - NS_ERROR_GFX_PRINTER_ENDDOC = -2142765051, - NS_ERROR_GFX_PRINTER_STARTPAGE = -2142765050, - NS_ERROR_GFX_PRINTER_DOC_IS_BUSY = -2142765049, - NS_ERROR_GFX_CMAP_MALFORMED = -2142765005, + NS_BASE_STREAM_CLOSED = 2152136706, + NS_BASE_STREAM_OSERROR = 2152136707, + NS_BASE_STREAM_ILLEGAL_ARGS = 2152136708, + NS_BASE_STREAM_NO_CONVERTER = 2152136709, + NS_BASE_STREAM_BAD_CONVERSION = 2152136710, + NS_BASE_STREAM_WOULD_BLOCK = 2152136711, + NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE = 2152202241, + NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND = 2152202242, + NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE = 2152202243, + NS_ERROR_GFX_PRINTER_STARTDOC = 2152202244, + NS_ERROR_GFX_PRINTER_ENDDOC = 2152202245, + NS_ERROR_GFX_PRINTER_STARTPAGE = 2152202246, + NS_ERROR_GFX_PRINTER_DOC_IS_BUSY = 2152202247, + NS_ERROR_GFX_CMAP_MALFORMED = 2152202291, NS_SUCCESS_EVENT_CONSUMED = 4784129, NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY = 4784130, - NS_BINDING_FAILED = -2142568447, - NS_BINDING_ABORTED = -2142568446, - NS_BINDING_REDIRECTED = -2142568445, - NS_BINDING_RETARGETED = -2142568444, - NS_ERROR_MALFORMED_URI = -2142568438, - NS_ERROR_IN_PROGRESS = -2142568433, - NS_ERROR_NO_CONTENT = -2142568431, - NS_ERROR_UNKNOWN_PROTOCOL = -2142568430, - NS_ERROR_INVALID_CONTENT_ENCODING = -2142568421, - NS_ERROR_CORRUPTED_CONTENT = -2142568419, - NS_ERROR_INVALID_SIGNATURE = -2142568390, - NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY = -2142568414, - NS_ERROR_ALREADY_OPENED = -2142568375, - NS_ERROR_ALREADY_CONNECTED = -2142568437, - NS_ERROR_NOT_CONNECTED = -2142568436, - NS_ERROR_CONNECTION_REFUSED = -2142568435, - NS_ERROR_NET_TIMEOUT = -2142568434, - NS_ERROR_OFFLINE = -2142568432, - NS_ERROR_PORT_ACCESS_NOT_ALLOWED = -2142568429, - NS_ERROR_NET_RESET = -2142568428, - NS_ERROR_NET_INTERRUPT = -2142568377, - NS_ERROR_PROXY_CONNECTION_REFUSED = -2142568376, - NS_ERROR_NET_PARTIAL_TRANSFER = -2142568372, - NS_ERROR_NET_INADEQUATE_SECURITY = -2142568366, - NS_ERROR_NOT_RESUMABLE = -2142568423, - NS_ERROR_REDIRECT_LOOP = -2142568417, - NS_ERROR_ENTITY_CHANGED = -2142568416, - NS_ERROR_UNSAFE_CONTENT_TYPE = -2142568374, - NS_ERROR_REMOTE_XUL = -2142568373, - NS_ERROR_LOAD_SHOWED_ERRORPAGE = -2142568371, - NS_ERROR_FTP_LOGIN = -2142568427, - NS_ERROR_FTP_CWD = -2142568426, - NS_ERROR_FTP_PASV = -2142568425, - NS_ERROR_FTP_PWD = -2142568424, - NS_ERROR_FTP_LIST = -2142568420, - NS_ERROR_UNKNOWN_HOST = -2142568418, - NS_ERROR_DNS_LOOKUP_QUEUE_FULL = -2142568415, - NS_ERROR_UNKNOWN_PROXY_HOST = -2142568406, - NS_ERROR_UNKNOWN_SOCKET_TYPE = -2142568397, - NS_ERROR_SOCKET_CREATE_FAILED = -2142568396, - NS_ERROR_SOCKET_ADDRESS_NOT_SUPPORTED = -2142568395, - NS_ERROR_SOCKET_ADDRESS_IN_USE = -2142568394, - NS_ERROR_CACHE_KEY_NOT_FOUND = -2142568387, - NS_ERROR_CACHE_DATA_IS_STREAM = -2142568386, - NS_ERROR_CACHE_DATA_IS_NOT_STREAM = -2142568385, - NS_ERROR_CACHE_WAIT_FOR_VALIDATION = -2142568384, - NS_ERROR_CACHE_ENTRY_DOOMED = -2142568383, - NS_ERROR_CACHE_READ_ACCESS_DENIED = -2142568382, - NS_ERROR_CACHE_WRITE_ACCESS_DENIED = -2142568381, - NS_ERROR_CACHE_IN_USE = -2142568380, - NS_ERROR_DOCUMENT_NOT_CACHED = -2142568378, - NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS = -2142568368, - NS_ERROR_HOST_IS_IP_ADDRESS = -2142568367, + NS_BINDING_FAILED = 2152398849, + NS_BINDING_ABORTED = 2152398850, + NS_BINDING_REDIRECTED = 2152398851, + NS_BINDING_RETARGETED = 2152398852, + NS_ERROR_MALFORMED_URI = 2152398858, + NS_ERROR_IN_PROGRESS = 2152398863, + NS_ERROR_NO_CONTENT = 2152398865, + NS_ERROR_UNKNOWN_PROTOCOL = 2152398866, + NS_ERROR_INVALID_CONTENT_ENCODING = 2152398875, + NS_ERROR_CORRUPTED_CONTENT = 2152398877, + NS_ERROR_INVALID_SIGNATURE = 2152398906, + NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY = 2152398882, + NS_ERROR_ALREADY_OPENED = 2152398921, + NS_ERROR_ALREADY_CONNECTED = 2152398859, + NS_ERROR_NOT_CONNECTED = 2152398860, + NS_ERROR_CONNECTION_REFUSED = 2152398861, + NS_ERROR_NET_TIMEOUT = 2152398862, + NS_ERROR_OFFLINE = 2152398864, + NS_ERROR_PORT_ACCESS_NOT_ALLOWED = 2152398867, + NS_ERROR_NET_RESET = 2152398868, + NS_ERROR_NET_INTERRUPT = 2152398919, + NS_ERROR_PROXY_CONNECTION_REFUSED = 2152398920, + NS_ERROR_NET_PARTIAL_TRANSFER = 2152398924, + NS_ERROR_NET_INADEQUATE_SECURITY = 2152398930, + NS_ERROR_NOT_RESUMABLE = 2152398873, + NS_ERROR_REDIRECT_LOOP = 2152398879, + NS_ERROR_ENTITY_CHANGED = 2152398880, + NS_ERROR_UNSAFE_CONTENT_TYPE = 2152398922, + NS_ERROR_REMOTE_XUL = 2152398923, + NS_ERROR_LOAD_SHOWED_ERRORPAGE = 2152398925, + NS_ERROR_FTP_LOGIN = 2152398869, + NS_ERROR_FTP_CWD = 2152398870, + NS_ERROR_FTP_PASV = 2152398871, + NS_ERROR_FTP_PWD = 2152398872, + NS_ERROR_FTP_LIST = 2152398876, + NS_ERROR_UNKNOWN_HOST = 2152398878, + NS_ERROR_DNS_LOOKUP_QUEUE_FULL = 2152398881, + NS_ERROR_UNKNOWN_PROXY_HOST = 2152398890, + NS_ERROR_UNKNOWN_SOCKET_TYPE = 2152398899, + NS_ERROR_SOCKET_CREATE_FAILED = 2152398900, + NS_ERROR_SOCKET_ADDRESS_NOT_SUPPORTED = 2152398901, + NS_ERROR_SOCKET_ADDRESS_IN_USE = 2152398902, + NS_ERROR_CACHE_KEY_NOT_FOUND = 2152398909, + NS_ERROR_CACHE_DATA_IS_STREAM = 2152398910, + NS_ERROR_CACHE_DATA_IS_NOT_STREAM = 2152398911, + NS_ERROR_CACHE_WAIT_FOR_VALIDATION = 2152398912, + NS_ERROR_CACHE_ENTRY_DOOMED = 2152398913, + NS_ERROR_CACHE_READ_ACCESS_DENIED = 2152398914, + NS_ERROR_CACHE_WRITE_ACCESS_DENIED = 2152398915, + NS_ERROR_CACHE_IN_USE = 2152398916, + NS_ERROR_DOCUMENT_NOT_CACHED = 2152398918, + NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS = 2152398928, + NS_ERROR_HOST_IS_IP_ADDRESS = 2152398929, NS_SUCCESS_ADOPTED_DATA = 4915290, NS_NET_STATUS_BEGIN_FTP_TRANSACTION = 4915227, NS_NET_STATUS_END_FTP_TRANSACTION = 4915228, NS_SUCCESS_AUTH_FINISHED = 4915240, - NS_NET_STATUS_READING = -2142568440, - NS_NET_STATUS_WRITING = -2142568439, - NS_NET_STATUS_CONNECTING_TO = -2142568441, - NS_NET_STATUS_SENDING_TO = -2142568443, - NS_NET_STATUS_RECEIVING_FROM = -2142568442, - NS_ERROR_INTERCEPTION_FAILED = -2142568348, - NS_ERROR_PLUGINS_PLUGINSNOTCHANGED = -2142501912, - NS_ERROR_PLUGIN_DISABLED = -2142501911, - NS_ERROR_PLUGIN_BLOCKLISTED = -2142501910, - NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED = -2142501909, - NS_ERROR_PLUGIN_CLICKTOPLAY = -2142501908, + NS_NET_STATUS_READING = 2152398856, + NS_NET_STATUS_WRITING = 2152398857, + NS_NET_STATUS_CONNECTING_TO = 2152398855, + NS_NET_STATUS_SENDING_TO = 2152398853, + NS_NET_STATUS_RECEIVING_FROM = 2152398854, + NS_ERROR_INTERCEPTION_FAILED = 2152398948, + NS_ERROR_PLUGINS_PLUGINSNOTCHANGED = 2152465384, + NS_ERROR_PLUGIN_DISABLED = 2152465385, + NS_ERROR_PLUGIN_BLOCKLISTED = 2152465386, + NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED = 2152465387, + NS_ERROR_PLUGIN_CLICKTOPLAY = 2152465388, NS_PLUGIN_INIT_PENDING = 4981741, NS_TABLELAYOUT_CELL_NOT_FOUND = 5046272, NS_POSITION_BEFORE_TABLE = 5046275, NS_STATE_PROPERTY_NOT_THERE = 5046277, - NS_ERROR_HTMLPARSER_EOF = -2142370840, - NS_ERROR_HTMLPARSER_UNKNOWN = -2142370839, - NS_ERROR_HTMLPARSER_CANTPROPAGATE = -2142370838, - NS_ERROR_HTMLPARSER_CONTEXTMISMATCH = -2142370837, - NS_ERROR_HTMLPARSER_BADFILENAME = -2142370836, - NS_ERROR_HTMLPARSER_BADURL = -2142370835, - NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT = -2142370834, - NS_ERROR_HTMLPARSER_INTERRUPTED = -2142370833, - NS_ERROR_HTMLPARSER_BLOCK = -2142370832, - NS_ERROR_HTMLPARSER_BADTOKENIZER = -2142370831, - NS_ERROR_HTMLPARSER_BADATTRIBUTE = -2142370830, - NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = -2142370829, - NS_ERROR_HTMLPARSER_MISPLACEDTABLECONTENT = -2142370828, - NS_ERROR_HTMLPARSER_BADDTD = -2142370827, - NS_ERROR_HTMLPARSER_BADCONTEXT = -2142370826, - NS_ERROR_HTMLPARSER_STOPPARSING = -2142370825, - NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL = -2142370824, - NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP = -2142370823, - NS_ERROR_HTMLPARSER_FAKE_ENDTAG = -2142370822, - NS_ERROR_HTMLPARSER_INVALID_COMMENT = -2142370821, + NS_ERROR_HTMLPARSER_EOF = 2152596456, + NS_ERROR_HTMLPARSER_UNKNOWN = 2152596457, + NS_ERROR_HTMLPARSER_CANTPROPAGATE = 2152596458, + NS_ERROR_HTMLPARSER_CONTEXTMISMATCH = 2152596459, + NS_ERROR_HTMLPARSER_BADFILENAME = 2152596460, + NS_ERROR_HTMLPARSER_BADURL = 2152596461, + NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT = 2152596462, + NS_ERROR_HTMLPARSER_INTERRUPTED = 2152596463, + NS_ERROR_HTMLPARSER_BLOCK = 2152596464, + NS_ERROR_HTMLPARSER_BADTOKENIZER = 2152596465, + NS_ERROR_HTMLPARSER_BADATTRIBUTE = 2152596466, + NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = 2152596467, + NS_ERROR_HTMLPARSER_MISPLACEDTABLECONTENT = 2152596468, + NS_ERROR_HTMLPARSER_BADDTD = 2152596469, + NS_ERROR_HTMLPARSER_BADCONTEXT = 2152596470, + NS_ERROR_HTMLPARSER_STOPPARSING = 2152596471, + NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL = 2152596472, + NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP = 2152596473, + NS_ERROR_HTMLPARSER_FAKE_ENDTAG = 2152596474, + NS_ERROR_HTMLPARSER_INVALID_COMMENT = 2152596475, NS_HTMLTOKENS_NOT_AN_ENTITY = 5113808, NS_HTMLPARSER_VALID_META_CHARSET = 5114808, NS_RDF_CURSOR_EMPTY = 5177345, NS_RDF_NO_VALUE = 5177346, NS_RDF_ASSERTION_REJECTED = 5177347, NS_RDF_STOP_VISIT = 5177348, - NS_ERROR_UCONV_NOCONV = -2142240767, - NS_ERROR_UDEC_ILLEGALINPUT = -2142240754, + NS_ERROR_UCONV_NOCONV = 2152726529, + NS_ERROR_UDEC_ILLEGALINPUT = 2152726542, NS_SUCCESS_USING_FALLBACK_LOCALE = 5242882, NS_OK_UDEC_EXACTLENGTH = 5242891, NS_OK_UDEC_MOREINPUT = 5242892, @@ -1113,185 +1007,185 @@ pub enum nsresult { NS_OK_UENC_MOREOUTPUT = 5242914, NS_ERROR_UENC_NOMAPPING = 5242915, NS_OK_UENC_MOREINPUT = 5242916, - NS_ERROR_FILE_UNRECOGNIZED_PATH = -2142109695, - NS_ERROR_FILE_UNRESOLVABLE_SYMLINK = -2142109694, - NS_ERROR_FILE_EXECUTION_FAILED = -2142109693, - NS_ERROR_FILE_UNKNOWN_TYPE = -2142109692, - NS_ERROR_FILE_DESTINATION_NOT_DIR = -2142109691, - NS_ERROR_FILE_TARGET_DOES_NOT_EXIST = -2142109690, - NS_ERROR_FILE_COPY_OR_MOVE_FAILED = -2142109689, - NS_ERROR_FILE_ALREADY_EXISTS = -2142109688, - NS_ERROR_FILE_INVALID_PATH = -2142109687, - NS_ERROR_FILE_DISK_FULL = -2142109686, - NS_ERROR_FILE_CORRUPTED = -2142109685, - NS_ERROR_FILE_NOT_DIRECTORY = -2142109684, - NS_ERROR_FILE_IS_DIRECTORY = -2142109683, - NS_ERROR_FILE_IS_LOCKED = -2142109682, - NS_ERROR_FILE_TOO_BIG = -2142109681, - NS_ERROR_FILE_NO_DEVICE_SPACE = -2142109680, - NS_ERROR_FILE_NAME_TOO_LONG = -2142109679, - NS_ERROR_FILE_NOT_FOUND = -2142109678, - NS_ERROR_FILE_READ_ONLY = -2142109677, - NS_ERROR_FILE_DIR_NOT_EMPTY = -2142109676, - NS_ERROR_FILE_ACCESS_DENIED = -2142109675, + NS_ERROR_FILE_UNRECOGNIZED_PATH = 2152857601, + NS_ERROR_FILE_UNRESOLVABLE_SYMLINK = 2152857602, + NS_ERROR_FILE_EXECUTION_FAILED = 2152857603, + NS_ERROR_FILE_UNKNOWN_TYPE = 2152857604, + NS_ERROR_FILE_DESTINATION_NOT_DIR = 2152857605, + NS_ERROR_FILE_TARGET_DOES_NOT_EXIST = 2152857606, + NS_ERROR_FILE_COPY_OR_MOVE_FAILED = 2152857607, + NS_ERROR_FILE_ALREADY_EXISTS = 2152857608, + NS_ERROR_FILE_INVALID_PATH = 2152857609, + NS_ERROR_FILE_DISK_FULL = 2152857610, + NS_ERROR_FILE_CORRUPTED = 2152857611, + NS_ERROR_FILE_NOT_DIRECTORY = 2152857612, + NS_ERROR_FILE_IS_DIRECTORY = 2152857613, + NS_ERROR_FILE_IS_LOCKED = 2152857614, + NS_ERROR_FILE_TOO_BIG = 2152857615, + NS_ERROR_FILE_NO_DEVICE_SPACE = 2152857616, + NS_ERROR_FILE_NAME_TOO_LONG = 2152857617, + NS_ERROR_FILE_NOT_FOUND = 2152857618, + NS_ERROR_FILE_READ_ONLY = 2152857619, + NS_ERROR_FILE_DIR_NOT_EMPTY = 2152857620, + NS_ERROR_FILE_ACCESS_DENIED = 2152857621, NS_SUCCESS_FILE_DIRECTORY_EMPTY = 5373953, NS_SUCCESS_AGGREGATE_RESULT = 5373954, - NS_ERROR_DOM_INDEX_SIZE_ERR = -2142044159, - NS_ERROR_DOM_HIERARCHY_REQUEST_ERR = -2142044157, - NS_ERROR_DOM_WRONG_DOCUMENT_ERR = -2142044156, - NS_ERROR_DOM_INVALID_CHARACTER_ERR = -2142044155, - NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR = -2142044153, - NS_ERROR_DOM_NOT_FOUND_ERR = -2142044152, - NS_ERROR_DOM_NOT_SUPPORTED_ERR = -2142044151, - NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR = -2142044150, - NS_ERROR_DOM_INVALID_STATE_ERR = -2142044149, - NS_ERROR_DOM_SYNTAX_ERR = -2142044148, - NS_ERROR_DOM_INVALID_MODIFICATION_ERR = -2142044147, - NS_ERROR_DOM_NAMESPACE_ERR = -2142044146, - NS_ERROR_DOM_INVALID_ACCESS_ERR = -2142044145, - NS_ERROR_DOM_TYPE_MISMATCH_ERR = -2142044143, - NS_ERROR_DOM_SECURITY_ERR = -2142044142, - NS_ERROR_DOM_NETWORK_ERR = -2142044141, - NS_ERROR_DOM_ABORT_ERR = -2142044140, - NS_ERROR_DOM_URL_MISMATCH_ERR = -2142044139, - NS_ERROR_DOM_QUOTA_EXCEEDED_ERR = -2142044138, - NS_ERROR_DOM_TIMEOUT_ERR = -2142044137, - NS_ERROR_DOM_INVALID_NODE_TYPE_ERR = -2142044136, - NS_ERROR_DOM_DATA_CLONE_ERR = -2142044135, - NS_ERROR_TYPE_ERR = -2142044134, - NS_ERROR_RANGE_ERR = -2142044133, - NS_ERROR_DOM_ENCODING_NOT_SUPPORTED_ERR = -2142044132, - NS_ERROR_DOM_INVALID_POINTER_ERR = -2142044131, - NS_ERROR_DOM_UNKNOWN_ERR = -2142044130, - NS_ERROR_DOM_DATA_ERR = -2142044129, - NS_ERROR_DOM_OPERATION_ERR = -2142044128, - NS_ERROR_DOM_NOT_ALLOWED_ERR = -2142044127, - NS_ERROR_DOM_SECMAN_ERR = -2142043159, - NS_ERROR_DOM_WRONG_TYPE_ERR = -2142043158, - NS_ERROR_DOM_NOT_OBJECT_ERR = -2142043157, - NS_ERROR_DOM_NOT_XPC_OBJECT_ERR = -2142043156, - NS_ERROR_DOM_NOT_NUMBER_ERR = -2142043155, - NS_ERROR_DOM_NOT_BOOLEAN_ERR = -2142043154, - NS_ERROR_DOM_NOT_FUNCTION_ERR = -2142043153, - NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR = -2142043152, - NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN = -2142043151, - NS_ERROR_DOM_PROP_ACCESS_DENIED = -2142043150, - NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED = -2142043149, - NS_ERROR_DOM_BAD_URI = -2142043148, - NS_ERROR_DOM_RETVAL_UNDEFINED = -2142043147, - NS_ERROR_DOM_QUOTA_REACHED = -2142043146, - NS_ERROR_DOM_JS_EXCEPTION = -2142043145, - NS_ERROR_UNCATCHABLE_EXCEPTION = -2142043144, - NS_ERROR_DOM_DOMEXCEPTION = -2142043143, - NS_ERROR_DOM_EXCEPTION_ON_JSCONTEXT = -2142043142, + NS_ERROR_DOM_INDEX_SIZE_ERR = 2152923137, + NS_ERROR_DOM_HIERARCHY_REQUEST_ERR = 2152923139, + NS_ERROR_DOM_WRONG_DOCUMENT_ERR = 2152923140, + NS_ERROR_DOM_INVALID_CHARACTER_ERR = 2152923141, + NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR = 2152923143, + NS_ERROR_DOM_NOT_FOUND_ERR = 2152923144, + NS_ERROR_DOM_NOT_SUPPORTED_ERR = 2152923145, + NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR = 2152923146, + NS_ERROR_DOM_INVALID_STATE_ERR = 2152923147, + NS_ERROR_DOM_SYNTAX_ERR = 2152923148, + NS_ERROR_DOM_INVALID_MODIFICATION_ERR = 2152923149, + NS_ERROR_DOM_NAMESPACE_ERR = 2152923150, + NS_ERROR_DOM_INVALID_ACCESS_ERR = 2152923151, + NS_ERROR_DOM_TYPE_MISMATCH_ERR = 2152923153, + NS_ERROR_DOM_SECURITY_ERR = 2152923154, + NS_ERROR_DOM_NETWORK_ERR = 2152923155, + NS_ERROR_DOM_ABORT_ERR = 2152923156, + NS_ERROR_DOM_URL_MISMATCH_ERR = 2152923157, + NS_ERROR_DOM_QUOTA_EXCEEDED_ERR = 2152923158, + NS_ERROR_DOM_TIMEOUT_ERR = 2152923159, + NS_ERROR_DOM_INVALID_NODE_TYPE_ERR = 2152923160, + NS_ERROR_DOM_DATA_CLONE_ERR = 2152923161, + NS_ERROR_TYPE_ERR = 2152923162, + NS_ERROR_RANGE_ERR = 2152923163, + NS_ERROR_DOM_ENCODING_NOT_SUPPORTED_ERR = 2152923164, + NS_ERROR_DOM_INVALID_POINTER_ERR = 2152923165, + NS_ERROR_DOM_UNKNOWN_ERR = 2152923166, + NS_ERROR_DOM_DATA_ERR = 2152923167, + NS_ERROR_DOM_OPERATION_ERR = 2152923168, + NS_ERROR_DOM_NOT_ALLOWED_ERR = 2152923169, + NS_ERROR_DOM_SECMAN_ERR = 2152924137, + NS_ERROR_DOM_WRONG_TYPE_ERR = 2152924138, + NS_ERROR_DOM_NOT_OBJECT_ERR = 2152924139, + NS_ERROR_DOM_NOT_XPC_OBJECT_ERR = 2152924140, + NS_ERROR_DOM_NOT_NUMBER_ERR = 2152924141, + NS_ERROR_DOM_NOT_BOOLEAN_ERR = 2152924142, + NS_ERROR_DOM_NOT_FUNCTION_ERR = 2152924143, + NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR = 2152924144, + NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN = 2152924145, + NS_ERROR_DOM_PROP_ACCESS_DENIED = 2152924146, + NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED = 2152924147, + NS_ERROR_DOM_BAD_URI = 2152924148, + NS_ERROR_DOM_RETVAL_UNDEFINED = 2152924149, + NS_ERROR_DOM_QUOTA_REACHED = 2152924150, + NS_ERROR_DOM_JS_EXCEPTION = 2152924151, + NS_ERROR_UNCATCHABLE_EXCEPTION = 2152924152, + NS_ERROR_DOM_DOMEXCEPTION = 2152924153, + NS_ERROR_DOM_EXCEPTION_ON_JSCONTEXT = 2152924154, NS_SUCCESS_DOM_NO_OPERATION = 5439489, NS_SUCCESS_DOM_SCRIPT_EVALUATION_THREW = 5439490, NS_SUCCESS_DOM_SCRIPT_EVALUATION_THREW_UNCATCHABLE = 5439491, NS_IMAGELIB_SUCCESS_LOAD_FINISHED = 5505024, NS_IMAGELIB_CHANGING_OWNER = 5505025, - NS_IMAGELIB_ERROR_FAILURE = -2141978619, - NS_IMAGELIB_ERROR_NO_DECODER = -2141978618, - NS_IMAGELIB_ERROR_NOT_FINISHED = -2141978617, - NS_IMAGELIB_ERROR_NO_ENCODER = -2141978615, - NS_ERROR_EDITOR_NO_SELECTION = -2141847551, - NS_ERROR_EDITOR_NO_TEXTNODE = -2141847550, - NS_FOUND_TARGET = -2141847549, + NS_IMAGELIB_ERROR_FAILURE = 2152988677, + NS_IMAGELIB_ERROR_NO_DECODER = 2152988678, + NS_IMAGELIB_ERROR_NOT_FINISHED = 2152988679, + NS_IMAGELIB_ERROR_NO_ENCODER = 2152988681, + NS_ERROR_EDITOR_NO_SELECTION = 2153119745, + NS_ERROR_EDITOR_NO_TEXTNODE = 2153119746, + NS_FOUND_TARGET = 2153119747, NS_EDITOR_ELEMENT_NOT_FOUND = 5636097, - NS_ERROR_XPC_NOT_ENOUGH_ARGS = -2141782015, - NS_ERROR_XPC_NEED_OUT_OBJECT = -2141782014, - NS_ERROR_XPC_CANT_SET_OUT_VAL = -2141782013, - NS_ERROR_XPC_NATIVE_RETURNED_FAILURE = -2141782012, - NS_ERROR_XPC_CANT_GET_INTERFACE_INFO = -2141782011, - NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO = -2141782010, - NS_ERROR_XPC_CANT_GET_METHOD_INFO = -2141782009, - NS_ERROR_XPC_UNEXPECTED = -2141782008, - NS_ERROR_XPC_BAD_CONVERT_JS = -2141782007, - NS_ERROR_XPC_BAD_CONVERT_NATIVE = -2141782006, - NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF = -2141782005, - NS_ERROR_XPC_BAD_OP_ON_WN_PROTO = -2141782004, - NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN = -2141782003, - NS_ERROR_XPC_CANT_DEFINE_PROP_ON_WN = -2141782002, - NS_ERROR_XPC_CANT_WATCH_WN_STATIC = -2141782001, - NS_ERROR_XPC_CANT_EXPORT_WN_STATIC = -2141782000, - NS_ERROR_XPC_SCRIPTABLE_CALL_FAILED = -2141781999, - NS_ERROR_XPC_SCRIPTABLE_CTOR_FAILED = -2141781998, - NS_ERROR_XPC_CANT_CALL_WO_SCRIPTABLE = -2141781997, - NS_ERROR_XPC_CANT_CTOR_WO_SCRIPTABLE = -2141781996, - NS_ERROR_XPC_CI_RETURNED_FAILURE = -2141781995, - NS_ERROR_XPC_GS_RETURNED_FAILURE = -2141781994, - NS_ERROR_XPC_BAD_CID = -2141781993, - NS_ERROR_XPC_BAD_IID = -2141781992, - NS_ERROR_XPC_CANT_CREATE_WN = -2141781991, - NS_ERROR_XPC_JS_THREW_EXCEPTION = -2141781990, - NS_ERROR_XPC_JS_THREW_NATIVE_OBJECT = -2141781989, - NS_ERROR_XPC_JS_THREW_JS_OBJECT = -2141781988, - NS_ERROR_XPC_JS_THREW_NULL = -2141781987, - NS_ERROR_XPC_JS_THREW_STRING = -2141781986, - NS_ERROR_XPC_JS_THREW_NUMBER = -2141781985, - NS_ERROR_XPC_JAVASCRIPT_ERROR = -2141781984, - NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS = -2141781983, - NS_ERROR_XPC_CANT_CONVERT_PRIMITIVE_TO_ARRAY = -2141781982, - NS_ERROR_XPC_CANT_CONVERT_OBJECT_TO_ARRAY = -2141781981, - NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY = -2141781980, - NS_ERROR_XPC_CANT_GET_ARRAY_INFO = -2141781979, - NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING = -2141781978, - NS_ERROR_XPC_SECURITY_MANAGER_VETO = -2141781977, - NS_ERROR_XPC_INTERFACE_NOT_SCRIPTABLE = -2141781976, - NS_ERROR_XPC_INTERFACE_NOT_FROM_NSISUPPORTS = -2141781975, - NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT = -2141781974, - NS_ERROR_XPC_CANT_SET_READ_ONLY_CONSTANT = -2141781973, - NS_ERROR_XPC_CANT_SET_READ_ONLY_ATTRIBUTE = -2141781972, - NS_ERROR_XPC_CANT_SET_READ_ONLY_METHOD = -2141781971, - NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE = -2141781970, - NS_ERROR_XPC_CALL_TO_SCRIPTABLE_FAILED = -2141781969, - NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED = -2141781968, - NS_ERROR_XPC_BAD_ID_STRING = -2141781967, - NS_ERROR_XPC_BAD_INITIALIZER_NAME = -2141781966, - NS_ERROR_XPC_HAS_BEEN_SHUTDOWN = -2141781965, - NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN = -2141781964, - NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL = -2141781963, - NS_ERROR_XPC_CANT_PASS_CPOW_TO_NATIVE = -2141781962, - NS_ERROR_LAUNCHED_CHILD_PROCESS = -2141716280, - NS_ERROR_CSP_FORM_ACTION_VIOLATION = -2141585310, - NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION = -2141585309, - NS_ERROR_SRI_CORRUPT = -2141585208, - NS_ERROR_SRI_DISABLED = -2141585207, - NS_ERROR_SRI_NOT_ELIGIBLE = -2141585206, - NS_ERROR_CMS_VERIFY_NOT_SIGNED = -2141584384, - NS_ERROR_CMS_VERIFY_NO_CONTENT_INFO = -2141584383, - NS_ERROR_CMS_VERIFY_BAD_DIGEST = -2141584382, - NS_ERROR_CMS_VERIFY_NOCERT = -2141584380, - NS_ERROR_CMS_VERIFY_UNTRUSTED = -2141584379, - NS_ERROR_CMS_VERIFY_ERROR_UNVERIFIED = -2141584377, - NS_ERROR_CMS_VERIFY_ERROR_PROCESSING = -2141584376, - NS_ERROR_CMS_VERIFY_BAD_SIGNATURE = -2141584375, - NS_ERROR_CMS_VERIFY_DIGEST_MISMATCH = -2141584374, - NS_ERROR_CMS_VERIFY_UNKNOWN_ALGO = -2141584373, - NS_ERROR_CMS_VERIFY_UNSUPPORTED_ALGO = -2141584372, - NS_ERROR_CMS_VERIFY_MALFORMED_SIGNATURE = -2141584371, - NS_ERROR_CMS_VERIFY_HEADER_MISMATCH = -2141584370, - NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED = -2141584369, - NS_ERROR_CMS_VERIFY_CERT_WITHOUT_ADDRESS = -2141584368, - NS_ERROR_CMS_ENCRYPT_NO_BULK_ALG = -2141584352, - NS_ERROR_CMS_ENCRYPT_INCOMPLETE = -2141584351, - NS_ERROR_DOM_INVALID_EXPRESSION_ERR = -2141519821, - NS_ERROR_DOM_TYPE_ERR = -2141519820, - NS_ERROR_WONT_HANDLE_CONTENT = -2141388799, - NS_ERROR_MALWARE_URI = -2141388770, - NS_ERROR_PHISHING_URI = -2141388769, - NS_ERROR_TRACKING_URI = -2141388766, - NS_ERROR_UNWANTED_URI = -2141388765, - NS_ERROR_BLOCKED_URI = -2141388763, - NS_ERROR_SAVE_LINK_AS_TIMEOUT = -2141388768, - NS_ERROR_PARSED_DATA_CACHED = -2141388767, + NS_ERROR_XPC_NOT_ENOUGH_ARGS = 2153185281, + NS_ERROR_XPC_NEED_OUT_OBJECT = 2153185282, + NS_ERROR_XPC_CANT_SET_OUT_VAL = 2153185283, + NS_ERROR_XPC_NATIVE_RETURNED_FAILURE = 2153185284, + NS_ERROR_XPC_CANT_GET_INTERFACE_INFO = 2153185285, + NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO = 2153185286, + NS_ERROR_XPC_CANT_GET_METHOD_INFO = 2153185287, + NS_ERROR_XPC_UNEXPECTED = 2153185288, + NS_ERROR_XPC_BAD_CONVERT_JS = 2153185289, + NS_ERROR_XPC_BAD_CONVERT_NATIVE = 2153185290, + NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF = 2153185291, + NS_ERROR_XPC_BAD_OP_ON_WN_PROTO = 2153185292, + NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN = 2153185293, + NS_ERROR_XPC_CANT_DEFINE_PROP_ON_WN = 2153185294, + NS_ERROR_XPC_CANT_WATCH_WN_STATIC = 2153185295, + NS_ERROR_XPC_CANT_EXPORT_WN_STATIC = 2153185296, + NS_ERROR_XPC_SCRIPTABLE_CALL_FAILED = 2153185297, + NS_ERROR_XPC_SCRIPTABLE_CTOR_FAILED = 2153185298, + NS_ERROR_XPC_CANT_CALL_WO_SCRIPTABLE = 2153185299, + NS_ERROR_XPC_CANT_CTOR_WO_SCRIPTABLE = 2153185300, + NS_ERROR_XPC_CI_RETURNED_FAILURE = 2153185301, + NS_ERROR_XPC_GS_RETURNED_FAILURE = 2153185302, + NS_ERROR_XPC_BAD_CID = 2153185303, + NS_ERROR_XPC_BAD_IID = 2153185304, + NS_ERROR_XPC_CANT_CREATE_WN = 2153185305, + NS_ERROR_XPC_JS_THREW_EXCEPTION = 2153185306, + NS_ERROR_XPC_JS_THREW_NATIVE_OBJECT = 2153185307, + NS_ERROR_XPC_JS_THREW_JS_OBJECT = 2153185308, + NS_ERROR_XPC_JS_THREW_NULL = 2153185309, + NS_ERROR_XPC_JS_THREW_STRING = 2153185310, + NS_ERROR_XPC_JS_THREW_NUMBER = 2153185311, + NS_ERROR_XPC_JAVASCRIPT_ERROR = 2153185312, + NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS = 2153185313, + NS_ERROR_XPC_CANT_CONVERT_PRIMITIVE_TO_ARRAY = 2153185314, + NS_ERROR_XPC_CANT_CONVERT_OBJECT_TO_ARRAY = 2153185315, + NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY = 2153185316, + NS_ERROR_XPC_CANT_GET_ARRAY_INFO = 2153185317, + NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING = 2153185318, + NS_ERROR_XPC_SECURITY_MANAGER_VETO = 2153185319, + NS_ERROR_XPC_INTERFACE_NOT_SCRIPTABLE = 2153185320, + NS_ERROR_XPC_INTERFACE_NOT_FROM_NSISUPPORTS = 2153185321, + NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT = 2153185322, + NS_ERROR_XPC_CANT_SET_READ_ONLY_CONSTANT = 2153185323, + NS_ERROR_XPC_CANT_SET_READ_ONLY_ATTRIBUTE = 2153185324, + NS_ERROR_XPC_CANT_SET_READ_ONLY_METHOD = 2153185325, + NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE = 2153185326, + NS_ERROR_XPC_CALL_TO_SCRIPTABLE_FAILED = 2153185327, + NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED = 2153185328, + NS_ERROR_XPC_BAD_ID_STRING = 2153185329, + NS_ERROR_XPC_BAD_INITIALIZER_NAME = 2153185330, + NS_ERROR_XPC_HAS_BEEN_SHUTDOWN = 2153185331, + NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN = 2153185332, + NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL = 2153185333, + NS_ERROR_XPC_CANT_PASS_CPOW_TO_NATIVE = 2153185334, + NS_ERROR_LAUNCHED_CHILD_PROCESS = 2153251016, + NS_ERROR_CSP_FORM_ACTION_VIOLATION = 2153381986, + NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION = 2153381987, + NS_ERROR_SRI_CORRUPT = 2153382088, + NS_ERROR_SRI_DISABLED = 2153382089, + NS_ERROR_SRI_NOT_ELIGIBLE = 2153382090, + NS_ERROR_CMS_VERIFY_NOT_SIGNED = 2153382912, + NS_ERROR_CMS_VERIFY_NO_CONTENT_INFO = 2153382913, + NS_ERROR_CMS_VERIFY_BAD_DIGEST = 2153382914, + NS_ERROR_CMS_VERIFY_NOCERT = 2153382916, + NS_ERROR_CMS_VERIFY_UNTRUSTED = 2153382917, + NS_ERROR_CMS_VERIFY_ERROR_UNVERIFIED = 2153382919, + NS_ERROR_CMS_VERIFY_ERROR_PROCESSING = 2153382920, + NS_ERROR_CMS_VERIFY_BAD_SIGNATURE = 2153382921, + NS_ERROR_CMS_VERIFY_DIGEST_MISMATCH = 2153382922, + NS_ERROR_CMS_VERIFY_UNKNOWN_ALGO = 2153382923, + NS_ERROR_CMS_VERIFY_UNSUPPORTED_ALGO = 2153382924, + NS_ERROR_CMS_VERIFY_MALFORMED_SIGNATURE = 2153382925, + NS_ERROR_CMS_VERIFY_HEADER_MISMATCH = 2153382926, + NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED = 2153382927, + NS_ERROR_CMS_VERIFY_CERT_WITHOUT_ADDRESS = 2153382928, + NS_ERROR_CMS_ENCRYPT_NO_BULK_ALG = 2153382944, + NS_ERROR_CMS_ENCRYPT_INCOMPLETE = 2153382945, + NS_ERROR_DOM_INVALID_EXPRESSION_ERR = 2153447475, + NS_ERROR_DOM_TYPE_ERR = 2153447476, + NS_ERROR_WONT_HANDLE_CONTENT = 2153578497, + NS_ERROR_MALWARE_URI = 2153578526, + NS_ERROR_PHISHING_URI = 2153578527, + NS_ERROR_TRACKING_URI = 2153578530, + NS_ERROR_UNWANTED_URI = 2153578531, + NS_ERROR_BLOCKED_URI = 2153578533, + NS_ERROR_SAVE_LINK_AS_TIMEOUT = 2153578528, + NS_ERROR_PARSED_DATA_CACHED = 2153578529, NS_REFRESHURI_HEADER_FOUND = 6094850, - NS_ERROR_IMAGE_SRC_CHANGED = -2141323260, - NS_ERROR_IMAGE_BLOCKED = -2141323259, - NS_ERROR_CONTENT_BLOCKED = -2141323258, - NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = -2141323257, - NS_PROPTABLE_PROP_NOT_THERE = -2141323254, - NS_ERROR_XBL_BLOCKED = -2141323249, - NS_ERROR_CONTENT_CRASHED = -2141323248, + NS_ERROR_IMAGE_SRC_CHANGED = 2153644036, + NS_ERROR_IMAGE_BLOCKED = 2153644037, + NS_ERROR_CONTENT_BLOCKED = 2153644038, + NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = 2153644039, + NS_PROPTABLE_PROP_NOT_THERE = 2153644042, + NS_ERROR_XBL_BLOCKED = 2153644047, + NS_ERROR_CONTENT_CRASHED = 2153644048, NS_HTML_STYLE_PROPERTY_NOT_THERE = 6160386, NS_CONTENT_BLOCKED = 6160392, NS_CONTENT_BLOCKED_SHOW_ALT = 6160393, @@ -1299,141 +1193,162 @@ pub enum nsresult { NS_FINDBROADCASTER_NOT_FOUND = 6160396, NS_FINDBROADCASTER_FOUND = 6160397, NS_FINDBROADCASTER_AWAIT_OVERLAYS = 6160398, - NS_ERROR_XSLT_PARSE_FAILURE = -2141192191, - NS_ERROR_XPATH_PARSE_FAILURE = -2141192190, - NS_ERROR_XSLT_ALREADY_SET = -2141192189, - NS_ERROR_XSLT_EXECUTION_FAILURE = -2141192188, - NS_ERROR_XPATH_UNKNOWN_FUNCTION = -2141192187, - NS_ERROR_XSLT_BAD_RECURSION = -2141192186, - NS_ERROR_XSLT_BAD_VALUE = -2141192185, - NS_ERROR_XSLT_NODESET_EXPECTED = -2141192184, - NS_ERROR_XSLT_ABORTED = -2141192183, - NS_ERROR_XSLT_NETWORK_ERROR = -2141192182, - NS_ERROR_XSLT_WRONG_MIME_TYPE = -2141192181, - NS_ERROR_XSLT_LOAD_RECURSION = -2141192180, - NS_ERROR_XPATH_BAD_ARGUMENT_COUNT = -2141192179, - NS_ERROR_XPATH_BAD_EXTENSION_FUNCTION = -2141192178, - NS_ERROR_XPATH_PAREN_EXPECTED = -2141192177, - NS_ERROR_XPATH_INVALID_AXIS = -2141192176, - NS_ERROR_XPATH_NO_NODE_TYPE_TEST = -2141192175, - NS_ERROR_XPATH_BRACKET_EXPECTED = -2141192174, - NS_ERROR_XPATH_INVALID_VAR_NAME = -2141192173, - NS_ERROR_XPATH_UNEXPECTED_END = -2141192172, - NS_ERROR_XPATH_OPERATOR_EXPECTED = -2141192171, - NS_ERROR_XPATH_UNCLOSED_LITERAL = -2141192170, - NS_ERROR_XPATH_BAD_COLON = -2141192169, - NS_ERROR_XPATH_BAD_BANG = -2141192168, - NS_ERROR_XPATH_ILLEGAL_CHAR = -2141192167, - NS_ERROR_XPATH_BINARY_EXPECTED = -2141192166, - NS_ERROR_XSLT_LOAD_BLOCKED_ERROR = -2141192165, - NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED = -2141192164, - NS_ERROR_XPATH_UNBALANCED_CURLY_BRACE = -2141192163, - NS_ERROR_XSLT_BAD_NODE_NAME = -2141192162, - NS_ERROR_XSLT_VAR_ALREADY_SET = -2141192161, - NS_ERROR_XSLT_CALL_TO_KEY_NOT_ALLOWED = -2141192160, + NS_ERROR_XSLT_PARSE_FAILURE = 2153775105, + NS_ERROR_XPATH_PARSE_FAILURE = 2153775106, + NS_ERROR_XSLT_ALREADY_SET = 2153775107, + NS_ERROR_XSLT_EXECUTION_FAILURE = 2153775108, + NS_ERROR_XPATH_UNKNOWN_FUNCTION = 2153775109, + NS_ERROR_XSLT_BAD_RECURSION = 2153775110, + NS_ERROR_XSLT_BAD_VALUE = 2153775111, + NS_ERROR_XSLT_NODESET_EXPECTED = 2153775112, + NS_ERROR_XSLT_ABORTED = 2153775113, + NS_ERROR_XSLT_NETWORK_ERROR = 2153775114, + NS_ERROR_XSLT_WRONG_MIME_TYPE = 2153775115, + NS_ERROR_XSLT_LOAD_RECURSION = 2153775116, + NS_ERROR_XPATH_BAD_ARGUMENT_COUNT = 2153775117, + NS_ERROR_XPATH_BAD_EXTENSION_FUNCTION = 2153775118, + NS_ERROR_XPATH_PAREN_EXPECTED = 2153775119, + NS_ERROR_XPATH_INVALID_AXIS = 2153775120, + NS_ERROR_XPATH_NO_NODE_TYPE_TEST = 2153775121, + NS_ERROR_XPATH_BRACKET_EXPECTED = 2153775122, + NS_ERROR_XPATH_INVALID_VAR_NAME = 2153775123, + NS_ERROR_XPATH_UNEXPECTED_END = 2153775124, + NS_ERROR_XPATH_OPERATOR_EXPECTED = 2153775125, + NS_ERROR_XPATH_UNCLOSED_LITERAL = 2153775126, + NS_ERROR_XPATH_BAD_COLON = 2153775127, + NS_ERROR_XPATH_BAD_BANG = 2153775128, + NS_ERROR_XPATH_ILLEGAL_CHAR = 2153775129, + NS_ERROR_XPATH_BINARY_EXPECTED = 2153775130, + NS_ERROR_XSLT_LOAD_BLOCKED_ERROR = 2153775131, + NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED = 2153775132, + NS_ERROR_XPATH_UNBALANCED_CURLY_BRACE = 2153775133, + NS_ERROR_XSLT_BAD_NODE_NAME = 2153775134, + NS_ERROR_XSLT_VAR_ALREADY_SET = 2153775135, + NS_ERROR_XSLT_CALL_TO_KEY_NOT_ALLOWED = 2153775136, NS_XSLT_GET_NEW_HANDLER = 6291457, - NS_ERROR_TRANSPORT_INIT = -2141126655, - NS_ERROR_DUPLICATE_HANDLE = -2141126654, - NS_ERROR_BRIDGE_OPEN_PARENT = -2141126653, - NS_ERROR_BRIDGE_OPEN_CHILD = -2141126652, - NS_ERROR_DOM_SVG_WRONG_TYPE_ERR = -2141061120, - NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE = -2141061118, - NS_ERROR_STORAGE_BUSY = -2140995583, - NS_ERROR_STORAGE_IOERR = -2140995582, - NS_ERROR_STORAGE_CONSTRAINT = -2140995581, - NS_ERROR_DOM_FILE_NOT_FOUND_ERR = -2140864512, - NS_ERROR_DOM_FILE_NOT_READABLE_ERR = -2140864511, - NS_ERROR_DOM_FILE_ABORT_ERR = -2140864510, - NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR = -2140798975, - NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR = -2140798973, - NS_ERROR_DOM_INDEXEDDB_CONSTRAINT_ERR = -2140798972, - NS_ERROR_DOM_INDEXEDDB_DATA_ERR = -2140798971, - NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR = -2140798970, - NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR = -2140798969, - NS_ERROR_DOM_INDEXEDDB_ABORT_ERR = -2140798968, - NS_ERROR_DOM_INDEXEDDB_READ_ONLY_ERR = -2140798967, - NS_ERROR_DOM_INDEXEDDB_TIMEOUT_ERR = -2140798966, - NS_ERROR_DOM_INDEXEDDB_QUOTA_ERR = -2140798965, - NS_ERROR_DOM_INDEXEDDB_VERSION_ERR = -2140798964, - NS_ERROR_DOM_INDEXEDDB_RECOVERABLE_ERR = -2140797975, - NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR = -2140733439, - NS_ERROR_DOM_FILEHANDLE_NOT_ALLOWED_ERR = -2140733438, - NS_ERROR_DOM_FILEHANDLE_INACTIVE_ERR = -2140733437, - NS_ERROR_DOM_FILEHANDLE_ABORT_ERR = -2140733436, - NS_ERROR_DOM_FILEHANDLE_READ_ONLY_ERR = -2140733435, - NS_ERROR_DOM_FILEHANDLE_QUOTA_ERR = -2140733434, - NS_ERROR_SIGNED_JAR_NOT_SIGNED = -2140667903, - NS_ERROR_SIGNED_JAR_MODIFIED_ENTRY = -2140667902, - NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY = -2140667901, - NS_ERROR_SIGNED_JAR_ENTRY_MISSING = -2140667900, - NS_ERROR_SIGNED_JAR_WRONG_SIGNATURE = -2140667899, - NS_ERROR_SIGNED_JAR_ENTRY_TOO_LARGE = -2140667898, - NS_ERROR_SIGNED_JAR_ENTRY_INVALID = -2140667897, - NS_ERROR_SIGNED_JAR_MANIFEST_INVALID = -2140667896, - NS_ERROR_DOM_FILESYSTEM_INVALID_PATH_ERR = -2140602367, - NS_ERROR_DOM_FILESYSTEM_INVALID_MODIFICATION_ERR = -2140602366, - NS_ERROR_DOM_FILESYSTEM_NO_MODIFICATION_ALLOWED_ERR = -2140602365, - NS_ERROR_DOM_FILESYSTEM_PATH_EXISTS_ERR = -2140602364, - NS_ERROR_DOM_FILESYSTEM_TYPE_MISMATCH_ERR = -2140602363, - NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR = -2140602362, - NS_ERROR_DOM_BLUETOOTH_FAIL = -2140536831, - NS_ERROR_DOM_BLUETOOTH_NOT_READY = -2140536830, - NS_ERROR_DOM_BLUETOOTH_NOMEM = -2140536829, - NS_ERROR_DOM_BLUETOOTH_BUSY = -2140536828, - NS_ERROR_DOM_BLUETOOTH_DONE = -2140536827, - NS_ERROR_DOM_BLUETOOTH_UNSUPPORTED = -2140536826, - NS_ERROR_DOM_BLUETOOTH_PARM_INVALID = -2140536825, - NS_ERROR_DOM_BLUETOOTH_UNHANDLED = -2140536824, - NS_ERROR_DOM_BLUETOOTH_AUTH_FAILURE = -2140536823, - NS_ERROR_DOM_BLUETOOTH_RMT_DEV_DOWN = -2140536822, - NS_ERROR_DOM_BLUETOOTH_AUTH_REJECTED = -2140536821, - NS_ERROR_SIGNED_APP_MANIFEST_INVALID = -2140471295, - NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR = -2140405759, - NS_ERROR_DOM_PUSH_INVALID_REGISTRATION_ERR = -2140340223, - NS_ERROR_DOM_PUSH_DENIED_ERR = -2140340222, - NS_ERROR_DOM_PUSH_ABORT_ERR = -2140340221, - NS_ERROR_DOM_PUSH_SERVICE_UNREACHABLE = -2140340220, - NS_ERROR_DOM_PUSH_INVALID_KEY_ERR = -2140340219, - NS_ERROR_DOM_PUSH_MISMATCHED_KEY_ERR = -2140340218, - NS_ERROR_DOM_MEDIA_ABORT_ERR = -2140274687, - NS_ERROR_DOM_MEDIA_NOT_ALLOWED_ERR = -2140274686, - NS_ERROR_DOM_MEDIA_NOT_SUPPORTED_ERR = -2140274685, - NS_ERROR_DOWNLOAD_COMPLETE = -2139619327, - NS_ERROR_DOWNLOAD_NOT_PARTIAL = -2139619326, - NS_ERROR_UNORM_MOREOUTPUT = -2139619295, - NS_ERROR_DOCSHELL_REQUEST_REJECTED = -2139618327, - NS_ERROR_DOCUMENT_IS_PRINTMODE = -2139617327, + NS_ERROR_TRANSPORT_INIT = 2153840641, + NS_ERROR_DUPLICATE_HANDLE = 2153840642, + NS_ERROR_BRIDGE_OPEN_PARENT = 2153840643, + NS_ERROR_BRIDGE_OPEN_CHILD = 2153840644, + NS_ERROR_DOM_SVG_WRONG_TYPE_ERR = 2153906176, + NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE = 2153906178, + NS_ERROR_STORAGE_BUSY = 2153971713, + NS_ERROR_STORAGE_IOERR = 2153971714, + NS_ERROR_STORAGE_CONSTRAINT = 2153971715, + NS_ERROR_DOM_FILE_NOT_FOUND_ERR = 2154102784, + NS_ERROR_DOM_FILE_NOT_READABLE_ERR = 2154102785, + NS_ERROR_DOM_FILE_ABORT_ERR = 2154102786, + NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR = 2154168321, + NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR = 2154168323, + NS_ERROR_DOM_INDEXEDDB_CONSTRAINT_ERR = 2154168324, + NS_ERROR_DOM_INDEXEDDB_DATA_ERR = 2154168325, + NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR = 2154168326, + NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR = 2154168327, + NS_ERROR_DOM_INDEXEDDB_ABORT_ERR = 2154168328, + NS_ERROR_DOM_INDEXEDDB_READ_ONLY_ERR = 2154168329, + NS_ERROR_DOM_INDEXEDDB_TIMEOUT_ERR = 2154168330, + NS_ERROR_DOM_INDEXEDDB_QUOTA_ERR = 2154168331, + NS_ERROR_DOM_INDEXEDDB_VERSION_ERR = 2154168332, + NS_ERROR_DOM_INDEXEDDB_RECOVERABLE_ERR = 2154169321, + NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR = 2154233857, + NS_ERROR_DOM_FILEHANDLE_NOT_ALLOWED_ERR = 2154233858, + NS_ERROR_DOM_FILEHANDLE_INACTIVE_ERR = 2154233859, + NS_ERROR_DOM_FILEHANDLE_ABORT_ERR = 2154233860, + NS_ERROR_DOM_FILEHANDLE_READ_ONLY_ERR = 2154233861, + NS_ERROR_DOM_FILEHANDLE_QUOTA_ERR = 2154233862, + NS_ERROR_SIGNED_JAR_NOT_SIGNED = 2154299393, + NS_ERROR_SIGNED_JAR_MODIFIED_ENTRY = 2154299394, + NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY = 2154299395, + NS_ERROR_SIGNED_JAR_ENTRY_MISSING = 2154299396, + NS_ERROR_SIGNED_JAR_WRONG_SIGNATURE = 2154299397, + NS_ERROR_SIGNED_JAR_ENTRY_TOO_LARGE = 2154299398, + NS_ERROR_SIGNED_JAR_ENTRY_INVALID = 2154299399, + NS_ERROR_SIGNED_JAR_MANIFEST_INVALID = 2154299400, + NS_ERROR_DOM_FILESYSTEM_INVALID_PATH_ERR = 2154364929, + NS_ERROR_DOM_FILESYSTEM_INVALID_MODIFICATION_ERR = 2154364930, + NS_ERROR_DOM_FILESYSTEM_NO_MODIFICATION_ALLOWED_ERR = 2154364931, + NS_ERROR_DOM_FILESYSTEM_PATH_EXISTS_ERR = 2154364932, + NS_ERROR_DOM_FILESYSTEM_TYPE_MISMATCH_ERR = 2154364933, + NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR = 2154364934, + NS_ERROR_DOM_BLUETOOTH_FAIL = 2154430465, + NS_ERROR_DOM_BLUETOOTH_NOT_READY = 2154430466, + NS_ERROR_DOM_BLUETOOTH_NOMEM = 2154430467, + NS_ERROR_DOM_BLUETOOTH_BUSY = 2154430468, + NS_ERROR_DOM_BLUETOOTH_DONE = 2154430469, + NS_ERROR_DOM_BLUETOOTH_UNSUPPORTED = 2154430470, + NS_ERROR_DOM_BLUETOOTH_PARM_INVALID = 2154430471, + NS_ERROR_DOM_BLUETOOTH_UNHANDLED = 2154430472, + NS_ERROR_DOM_BLUETOOTH_AUTH_FAILURE = 2154430473, + NS_ERROR_DOM_BLUETOOTH_RMT_DEV_DOWN = 2154430474, + NS_ERROR_DOM_BLUETOOTH_AUTH_REJECTED = 2154430475, + NS_ERROR_SIGNED_APP_MANIFEST_INVALID = 2154496001, + NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR = 2154561537, + NS_ERROR_DOM_PUSH_INVALID_REGISTRATION_ERR = 2154627073, + NS_ERROR_DOM_PUSH_DENIED_ERR = 2154627074, + NS_ERROR_DOM_PUSH_ABORT_ERR = 2154627075, + NS_ERROR_DOM_PUSH_SERVICE_UNREACHABLE = 2154627076, + NS_ERROR_DOM_PUSH_INVALID_KEY_ERR = 2154627077, + NS_ERROR_DOM_PUSH_MISMATCHED_KEY_ERR = 2154627078, + NS_ERROR_DOM_MEDIA_ABORT_ERR = 2154692609, + NS_ERROR_DOM_MEDIA_NOT_ALLOWED_ERR = 2154692610, + NS_ERROR_DOM_MEDIA_NOT_SUPPORTED_ERR = 2154692611, + NS_ERROR_DOM_MEDIA_DECODE_ERR = 2154692612, + NS_ERROR_DOM_MEDIA_FATAL_ERR = 2154692613, + NS_ERROR_DOM_MEDIA_METADATA_ERR = 2154692614, + NS_ERROR_DOM_MEDIA_OVERFLOW_ERR = 2154692615, + NS_ERROR_DOM_MEDIA_END_OF_STREAM = 2154692616, + NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA = 2154692617, + NS_ERROR_DOM_MEDIA_CANCELED = 2154692618, + NS_ERROR_DOM_MEDIA_MEDIASINK_ERR = 2154692619, + NS_ERROR_DOM_MEDIA_DEMUXER_ERR = 2154692620, + NS_ERROR_DOM_MEDIA_CDM_ERR = 2154692621, + NS_ERROR_DOWNLOAD_COMPLETE = 2155347969, + NS_ERROR_DOWNLOAD_NOT_PARTIAL = 2155347970, + NS_ERROR_UNORM_MOREOUTPUT = 2155348001, + NS_ERROR_DOCSHELL_REQUEST_REJECTED = 2155348969, + NS_ERROR_DOCUMENT_IS_PRINTMODE = 2155349969, NS_SUCCESS_DONT_FIXUP = 7864321, NS_SUCCESS_RESTART_APP_NOT_SAME_PROFILE = 7864323, NS_SUCCESS_UNORM_NOTFOUND = 7864337, - NS_ERROR_NOT_IN_TREE = -2139619290, + NS_ERROR_NOT_IN_TREE = 2155348006, NS_OK_NO_NAME_CLAUSE_HANDLED = 7864354, } pub type nsrefcnt = MozRefCountType; #[repr(C)] -#[derive(Debug, Copy)] -pub struct HasPointerTypeHelper; -impl ::std::clone::Clone for HasPointerTypeHelper { - fn clone(&self) -> Self { *self } +#[derive(Debug, Copy, Clone)] +pub struct AlignedStorage2<T> { + pub u: AlignedStorage2_U<T>, + pub _phantom_0: ::std::marker::PhantomData<T>, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct PointerType<T, D> { - pub _phantom0: ::std::marker::PhantomData<T>, - pub _phantom1: ::std::marker::PhantomData<D>, +pub struct AlignedStorage2_U<T> { + pub mBytes: __BindgenUnionField<*mut ::std::os::raw::c_char>, + pub mDummy: __BindgenUnionField<u64>, + pub bindgen_union_field: u64, + pub _phantom_0: ::std::marker::PhantomData<T>, } /** - * <div rustbindgen="true" replaces="UniquePtr"> + * Pair is the logical concatenation of an instance of A with an instance B. + * Space is conserved when possible. Neither A nor B may be a final class. * - * TODO(Emilio): This is a workaround and we should be able to get rid of this - * one. + * It's typically clearer to have individual A and B member fields. Except if + * you want the space-conserving qualities of Pair, you're probably better off + * not using this! + * + * No guarantees are provided about the memory layout of A and B, the order of + * initialization or destruction of A and B, and so on. (This is approximately + * required to optimize space usage.) The first/second names are merely + * conceptual! */ #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct UniquePtr<T, Deleter> { - pub mPtr: *mut T, - pub _phantom0: ::std::marker::PhantomData<Deleter>, +pub struct Pair<A, B> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<A>, + pub _phantom_1: ::std::marker::PhantomData<B>, } +pub type Pair_Base = [u8; 0usize]; /** * A default deletion policy using plain old operator delete. * @@ -1450,81 +1365,255 @@ pub struct UniquePtr<T, Deleter> { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DefaultDelete<T> { - pub _phantom0: ::std::marker::PhantomData<T>, + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct UniqueSelector<T> { - pub _phantom0: ::std::marker::PhantomData<T>, +#[derive(Debug, Copy)] +pub struct JSContext { + pub _address: u8, +} +impl Clone for JSContext { + fn clone(&self) -> Self { *self } } -/** - * typedefs for backwards compatibility - */ -pub type nsSubstring = nsAString_internal; -pub type nsCSubstring = nsACString_internal; -pub type nsAFlatString = nsString; -pub type nsASingleFragmentString = nsSubstring; -pub type nsAFlatCString = nsCString; -pub type nsASingleFragmentCString = nsCSubstring; -/** - * @see nsTAString - */ #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsReadingIterator<CharT> { - pub mStart: *const CharT, - pub mEnd: *const CharT, - pub mPosition: *const CharT, +#[derive(Debug, Copy)] +pub struct JSObject { + pub _address: u8, +} +impl Clone for JSObject { + fn clone(&self) -> Self { *self } } /** - * @see nsTAString + * JS::Value is the interface for a single JavaScript Engine value. A few + * general notes on JS::Value: + * + * - JS::Value has setX() and isX() members for X in + * + * { Int32, Double, String, Symbol, Boolean, Undefined, Null, Object, Magic } + * + * JS::Value also contains toX() for each of the non-singleton types. + * + * - Magic is a singleton type whose payload contains either a JSWhyMagic "reason" for + * the magic value or a uint32_t value. By providing JSWhyMagic values when + * creating and checking for magic values, it is possible to assert, at + * runtime, that only magic values with the expected reason flow through a + * particular value. For example, if cx->exception has a magic value, the + * reason must be JS_GENERATOR_CLOSING. + * + * - The JS::Value operations are preferred. The JSVAL_* operations remain for + * compatibility; they may be removed at some point. These operations mostly + * provide similar functionality. But there are a few key differences. One + * is that JS::Value gives null a separate type. + * Also, to help prevent mistakenly boxing a nullable JSObject* as an object, + * Value::setObject takes a JSObject&. (Conversely, Value::toObject returns a + * JSObject&.) A convenience member Value::setObjectOrNull is provided. + * + * - JSVAL_VOID is the same as the singleton value of the Undefined type. + * + * - Note that JS::Value is 8 bytes on 32 and 64-bit architectures. Thus, on + * 32-bit user code should avoid copying jsval/JS::Value as much as possible, + * preferring to pass by const Value&. */ #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsWritingIterator<CharT> { - pub mStart: *mut CharT, - pub mEnd: *mut CharT, - pub mPosition: *mut CharT, +#[derive(Debug, Copy)] +pub struct Value { + pub data: jsval_layout, +} +#[test] +fn bindgen_test_layout_Value() { + assert_eq!(::std::mem::size_of::<Value>() , 8usize); + assert_eq!(::std::mem::align_of::<Value>() , 8usize); +} +impl Clone for Value { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStringComparator { - pub _vftable: *const _vftable_nsStringComparator, +pub struct JSCompartment { + pub _address: u8, +} +impl Clone for JSCompartment { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct atomic<_Tp> { + pub _M_i: _Tp, } #[repr(C)] -pub struct _vftable_nsStringComparator { - pub _bindgen_empty_ctype_warning_fix: u64, +#[derive(Debug, Copy)] +pub struct FreePolicy { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_FreePolicy() { + assert_eq!(::std::mem::size_of::<FreePolicy>() , 1usize); + assert_eq!(::std::mem::align_of::<FreePolicy>() , 1usize); } -impl ::std::clone::Clone for nsStringComparator { +impl Clone for FreePolicy { fn clone(&self) -> Self { *self } } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum JSValueTag { + JSVAL_TAG_MAX_DOUBLE = 131056, + JSVAL_TAG_INT32 = 131057, + JSVAL_TAG_UNDEFINED = 131058, + JSVAL_TAG_STRING = 131061, + JSVAL_TAG_SYMBOL = 131062, + JSVAL_TAG_BOOLEAN = 131059, + JSVAL_TAG_MAGIC = 131060, + JSVAL_TAG_NULL = 131064, + JSVAL_TAG_OBJECT = 131068, + JSVAL_TAG_PRIVATE_GCTHING = 131063, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum JSWhyMagic { + JS_ELEMENTS_HOLE = 0, + JS_NO_ITER_VALUE = 1, + JS_GENERATOR_CLOSING = 2, + JS_NO_CONSTANT = 3, + JS_THIS_POISON = 4, + JS_ARG_POISON = 5, + JS_SERIALIZE_NO_NODE = 6, + JS_LAZY_ARGUMENTS = 7, + JS_OPTIMIZED_ARGUMENTS = 8, + JS_IS_CONSTRUCTING = 9, + JS_BLOCK_NEEDS_CLONE = 10, + JS_HASH_KEY_EMPTY = 11, + JS_ION_ERROR = 12, + JS_ION_BAILOUT = 13, + JS_OPTIMIZED_OUT = 14, + JS_UNINITIALIZED_LEXICAL = 15, + JS_GENERIC_MAGIC = 16, + JS_WHY_MAGIC_COUNT = 17, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct jsval_layout { + pub asBits: __BindgenUnionField<u64>, + pub debugView: __BindgenUnionField<jsval_layout__bindgen_ty_bindgen_id_62758>, + pub s: __BindgenUnionField<jsval_layout__bindgen_ty_bindgen_id_62765>, + pub asDouble: __BindgenUnionField<f64>, + pub asPtr: __BindgenUnionField<*mut ::std::os::raw::c_void>, + pub asWord: __BindgenUnionField<usize>, + pub asUIntPtr: __BindgenUnionField<usize>, + pub bindgen_union_field: u64, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct jsval_layout__bindgen_ty_bindgen_id_62758 { + pub _bitfield_1: u64, +} #[test] -fn bindgen_test_layout_nsStringComparator() { - assert_eq!(::std::mem::size_of::<nsStringComparator>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStringComparator>() , 8usize); +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_62758() { + assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_bindgen_id_62758>() + , 8usize); + assert_eq!(::std::mem::align_of::<jsval_layout__bindgen_ty_bindgen_id_62758>() + , 8usize); +} +impl Clone for jsval_layout__bindgen_ty_bindgen_id_62758 { + fn clone(&self) -> Self { *self } +} +impl jsval_layout__bindgen_ty_bindgen_id_62758 { + #[inline] + pub fn payload47(&self) -> u64 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (140737488355327usize as u64)) >> + 0u32) as u64) + } + } + #[inline] + pub fn set_payload47(&mut self, val: u64) { + self._bitfield_1 &= !(140737488355327usize as u64); + self._bitfield_1 |= + ((val as u64 as u64) << 0u32) & (140737488355327usize as u64); + } + #[inline] + pub fn tag(&self) -> JSValueTag { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (18446603336221196288usize as u64)) >> + 47u32) as u32) + } + } + #[inline] + pub fn set_tag(&mut self, val: JSValueTag) { + self._bitfield_1 &= !(18446603336221196288usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 47u32) & + (18446603336221196288usize as u64); + } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsDefaultStringComparator { - pub _base: nsStringComparator, +pub struct jsval_layout__bindgen_ty_bindgen_id_62765 { + pub payload: jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766, } #[repr(C)] -pub struct _vftable_nsDefaultStringComparator { - pub _base: _vftable_nsStringComparator, +#[derive(Debug, Copy)] +pub struct jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766 { + pub i32: __BindgenUnionField<i32>, + pub u32: __BindgenUnionField<u32>, + pub why: __BindgenUnionField<JSWhyMagic>, + 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::<jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766>() + , 4usize); + assert_eq!(::std::mem::align_of::<jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766>() + , 4usize); } -impl ::std::clone::Clone for nsDefaultStringComparator { +impl Clone for + jsval_layout__bindgen_ty_bindgen_id_62765__bindgen_ty_bindgen_id_62766 { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_62765() { + assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_bindgen_id_62765>() + , 4usize); + assert_eq!(::std::mem::align_of::<jsval_layout__bindgen_ty_bindgen_id_62765>() + , 4usize); +} +impl Clone for jsval_layout__bindgen_ty_bindgen_id_62765 { + fn clone(&self) -> Self { *self } +} +impl Clone for jsval_layout { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] pub struct nsAString_internal { - pub mData: *mut ::std::os::raw::c_ushort, - pub mLength: ::std::os::raw::c_uint, + pub mData: *mut nsAString_internal_char_type, + pub mLength: nsAString_internal_size_type, pub mFlags: u32, } +pub type nsAString_internal_fallible_t = fallible_t; +pub type nsAString_internal_char_type = u16; +pub type nsAString_internal_char_traits = u8; +pub type nsAString_internal_incompatible_char_type = u8; +pub type nsAString_internal_self_type = nsAString_internal; +pub type nsAString_internal_abstract_string_type = + nsAString_internal_self_type; +pub type nsAString_internal_base_string_type = nsAString_internal_self_type; +pub type nsAString_internal_substring_type = nsAString_internal_self_type; +pub type nsAString_internal_substring_tuple_type = nsSubstringTuple; +pub type nsAString_internal_string_type = nsString; +pub type nsAString_internal_const_iterator = nsReadingIterator<u16>; +pub type nsAString_internal_iterator = nsWritingIterator<u16>; +pub type nsAString_internal_comparator_type = nsStringComparator; +pub type nsAString_internal_char_iterator = *mut nsAString_internal_char_type; +pub type nsAString_internal_const_char_iterator = + *const nsAString_internal_char_type; +pub type nsAString_internal_size_type = u32; +pub type nsAString_internal_index_type = u32; #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAString_internal_nsTSubstring_h_unnamed_1 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsAString_internal__bindgen_ty_bindgen_id_64603 { F_NONE = 0, F_TERMINATED = 1, F_VOIDED = 2, @@ -1541,43 +1630,99 @@ fn bindgen_test_layout_nsAString_internal() { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCStringComparator { - pub _vftable: *const _vftable_nsCStringComparator, +pub struct nsSubstringTuple { + pub mHead: *const nsSubstringTuple_self_type, + pub mFragA: *const nsSubstringTuple_base_string_type, + pub mFragB: *const nsSubstringTuple_base_string_type, +} +pub type nsSubstringTuple_char_type = u16; +pub type nsSubstringTuple_char_traits = nsCharTraits<u16>; +pub type nsSubstringTuple_self_type = nsSubstringTuple; +pub type nsSubstringTuple_substring_type = nsAString_internal; +pub type nsSubstringTuple_base_string_type = nsAString_internal; +pub type nsSubstringTuple_size_type = u32; +#[test] +fn bindgen_test_layout_nsSubstringTuple() { + assert_eq!(::std::mem::size_of::<nsSubstringTuple>() , 24usize); + assert_eq!(::std::mem::align_of::<nsSubstringTuple>() , 8usize); +} +impl Clone for nsSubstringTuple { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct _vftable_nsCStringComparator { - pub _bindgen_empty_ctype_warning_fix: u64, +#[derive(Debug)] +pub struct nsString { + pub _base: nsAString_internal, } -impl ::std::clone::Clone for nsCStringComparator { +pub type nsString_self_type = nsString; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsString_Segment { + pub mBegin: u32, + pub mLength: u32, +} +#[test] +fn bindgen_test_layout_nsString_Segment() { + assert_eq!(::std::mem::size_of::<nsString_Segment>() , 8usize); + assert_eq!(::std::mem::align_of::<nsString_Segment>() , 4usize); +} +impl Clone for nsString_Segment { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsCStringComparator() { - assert_eq!(::std::mem::size_of::<nsCStringComparator>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCStringComparator>() , 8usize); +fn bindgen_test_layout_nsString() { + assert_eq!(::std::mem::size_of::<nsString>() , 16usize); + assert_eq!(::std::mem::align_of::<nsString>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsDefaultCStringComparator { - pub _base: nsCStringComparator, +pub struct bindgen_vtable__bindgen_id_65213 { } #[repr(C)] -pub struct _vftable_nsDefaultCStringComparator { - pub _base: _vftable_nsCStringComparator, +#[derive(Debug, Copy)] +pub struct nsStringComparator { + pub vtable_: *const bindgen_vtable__bindgen_id_65213, } -impl ::std::clone::Clone for nsDefaultCStringComparator { +pub type nsStringComparator_char_type = u16; +#[test] +fn bindgen_test_layout_nsStringComparator() { + assert_eq!(::std::mem::size_of::<nsStringComparator>() , 8usize); + assert_eq!(::std::mem::align_of::<nsStringComparator>() , 8usize); +} +impl Clone for nsStringComparator { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] pub struct nsACString_internal { - pub mData: *mut ::std::os::raw::c_char, - pub mLength: ::std::os::raw::c_uint, + pub mData: *mut nsACString_internal_char_type, + pub mLength: nsACString_internal_size_type, pub mFlags: u32, } +pub type nsACString_internal_fallible_t = fallible_t; +pub type nsACString_internal_char_type = ::std::os::raw::c_char; +pub type nsACString_internal_char_traits = u8; +pub type nsACString_internal_incompatible_char_type = u16; +pub type nsACString_internal_self_type = nsACString_internal; +pub type nsACString_internal_abstract_string_type = + nsACString_internal_self_type; +pub type nsACString_internal_base_string_type = nsACString_internal_self_type; +pub type nsACString_internal_substring_type = nsACString_internal_self_type; +pub type nsACString_internal_substring_tuple_type = nsCSubstringTuple; +pub type nsACString_internal_string_type = nsCString; +pub type nsACString_internal_const_iterator = + nsReadingIterator<::std::os::raw::c_char>; +pub type nsACString_internal_iterator = + nsWritingIterator<::std::os::raw::c_char>; +pub type nsACString_internal_comparator_type = nsCStringComparator; +pub type nsACString_internal_char_iterator = + *mut nsACString_internal_char_type; +pub type nsACString_internal_const_char_iterator = + *const nsACString_internal_char_type; +pub type nsACString_internal_size_type = u32; +pub type nsACString_internal_index_type = u32; #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsACString_internal_nsTSubstring_h_unnamed_2 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsACString_internal__bindgen_ty_bindgen_id_66443 { F_NONE = 0, F_TERMINATED = 1, F_VOIDED = 2, @@ -1592,998 +1737,3239 @@ fn bindgen_test_layout_nsACString_internal() { assert_eq!(::std::mem::size_of::<nsACString_internal>() , 16usize); assert_eq!(::std::mem::align_of::<nsACString_internal>() , 8usize); } -/** - * ASCII case-insensitive comparator. (for Unicode case-insensitive - * comparision, see nsUnicharUtils.h) - */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCaseInsensitiveCStringComparator { - pub _base: nsCStringComparator, +pub struct nsCSubstringTuple { + pub mHead: *const nsCSubstringTuple_self_type, + pub mFragA: *const nsCSubstringTuple_base_string_type, + pub mFragB: *const nsCSubstringTuple_base_string_type, } -#[repr(C)] -pub struct _vftable_nsCaseInsensitiveCStringComparator { - pub _base: _vftable_nsCStringComparator, +pub type nsCSubstringTuple_char_type = ::std::os::raw::c_char; +pub type nsCSubstringTuple_char_traits = nsCharTraits<::std::os::raw::c_char>; +pub type nsCSubstringTuple_self_type = nsCSubstringTuple; +pub type nsCSubstringTuple_substring_type = nsACString_internal; +pub type nsCSubstringTuple_base_string_type = nsACString_internal; +pub type nsCSubstringTuple_size_type = u32; +#[test] +fn bindgen_test_layout_nsCSubstringTuple() { + assert_eq!(::std::mem::size_of::<nsCSubstringTuple>() , 24usize); + assert_eq!(::std::mem::align_of::<nsCSubstringTuple>() , 8usize); } -impl ::std::clone::Clone for nsCaseInsensitiveCStringComparator { +impl Clone for nsCSubstringTuple { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsCaseInsensitiveCStringArrayComparator; -impl ::std::clone::Clone for nsCaseInsensitiveCStringArrayComparator { - fn clone(&self) -> Self { *self } +#[derive(Debug)] +pub struct nsCString { + pub _base: nsACString_internal, } +pub type nsCString_self_type = nsCString; #[repr(C)] #[derive(Debug, Copy)] -pub struct nsSubstringTuple { - pub mHead: *const nsSubstringTuple, - pub mFragA: *const nsAString_internal, - pub mFragB: *const nsAString_internal, +pub struct nsCString_Segment { + pub mBegin: u32, + pub mLength: u32, +} +#[test] +fn bindgen_test_layout_nsCString_Segment() { + assert_eq!(::std::mem::size_of::<nsCString_Segment>() , 8usize); + assert_eq!(::std::mem::align_of::<nsCString_Segment>() , 4usize); } -impl ::std::clone::Clone for nsSubstringTuple { +impl Clone for nsCString_Segment { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsSubstringTuple() { - assert_eq!(::std::mem::size_of::<nsSubstringTuple>() , 24usize); - assert_eq!(::std::mem::align_of::<nsSubstringTuple>() , 8usize); +fn bindgen_test_layout_nsCString() { + assert_eq!(::std::mem::size_of::<nsCString>() , 16usize); + assert_eq!(::std::mem::align_of::<nsCString>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsCSubstringTuple { - pub mHead: *const nsCSubstringTuple, - pub mFragA: *const nsACString_internal, - pub mFragB: *const nsACString_internal, +pub struct bindgen_vtable__bindgen_id_66995 { } -impl ::std::clone::Clone for nsCSubstringTuple { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsCStringComparator { + pub vtable_: *const bindgen_vtable__bindgen_id_66995, } +pub type nsCStringComparator_char_type = ::std::os::raw::c_char; #[test] -fn bindgen_test_layout_nsCSubstringTuple() { - assert_eq!(::std::mem::size_of::<nsCSubstringTuple>() , 24usize); - assert_eq!(::std::mem::align_of::<nsCSubstringTuple>() , 8usize); +fn bindgen_test_layout_nsCStringComparator() { + assert_eq!(::std::mem::size_of::<nsCStringComparator>() , 8usize); + assert_eq!(::std::mem::align_of::<nsCStringComparator>() , 8usize); +} +impl Clone for nsCStringComparator { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsString { - pub _base: nsAString_internal, +pub struct bindgen_vtable__bindgen_id_67298 { } +/** + * Basic component object model interface. Objects which implement + * this interface support runtime interface discovery (QueryInterface) + * and a reference counted memory model (AddRef/Release). This is + * modelled after the win32 IUnknown API. + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsString_Segment { - pub mBegin: u32, - pub mLength: u32, +pub struct nsISupports { + pub vtable_: *const bindgen_vtable__bindgen_id_67298, } -impl ::std::clone::Clone for nsString_Segment { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsISupports_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsString_Segment() { - assert_eq!(::std::mem::size_of::<nsString_Segment>() , 8usize); - assert_eq!(::std::mem::align_of::<nsString_Segment>() , 4usize); +fn bindgen_test_layout_nsISupports() { + assert_eq!(::std::mem::size_of::<nsISupports>() , 8usize); + assert_eq!(::std::mem::align_of::<nsISupports>() , 8usize); } -#[test] -fn bindgen_test_layout_nsString() { - assert_eq!(::std::mem::size_of::<nsString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsString>() , 8usize); +impl Clone for nsISupports { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsFixedString { - pub _base: nsString, - pub mFixedCapacity: ::std::os::raw::c_uint, - pub mFixedBuf: *mut ::std::os::raw::c_ushort, +pub struct bindgen_vtable__bindgen_id_67581 { +} +/** + * Participant implementation classes + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsCycleCollectionParticipant { + pub vtable_: *const bindgen_vtable__bindgen_id_67581, + pub mMightSkip: bool, } #[test] -fn bindgen_test_layout_nsFixedString() { - assert_eq!(::std::mem::size_of::<nsFixedString>() , 32usize); - assert_eq!(::std::mem::align_of::<nsFixedString>() , 8usize); +fn bindgen_test_layout_nsCycleCollectionParticipant() { + assert_eq!(::std::mem::size_of::<nsCycleCollectionParticipant>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsCycleCollectionParticipant>() , + 8usize); +} +impl Clone for nsCycleCollectionParticipant { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct nsAutoString { - pub _base: nsFixedString, - pub mStorage: [::std::os::raw::c_ushort; 64usize], +#[derive(Debug, Copy)] +pub struct nsCycleCollectingAutoRefCnt { + pub mRefCntAndFlags: usize, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAutoString_nsTString_h_unnamed_3 { kDefaultStorageSize = 64, } #[test] -fn bindgen_test_layout_nsAutoString() { - assert_eq!(::std::mem::size_of::<nsAutoString>() , 160usize); - assert_eq!(::std::mem::align_of::<nsAutoString>() , 8usize); +fn bindgen_test_layout_nsCycleCollectingAutoRefCnt() { + assert_eq!(::std::mem::size_of::<nsCycleCollectingAutoRefCnt>() , 8usize); + assert_eq!(::std::mem::align_of::<nsCycleCollectingAutoRefCnt>() , + 8usize); } +impl Clone for nsCycleCollectingAutoRefCnt { + fn clone(&self) -> Self { *self } +} +pub type PRUint32 = ::std::os::raw::c_uint; +pub type PRUintn = ::std::os::raw::c_uint; +/************************************************************************ +** TYPES: PRSize +** DESCRIPTION: +** A type for representing the size of objects. +************************************************************************/ +pub type PRSize = usize; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct Dont_Instantiate_nsTArray_of<A> { - pub _phantom0: ::std::marker::PhantomData<A>, +pub struct nsCharTraits<CharT> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<CharT>, +} +/** + * @see nsTAString + */ +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsReadingIterator<CharT> { + pub mStart: *mut CharT, + pub mEnd: *mut CharT, + pub mPosition: *mut CharT, } +pub type nsReadingIterator_self_type<CharT> = nsReadingIterator<CharT>; +pub type nsReadingIterator_difference_type = isize; +pub type nsReadingIterator_value_type<CharT> = CharT; +pub type nsReadingIterator_pointer<CharT> = *mut CharT; +pub type nsReadingIterator_reference = [u8; 0usize]; +/** + * @see nsTAString + */ #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct Instead_Use_nsTArray_of<A> { - pub _phantom0: ::std::marker::PhantomData<A>, +pub struct nsWritingIterator<CharT> { + pub mStart: *mut CharT, + pub mEnd: *mut CharT, + pub mPosition: *mut CharT, } +pub type nsWritingIterator_self_type<CharT> = nsWritingIterator<CharT>; +pub type nsWritingIterator_difference_type = isize; +pub type nsWritingIterator_value_type<CharT> = CharT; +pub type nsWritingIterator_pointer<CharT> = *mut CharT; +pub type nsWritingIterator_reference = [u8; 0usize]; #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayElementTraits; -impl ::std::clone::Clone for nsTArrayElementTraits { +pub struct PLHashEntry { + pub next: *mut PLHashEntry, + pub keyHash: PLHashNumber, + pub key: *const ::std::os::raw::c_void, + pub value: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_PLHashEntry() { + assert_eq!(::std::mem::size_of::<PLHashEntry>() , 32usize); + assert_eq!(::std::mem::align_of::<PLHashEntry>() , 8usize); +} +impl Clone for PLHashEntry { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsXPIDLString { - pub _base: nsString, +#[derive(Debug, Copy)] +pub struct PLHashTable { + pub buckets: *mut *mut PLHashEntry, + pub nentries: PRUint32, + pub shift: PRUint32, + pub keyHash: PLHashFunction, + pub keyCompare: PLHashComparator, + pub valueCompare: PLHashComparator, + pub allocOps: *const PLHashAllocOps, + pub allocPriv: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_PLHashTable() { + assert_eq!(::std::mem::size_of::<PLHashTable>() , 56usize); + assert_eq!(::std::mem::align_of::<PLHashTable>() , 8usize); +} +impl Clone for PLHashTable { + fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsXPIDLString() { - assert_eq!(::std::mem::size_of::<nsXPIDLString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsXPIDLString>() , 8usize); +pub type PLHashNumber = PRUint32; +pub type PLHashFunction = + ::std::option::Option<unsafe extern "C" fn(key: + *const ::std::os::raw::c_void) + -> ::std::os::raw::c_uint>; +pub type PLHashComparator = + ::std::option::Option<unsafe extern "C" fn(v1: + *const ::std::os::raw::c_void, + v2: + *const ::std::os::raw::c_void) + -> ::std::os::raw::c_int>; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PLHashAllocOps { + pub allocTable: ::std::option::Option<unsafe extern "C" fn(pool: + *mut ::std::os::raw::c_void, + size: PRSize) + -> *mut ::std::os::raw::c_void>, + pub freeTable: ::std::option::Option<unsafe extern "C" fn(pool: + *mut ::std::os::raw::c_void, + item: + *mut ::std::os::raw::c_void)>, + pub allocEntry: ::std::option::Option<unsafe extern "C" fn(pool: + *mut ::std::os::raw::c_void, + key: + *const ::std::os::raw::c_void) + -> *mut PLHashEntry>, + pub freeEntry: ::std::option::Option<unsafe extern "C" fn(pool: + *mut ::std::os::raw::c_void, + he: + *mut PLHashEntry, + flag: PRUintn)>, +} +#[test] +fn bindgen_test_layout_PLHashAllocOps() { + assert_eq!(::std::mem::size_of::<PLHashAllocOps>() , 32usize); + assert_eq!(::std::mem::align_of::<PLHashAllocOps>() , 8usize); +} +impl Clone for PLHashAllocOps { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] -pub struct nsGetterCopies { - pub mString: *mut nsAString_internal, - pub mData: *mut ::std::os::raw::c_ushort, +pub struct OwningNonNull<T> { + pub mPtr: RefPtr<T>, + pub mInited: bool, } -#[test] -fn bindgen_test_layout_nsGetterCopies() { - assert_eq!(::std::mem::size_of::<nsGetterCopies>() , 16usize); - assert_eq!(::std::mem::align_of::<nsGetterCopies>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StaticRefPtr<T> { + pub mRawPtr: *mut T, } #[repr(C)] #[derive(Debug)] -pub struct nsAdoptingString { - pub _base: nsXPIDLString, +pub struct RefPtr<T> { + pub mRawPtr: *mut T, } -#[test] -fn bindgen_test_layout_nsAdoptingString() { - assert_eq!(::std::mem::size_of::<nsAdoptingString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAdoptingString>() , 8usize); +pub type RefPtr_element_type<T> = T; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RefPtr_Proxy<T, R, Args> { + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<R>, + pub _phantom_2: ::std::marker::PhantomData<Args>, } +pub type RefPtr_Proxy_member_function = [u8; 0usize]; #[repr(C)] -#[derive(Debug)] -pub struct nsCString { - pub _base: nsACString_internal, +#[derive(Debug, Copy, Clone)] +pub struct RefPtr_ConstRemovingRefPtrTraits<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCString_Segment { - pub mBegin: u32, - pub mLength: u32, -} -impl ::std::clone::Clone for nsCString_Segment { - fn clone(&self) -> Self { *self } +pub struct nsAutoOwningThread { + pub mThread: *mut ::std::os::raw::c_void, } #[test] -fn bindgen_test_layout_nsCString_Segment() { - assert_eq!(::std::mem::size_of::<nsCString_Segment>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCString_Segment>() , 4usize); +fn bindgen_test_layout_nsAutoOwningThread() { + assert_eq!(::std::mem::size_of::<nsAutoOwningThread>() , 8usize); + assert_eq!(::std::mem::align_of::<nsAutoOwningThread>() , 8usize); } -#[test] -fn bindgen_test_layout_nsCString() { - assert_eq!(::std::mem::size_of::<nsCString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsCString>() , 8usize); +impl Clone for nsAutoOwningThread { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsFixedCString { - pub _base: nsCString, - pub mFixedCapacity: ::std::os::raw::c_uint, - pub mFixedBuf: *mut ::std::os::raw::c_char, +#[derive(Debug, Copy)] +pub struct nsAutoRefCnt { + pub mValue: nsrefcnt, +} +extern "C" { + #[link_name = "_ZN12nsAutoRefCnt12isThreadSafeE"] + pub static nsAutoRefCnt_isThreadSafe: bool; } #[test] -fn bindgen_test_layout_nsFixedCString() { - assert_eq!(::std::mem::size_of::<nsFixedCString>() , 32usize); - assert_eq!(::std::mem::align_of::<nsFixedCString>() , 8usize); +fn bindgen_test_layout_nsAutoRefCnt() { + assert_eq!(::std::mem::size_of::<nsAutoRefCnt>() , 8usize); + assert_eq!(::std::mem::align_of::<nsAutoRefCnt>() , 8usize); +} +impl Clone for nsAutoRefCnt { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct nsAutoCString { - pub _base: nsFixedCString, - pub mStorage: [::std::os::raw::c_char; 64usize], +#[derive(Debug, Copy)] +pub struct ThreadSafeAutoRefCnt { + pub mValue: u64, +} +extern "C" { + #[link_name = "_ZN7mozilla20ThreadSafeAutoRefCnt12isThreadSafeE"] + pub static ThreadSafeAutoRefCnt_isThreadSafe: bool; } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAutoCString_nsTString_h_unnamed_4 { kDefaultStorageSize = 64, } #[test] -fn bindgen_test_layout_nsAutoCString() { - assert_eq!(::std::mem::size_of::<nsAutoCString>() , 96usize); - assert_eq!(::std::mem::align_of::<nsAutoCString>() , 8usize); +fn bindgen_test_layout_ThreadSafeAutoRefCnt() { + assert_eq!(::std::mem::size_of::<ThreadSafeAutoRefCnt>() , 8usize); + assert_eq!(::std::mem::align_of::<ThreadSafeAutoRefCnt>() , 8usize); } +impl Clone for ThreadSafeAutoRefCnt { + fn clone(&self) -> Self { *self } +} +pub type nscoord = i32; #[repr(C)] -#[derive(Debug)] -pub struct nsXPIDLCString { - pub _base: nsCString, +#[derive(Debug, Copy)] +pub struct nsTArrayHeader { + pub mLength: u32, + pub _bitfield_1: u32, +} +extern "C" { + #[link_name = "_ZN14nsTArrayHeader9sEmptyHdrE"] + pub static mut nsTArrayHeader_sEmptyHdr: nsTArrayHeader; } #[test] -fn bindgen_test_layout_nsXPIDLCString() { - assert_eq!(::std::mem::size_of::<nsXPIDLCString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsXPIDLCString>() , 8usize); +fn bindgen_test_layout_nsTArrayHeader() { + assert_eq!(::std::mem::size_of::<nsTArrayHeader>() , 8usize); + assert_eq!(::std::mem::align_of::<nsTArrayHeader>() , 4usize); +} +impl Clone for nsTArrayHeader { + fn clone(&self) -> Self { *self } +} +impl nsTArrayHeader { + #[inline] + pub fn mCapacity(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483647usize as u32)) >> 0u32) as + u32) + } + } + #[inline] + pub fn set_mCapacity(&mut self, val: u32) { + self._bitfield_1 &= !(2147483647usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 0u32) & (2147483647usize as u32); + } + #[inline] + pub fn mIsAutoArray(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483648usize as u32)) >> 31u32) as + u32) + } + } + #[inline] + pub fn set_mIsAutoArray(&mut self, val: u32) { + self._bitfield_1 &= !(2147483648usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 31u32) & (2147483648usize as u32); + } } #[repr(C)] #[derive(Debug)] -pub struct nsCGetterCopies { - pub mString: *mut nsACString_internal, - pub mData: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_nsCGetterCopies() { - assert_eq!(::std::mem::size_of::<nsCGetterCopies>() , 16usize); - assert_eq!(::std::mem::align_of::<nsCGetterCopies>() , 8usize); +pub struct nsCOMPtr<T> { + pub mRawPtr: *mut T, } +pub type nsCOMPtr_element_type<T> = T; #[repr(C)] #[derive(Debug)] -pub struct nsAdoptingCString { - pub _base: nsXPIDLCString, +pub struct ErrorResult { + pub _base: TErrorResult<AssertAndSuppressCleanupPolicy>, } +pub type ErrorResult_BaseErrorResult = + TErrorResult<AssertAndSuppressCleanupPolicy>; #[test] -fn bindgen_test_layout_nsAdoptingCString() { - assert_eq!(::std::mem::size_of::<nsAdoptingCString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAdoptingCString>() , 8usize); +fn bindgen_test_layout_ErrorResult() { + assert_eq!(::std::mem::size_of::<ErrorResult>() , 32usize); + assert_eq!(::std::mem::align_of::<ErrorResult>() , 8usize); } /** - * A helper class that converts a UTF-16 string to ASCII in a lossy manner + * Templated implementation class for various ErrorResult-like things. The + * instantiations differ only in terms of their cleanup policies (used in the + * destructor), which they can specify via the template argument. Note that + * this means it's safe to reinterpret_cast between the instantiations unless + * you plan to invoke the destructor through such a cast pointer. + * + * A cleanup policy consists of two booleans: whether to assert that we've been + * reported or suppressed, and whether to then go ahead and suppress the + * exception. */ #[repr(C)] -pub struct NS_LossyConvertUTF16toASCII { - pub _base: nsAutoCString, +#[derive(Debug)] +pub struct TErrorResult<CleanupPolicy> { + pub mResult: nsresult, + pub __bindgen_anon_1: TErrorResult__bindgen_ty_bindgen_id_75451<CleanupPolicy>, + pub mMightHaveUnreportedJSException: bool, + pub mUnionState: TErrorResult_UnionState, + pub _mOwningThread: nsAutoOwningThread, + pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>, } -#[test] -fn bindgen_test_layout_NS_LossyConvertUTF16toASCII() { - assert_eq!(::std::mem::size_of::<NS_LossyConvertUTF16toASCII>() , - 96usize); - assert_eq!(::std::mem::align_of::<NS_LossyConvertUTF16toASCII>() , - 8usize); +pub const TErrorResult_UnionState_HasDOMExceptionInfo: TErrorResult_UnionState + = + TErrorResult_UnionState::HasMessage; +pub const TErrorResult_UnionState_HasJSException: TErrorResult_UnionState = + TErrorResult_UnionState::HasMessage; +pub const TErrorResult_UnionState_HasNothing: TErrorResult_UnionState = + TErrorResult_UnionState::HasMessage; +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum TErrorResult_UnionState { HasMessage = 0, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TErrorResult_Message<CleanupPolicy> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>, } #[repr(C)] -pub struct NS_ConvertASCIItoUTF16 { - pub _base: nsAutoString, +#[derive(Debug, Copy, Clone)] +pub struct TErrorResult_DOMExceptionInfo<CleanupPolicy> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>, } -#[test] -fn bindgen_test_layout_NS_ConvertASCIItoUTF16() { - assert_eq!(::std::mem::size_of::<NS_ConvertASCIItoUTF16>() , 160usize); - assert_eq!(::std::mem::align_of::<NS_ConvertASCIItoUTF16>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TErrorResult__bindgen_ty_bindgen_id_75451<CleanupPolicy> { + pub mMessage: __BindgenUnionField<*mut TErrorResult_Message<CleanupPolicy>>, + pub mJSException: __BindgenUnionField<Value>, + pub mDOMExceptionInfo: __BindgenUnionField<*mut TErrorResult_DOMExceptionInfo<CleanupPolicy>>, + pub bindgen_union_field: u64, + pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>, } -/** - * A helper class that converts a UTF-16 string to UTF-8 - */ #[repr(C)] -pub struct NS_ConvertUTF16toUTF8 { - pub _base: nsAutoCString, +#[derive(Debug, Copy)] +pub struct AssertAndSuppressCleanupPolicy { + pub _address: u8, } -#[test] -fn bindgen_test_layout_NS_ConvertUTF16toUTF8() { - assert_eq!(::std::mem::size_of::<NS_ConvertUTF16toUTF8>() , 96usize); - assert_eq!(::std::mem::align_of::<NS_ConvertUTF16toUTF8>() , 8usize); +extern "C" { + #[link_name = + "_ZN7mozilla14binding_danger30AssertAndSuppressCleanupPolicy13assertHandledE"] + pub static AssertAndSuppressCleanupPolicy_assertHandled: bool; } -#[repr(C)] -pub struct NS_ConvertUTF8toUTF16 { - pub _base: nsAutoString, +extern "C" { + #[link_name = + "_ZN7mozilla14binding_danger30AssertAndSuppressCleanupPolicy8suppressE"] + pub static AssertAndSuppressCleanupPolicy_suppress: bool; } #[test] -fn bindgen_test_layout_NS_ConvertUTF8toUTF16() { - assert_eq!(::std::mem::size_of::<NS_ConvertUTF8toUTF16>() , 160usize); - assert_eq!(::std::mem::align_of::<NS_ConvertUTF8toUTF16>() , 8usize); +fn bindgen_test_layout_AssertAndSuppressCleanupPolicy() { + assert_eq!(::std::mem::size_of::<AssertAndSuppressCleanupPolicy>() , + 1usize); + assert_eq!(::std::mem::align_of::<AssertAndSuppressCleanupPolicy>() , + 1usize); } -pub type nsVoidableString = nsAutoString; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct RefPtrTraits<U> { - pub _phantom0: ::std::marker::PhantomData<U>, +impl Clone for AssertAndSuppressCleanupPolicy { + fn clone(&self) -> Self { *self } } +/** + * Factors implementation for all template versions of nsCOMPtr. + * + * Here's the way people normally do things like this: + * + * template<class T> class Foo { ... }; + * template<> class Foo<void*> { ... }; + * template<class T> class Foo<T*> : private Foo<void*> { ... }; + */ #[repr(C)] #[derive(Debug)] -pub struct RefPtr<T> { - pub mRawPtr: *mut T, +pub struct nsCOMPtr_base { + pub mRawPtr: *mut nsISupports, } #[repr(C)] #[derive(Debug)] -pub struct RefPtr_Proxy<T, R, Args> { +pub struct nsAutoPtr<T> { pub mRawPtr: *mut T, - pub _phantom0: ::std::marker::PhantomData<R>, - pub _phantom1: ::std::marker::PhantomData<Args>, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct RefPtr_ConstRemovingRefPtrTraits<T, U> { - pub _phantom0: ::std::marker::PhantomData<T>, - pub _phantom1: ::std::marker::PhantomData<U>, +pub struct nsAutoPtr_Ptr<T> { + pub mPtr: *mut T, } +pub type nsAutoPtr_element_type<T> = T; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct RefPtrGetterAddRefs<T> { - pub mTargetSmartPtr: *mut RefPtr<T>, +pub struct nsAutoPtr_Proxy<T, R, Args> { + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<R>, + pub _phantom_2: ::std::marker::PhantomData<Args>, } +pub type nsAutoPtr_Proxy_member_function = [u8; 0usize]; /** - * A "unique identifier". This is modeled after OSF DCE UUIDs. + * This structure precedes the string buffers "we" allocate. It may be the + * case that nsTAString::mData does not point to one of these special + * buffers. The mFlags member variable distinguishes the buffer type. + * + * When this header is in use, it enables reference counting, and capacity + * tracking. NOTE: A string buffer can be modified only if its reference + * count is 1. */ #[repr(C)] -#[derive(Debug)] -pub struct nsID { - pub m0: u32, - pub m1: u16, - pub m2: u16, - pub m3: [u8; 8usize], +#[derive(Debug, Copy)] +pub struct nsStringBuffer { + pub mRefCount: u32, + pub mStorageSize: u32, } #[test] -fn bindgen_test_layout_nsID() { - assert_eq!(::std::mem::size_of::<nsID>() , 16usize); - assert_eq!(::std::mem::align_of::<nsID>() , 4usize); +fn bindgen_test_layout_nsStringBuffer() { + assert_eq!(::std::mem::size_of::<nsStringBuffer>() , 8usize); + assert_eq!(::std::mem::align_of::<nsStringBuffer>() , 4usize); +} +impl Clone for nsStringBuffer { + fn clone(&self) -> Self { *self } } -/** - * A stack helper class to convert a nsID to a string. Useful - * for printing nsIDs. For example: - * nsID aID = ...; - * printf("%s", nsIDToCString(aID).get()); - */ #[repr(C)] -#[derive(Copy)] -pub struct nsIDToCString { - pub mStringBytes: [::std::os::raw::c_char; 39usize], +#[derive(Debug, Copy)] +pub struct nsIAtom { + pub _base: nsISupports, + pub _bitfield_1: u32, + pub mHash: u32, + /** + * WARNING! There is an invisible constraint on |mString|: the chars it + * points to must belong to an nsStringBuffer. This is so that the + * nsStringBuffer::FromData() calls above are valid. + */ + pub mString: *mut u16, } -impl ::std::clone::Clone for nsIDToCString { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIAtom_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsIDToCString() { - assert_eq!(::std::mem::size_of::<nsIDToCString>() , 39usize); - assert_eq!(::std::mem::align_of::<nsIDToCString>() , 1usize); +fn bindgen_test_layout_nsIAtom() { + assert_eq!(::std::mem::size_of::<nsIAtom>() , 24usize); + assert_eq!(::std::mem::align_of::<nsIAtom>() , 8usize); +} +impl Clone for nsIAtom { + fn clone(&self) -> Self { *self } +} +impl nsIAtom { + #[inline] + pub fn mLength(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483647usize as u32)) >> 0u32) as + u32) + } + } + #[inline] + pub fn set_mLength(&mut self, val: u32) { + self._bitfield_1 &= !(2147483647usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 0u32) & (2147483647usize as u32); + } + #[inline] + pub fn mIsStatic(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483648usize as u32)) >> 31u32) as + u32) + } + } + #[inline] + pub fn set_mIsStatic(&mut self, val: u32) { + self._bitfield_1 &= !(2147483648usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 31u32) & (2147483648usize as u32); + } } -pub type nsCID = nsID; -/** - * An "interface id" which can be used to uniquely identify a given - * interface. - */ -pub type nsIID = nsID; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct COMTypeInfo<T, U> { - pub _phantom0: ::std::marker::PhantomData<T>, - pub _phantom1: ::std::marker::PhantomData<U>, +pub struct bindgen_vtable__bindgen_id_76438 { } /** - * Basic component object model interface. Objects which implement - * this interface support runtime interface discovery (QueryInterface) - * and a reference counted memory model (AddRef/Release). This is - * modelled after the win32 IUnknown API. + * Class to store the wrapper for an object. This can only be used with objects + * that only have one non-security wrapper at a time (for an XPCWrappedNative + * this is usually ensured by setting an explicit parent in the PreCreate hook + * for the class). + * + * An instance of nsWrapperCache can be gotten from an object that implements + * a wrapper cache by calling QueryInterface on it. Note that this breaks XPCOM + * rules a bit (this object doesn't derive from nsISupports). + * + * The cache can store objects other than wrappers. We allow wrappers to use a + * separate JSObject to store their state (mostly expandos). If the wrapper is + * collected and we want to preserve this state we actually store the state + * object in the cache. + * + * The cache can store 2 types of objects: + * + * If WRAPPER_IS_NOT_DOM_BINDING is set (IsDOMBinding() returns false): + * - the JSObject of an XPCWrappedNative wrapper + * + * If WRAPPER_IS_NOT_DOM_BINDING is not set (IsDOMBinding() returns true): + * - a DOM binding object (regular JS object or proxy) + * + * The finalizer for the wrapper clears the cache. + * + * A compacting GC can move the wrapper object. Pointers to moved objects are + * usually found and updated by tracing the heap, however non-preserved wrappers + * are weak references and are not traced, so another approach is + * necessary. Instead a class hook (objectMovedOp) is provided that is called + * when an object is moved and is responsible for ensuring pointers are + * updated. It does this by calling UpdateWrapper() on the wrapper + * cache. SetWrapper() asserts that the hook is implemented for any wrapper set. + * + * A number of the methods are implemented in nsWrapperCacheInlines.h because we + * have to include some JS headers that don't play nicely with the rest of the + * codebase. Include nsWrapperCacheInlines.h if you need to call those methods. */ #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsISupports { - pub _vftable: *const _vftable_nsISupports, +#[derive(Debug)] +pub struct nsWrapperCache { + pub vtable_: *const bindgen_vtable__bindgen_id_76438, + pub mWrapper: *mut JSObject, + pub mFlags: nsWrapperCache_FlagsType, } #[repr(C)] -pub struct _vftable_nsISupports { - pub _bindgen_empty_ctype_warning_fix: u64, +#[derive(Debug, Copy, Clone)] +pub struct nsWrapperCache_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } -impl ::std::clone::Clone for nsISupports { - fn clone(&self) -> Self { *self } +pub type nsWrapperCache_FlagsType = u32; +#[repr(u32)] +/** + * If this bit is set then we're preserving the wrapper, which in effect ties + * the lifetime of the JS object stored in the cache to the lifetime of the + * native object. We rely on the cycle collector to break the cycle that this + * causes between the native object and the JS object, so it is important that + * any native object that supports preserving of its wrapper + * traces/traverses/unlinks the cached JS object (see + * NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER, + * NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS and + * NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER). + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsWrapperCache__bindgen_ty_bindgen_id_76645 { + WRAPPER_BIT_PRESERVED = 1, } #[test] -fn bindgen_test_layout_nsISupports() { - assert_eq!(::std::mem::size_of::<nsISupports>() , 8usize); - assert_eq!(::std::mem::align_of::<nsISupports>() , 8usize); +fn bindgen_test_layout_nsWrapperCache() { + assert_eq!(::std::mem::size_of::<nsWrapperCache>() , 24usize); + assert_eq!(::std::mem::align_of::<nsWrapperCache>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsAutoOwningThread { - pub mThread: *mut ::std::os::raw::c_void, +pub struct AllOwningUnionBase { + pub _address: u8, } -impl ::std::clone::Clone for nsAutoOwningThread { +#[test] +fn bindgen_test_layout_AllOwningUnionBase() { + assert_eq!(::std::mem::size_of::<AllOwningUnionBase>() , 1usize); + assert_eq!(::std::mem::align_of::<AllOwningUnionBase>() , 1usize); +} +impl Clone for AllOwningUnionBase { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug)] +pub struct GlobalObject { + pub mGlobalJSObject: [u64; 3usize], + pub mCx: *mut JSContext, + pub mGlobalObject: *mut nsISupports, +} #[test] -fn bindgen_test_layout_nsAutoOwningThread() { - assert_eq!(::std::mem::size_of::<nsAutoOwningThread>() , 8usize); - assert_eq!(::std::mem::align_of::<nsAutoOwningThread>() , 8usize); +fn bindgen_test_layout_GlobalObject() { + assert_eq!(::std::mem::size_of::<GlobalObject>() , 40usize); + assert_eq!(::std::mem::align_of::<GlobalObject>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCycleCollectingAutoRefCnt { - pub mRefCntAndFlags: usize, -} -impl ::std::clone::Clone for nsCycleCollectingAutoRefCnt { - fn clone(&self) -> Self { *self } +pub struct nsScriptObjectTracer { + pub _base: nsCycleCollectionParticipant, } #[test] -fn bindgen_test_layout_nsCycleCollectingAutoRefCnt() { - assert_eq!(::std::mem::size_of::<nsCycleCollectingAutoRefCnt>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCycleCollectingAutoRefCnt>() , - 8usize); +fn bindgen_test_layout_nsScriptObjectTracer() { + assert_eq!(::std::mem::size_of::<nsScriptObjectTracer>() , 16usize); + assert_eq!(::std::mem::align_of::<nsScriptObjectTracer>() , 8usize); +} +impl Clone for nsScriptObjectTracer { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsAutoRefCnt { - pub mValue: nsrefcnt, +pub struct nsXPCOMCycleCollectionParticipant { + pub _base: nsScriptObjectTracer, } -impl ::std::clone::Clone for nsAutoRefCnt { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsXPCOMCycleCollectionParticipant_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsAutoRefCnt() { - assert_eq!(::std::mem::size_of::<nsAutoRefCnt>() , 8usize); - assert_eq!(::std::mem::align_of::<nsAutoRefCnt>() , 8usize); +fn bindgen_test_layout_nsXPCOMCycleCollectionParticipant() { + assert_eq!(::std::mem::size_of::<nsXPCOMCycleCollectionParticipant>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsXPCOMCycleCollectionParticipant>() , + 8usize); } -extern "C" { - #[link_name = "_ZN12nsAutoRefCnt12isThreadSafeE"] - pub static nsAutoRefCnt_consts_isThreadSafe: bool; +impl Clone for nsXPCOMCycleCollectionParticipant { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct ThreadSafeAutoRefCnt { - pub mValue: u64, -} -#[test] -fn bindgen_test_layout_ThreadSafeAutoRefCnt() { - assert_eq!(::std::mem::size_of::<ThreadSafeAutoRefCnt>() , 8usize); - assert_eq!(::std::mem::align_of::<ThreadSafeAutoRefCnt>() , 8usize); +#[derive(Debug, Copy, Clone)] +pub struct pair<_T1, _T2> { + pub first: _T1, + pub second: _T2, } -extern "C" { - #[link_name = "_ZN7mozilla20ThreadSafeAutoRefCnt12isThreadSafeE"] - pub static ThreadSafeAutoRefCnt_consts_isThreadSafe: bool; +pub type pair_first_type<_T1> = _T1; +pub type pair_second_type<_T2> = _T2; +#[repr(C)] +pub struct bindgen_vtable__bindgen_id_93519 { } /** - * There are two ways of implementing QueryInterface, and we use both: - * - * Table-driven QueryInterface uses a static table of IID->offset mappings - * and a shared helper function. Using it tends to reduce codesize and improve - * runtime performance (due to processor cache hits). + * A class of objects that return source code on demand. * - * Macro-driven QueryInterface generates a QueryInterface function directly - * using common macros. This is necessary if special QueryInterface features - * are being used (such as tearoffs and conditional interfaces). - * - * These methods can be combined into a table-driven function call followed - * by custom code for tearoffs and conditionals. + * 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_93519, +} +#[test] +fn bindgen_test_layout_SourceHook() { + assert_eq!(::std::mem::size_of::<SourceHook>() , 8usize); + assert_eq!(::std::mem::align_of::<SourceHook>() , 8usize); +} +#[repr(C)] #[derive(Debug, Copy)] -pub struct QITableEntry { - pub iid: *const nsIID, - pub offset: i32, +pub struct nsIPrincipal { + pub _base: nsISerializable, } -impl ::std::clone::Clone for QITableEntry { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIPrincipal_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPrincipal__bindgen_ty_bindgen_id_98969 { + APP_STATUS_NOT_INSTALLED = 0, + APP_STATUS_INSTALLED = 1, + APP_STATUS_PRIVILEGED = 2, + APP_STATUS_CERTIFIED = 3, } #[test] -fn bindgen_test_layout_QITableEntry() { - assert_eq!(::std::mem::size_of::<QITableEntry>() , 16usize); - assert_eq!(::std::mem::align_of::<QITableEntry>() , 8usize); +fn bindgen_test_layout_nsIPrincipal() { + assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize); +} +impl Clone for nsIPrincipal { + fn clone(&self) -> Self { *self } } -pub enum TileClient { } -pub enum SerializedStructuredCloneBuffer { } -pub enum StructuredCloneData { } -pub enum ClonedMessageData { } -pub enum MessagePortMessage { } -pub enum StructuredCloneReadInfo { } -pub enum SerializedStructuredCloneReadInfo { } -pub enum ObjectStoreCursorResponse { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayFallibleResult { - pub mResult: bool, +pub struct nsISerializable { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsISerializable_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsISerializable() { + assert_eq!(::std::mem::size_of::<nsISerializable>() , 8usize); + assert_eq!(::std::mem::align_of::<nsISerializable>() , 8usize); } -impl ::std::clone::Clone for nsTArrayFallibleResult { +impl Clone for nsISerializable { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug)] +pub struct nsIGlobalObject { + pub _base: nsISupports, + pub mHostObjectURIs: nsTArray<nsCString>, + pub mIsDying: bool, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIGlobalObject_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} #[test] -fn bindgen_test_layout_nsTArrayFallibleResult() { - assert_eq!(::std::mem::size_of::<nsTArrayFallibleResult>() , 1usize); - assert_eq!(::std::mem::align_of::<nsTArrayFallibleResult>() , 1usize); +fn bindgen_test_layout_nsIGlobalObject() { + assert_eq!(::std::mem::size_of::<nsIGlobalObject>() , 24usize); + assert_eq!(::std::mem::align_of::<nsIGlobalObject>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayInfallibleResult; -impl ::std::clone::Clone for nsTArrayInfallibleResult { - fn clone(&self) -> Self { *self } +pub struct nsIURI { + pub _base: nsISupports, } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsTArrayFallibleAllocatorBase; -impl ::std::clone::Clone for nsTArrayFallibleAllocatorBase { +#[derive(Debug, Copy, Clone)] +pub struct nsIURI_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIURI() { + assert_eq!(::std::mem::size_of::<nsIURI>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIURI>() , 8usize); +} +impl Clone for nsIURI { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsTArrayInfallibleAllocatorBase; -impl ::std::clone::Clone for nsTArrayInfallibleAllocatorBase { - fn clone(&self) -> Self { *self } +#[derive(Debug)] +pub struct nsPIDOMWindowInner { + pub _base: [u64; 28usize], } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsTArrayFallibleAllocator { - pub _base: nsTArrayFallibleAllocatorBase, +#[derive(Debug, Copy, Clone)] +pub struct nsPIDOMWindowInner_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } -impl ::std::clone::Clone for nsTArrayFallibleAllocator { - fn clone(&self) -> Self { *self } +#[test] +fn bindgen_test_layout_nsPIDOMWindowInner() { + assert_eq!(::std::mem::size_of::<nsPIDOMWindowInner>() , 224usize); + assert_eq!(::std::mem::align_of::<nsPIDOMWindowInner>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsIDocument { + pub _base: nsINode, + pub mDeprecationWarnedAbout: u64, + pub mDocWarningWarnedAbout: u64, + pub mSelectorCache: [u64; 16usize], + pub mReferrer: nsCString, + pub mLastModified: nsString, + pub mDocumentURI: nsCOMPtr<nsIURI>, + pub mOriginalURI: nsCOMPtr<nsIURI>, + pub mChromeXHRDocURI: nsCOMPtr<nsIURI>, + pub mDocumentBaseURI: nsCOMPtr<nsIURI>, + pub mChromeXHRDocBaseURI: nsCOMPtr<nsIURI>, + pub mDocumentLoadGroup: nsWeakPtr, + pub mReferrerPolicySet: bool, + pub mReferrerPolicy: nsIDocument_ReferrerPolicyEnum, + pub mBlockAllMixedContent: bool, + pub mBlockAllMixedContentPreloads: bool, + pub mUpgradeInsecureRequests: bool, + pub mUpgradeInsecurePreloads: bool, + pub mDocumentContainer: u64, + pub mCharacterSet: nsCString, + pub mCharacterSetSource: i32, + pub mParentDocument: *mut nsIDocument, + pub mCachedRootElement: *mut Element, + pub mNodeInfoManager: *mut nsNodeInfoManager, + pub mCSSLoader: RefPtr<Loader>, + pub mStyleImageLoader: RefPtr<ImageLoader>, + pub mAttrStyleSheet: RefPtr<nsHTMLStyleSheet>, + pub mStyleAttrStyleSheet: RefPtr<nsHTMLCSSStyleSheet>, + pub mSVGAttrAnimationRuleProcessor: RefPtr<SVGAttrAnimationRuleProcessor>, + pub mActivityObservers: nsAutoPtr<()>, + pub mLinksToUpdate: [u64; 6usize], + pub mAnimationController: RefPtr<nsSMILAnimationController>, + pub mPropertyTable: nsPropertyTable, + pub mExtraPropertyTables: nsTArray<nsAutoPtr<nsPropertyTable>>, + pub mChildrenCollection: nsCOMPtr<nsIHTMLCollection>, + pub mFontFaceSet: RefPtr<FontFaceSet>, + pub mCompatMode: nsCompatibility, + pub mReadyState: nsIDocument_ReadyState, + pub mVisibilityState: VisibilityState, + pub mStyleBackendType: StyleBackendType, + pub _bitfield_1: u64, + pub mType: nsIDocument_Type, + pub mDefaultElementType: u8, + pub mAllowXULXBL: nsIDocument_Tri, + /** + * This is true while FlushPendingLinkUpdates executes. Calls to + * [Un]RegisterPendingLinkUpdate will assert when this is true. + */ + pub mIsLinkUpdateRegistrationsForbidden: bool, + pub mScriptGlobalObject: nsCOMPtr<nsIScriptGlobalObject>, + pub mOriginalDocument: nsCOMPtr<nsIDocument>, + pub mBidiOptions: u32, + pub mSandboxFlags: u32, + pub mContentLanguage: nsCString, + pub mChannel: nsCOMPtr<nsIChannel>, + pub mContentType: nsCString, + pub mId: nsString, + pub mSecurityInfo: nsCOMPtr<nsISupports>, + pub mFailedChannel: nsCOMPtr<nsIChannel>, + pub mPartID: u32, + pub mMarkedCCGeneration: u32, + pub mPresShell: *mut nsIPresShell, + pub mSubtreeModifiedTargets: nsCOMArray<nsINode>, + pub mSubtreeModifiedDepth: u32, + pub mDisplayDocument: nsCOMPtr<nsIDocument>, + pub mEventsSuppressed: u32, + pub mAnimationsPaused: u32, + /** + * The number number of external scripts (ones with the src attribute) that + * have this document as their owner and that are being evaluated right now. + */ + pub mExternalScriptsBeingEvaluated: u32, + /** + * The current frame request callback handle + */ + pub mFrameRequestCallbackCounter: i32, + pub mStaticCloneCount: u32, + pub mBlockedTrackingNodes: nsTArray<nsCOMPtr<nsIWeakReference>>, + pub mWindow: *mut nsPIDOMWindowInner, + pub mCachedEncoder: nsCOMPtr<nsIDocumentEncoder>, + pub mFrameRequestCallbacks: nsTArray<nsIDocument_FrameRequest>, + pub mBFCacheEntry: *mut nsIBFCacheEntry, + pub mBaseTarget: nsString, + pub mStateObjectContainer: nsCOMPtr<nsIStructuredCloneContainer>, + pub mStateObjectCached: nsCOMPtr<nsIVariant>, + pub mInSyncOperationCount: u32, + pub mXPathEvaluator: RefPtr<XPathEvaluator>, + pub mAnonymousContents: nsTArray<RefPtr<AnonymousContent>>, + pub mBlockDOMContentLoaded: u32, + pub _bitfield_2: u8, + pub mDOMMediaQueryLists: PRCList, + pub mUseCounters: [u64; 2usize], + pub mChildDocumentUseCounters: [u64; 2usize], + pub mNotifiedPageForUseCounter: [u64; 2usize], + pub mUserHasInteracted: bool, +} +pub type nsIDocument_GlobalObject = GlobalObject; +pub type nsIDocument_ReferrerPolicyEnum = ReferrerPolicy; +pub type nsIDocument_Element = Element; +pub type nsIDocument_FullscreenRequest = FullscreenRequest; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIDocument_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +/** + * This gets fired when the element that an id refers to changes. + * This fires at difficult times. It is generally not safe to do anything + * which could modify the DOM in any way. Use + * nsContentUtils::AddScriptRunner. + * @return true to keep the callback in the callback set, false + * to remove it. + */ +pub type nsIDocument_IDTargetObserver = + ::std::option::Option<unsafe extern "C" fn(aOldElement: + *mut nsIDocument_Element, + aNewelement: + *mut nsIDocument_Element, + aData: + *mut ::std::os::raw::c_void) + -> bool>; +#[repr(C)] +#[derive(Debug)] +pub struct nsIDocument_SelectorCacheKey { + pub mKey: nsString, + pub mState: nsExpirationState, +} +#[test] +fn bindgen_test_layout_nsIDocument_SelectorCacheKey() { + assert_eq!(::std::mem::size_of::<nsIDocument_SelectorCacheKey>() , + 24usize); + assert_eq!(::std::mem::align_of::<nsIDocument_SelectorCacheKey>() , + 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayInfallibleAllocator { - pub _base: nsTArrayInfallibleAllocatorBase, +pub struct nsIDocument_SelectorCacheKeyDeleter { + pub _address: u8, } -impl ::std::clone::Clone for nsTArrayInfallibleAllocator { +impl Clone for nsIDocument_SelectorCacheKeyDeleter { fn clone(&self) -> Self { *self } } #[repr(C)] +#[derive(Debug)] +pub struct nsIDocument_SelectorCache { + pub _bindgen_opaque_blob: [u64; 16usize], +} +#[test] +fn bindgen_test_layout_nsIDocument_SelectorCache() { + assert_eq!(::std::mem::size_of::<nsIDocument_SelectorCache>() , 128usize); + assert_eq!(::std::mem::align_of::<nsIDocument_SelectorCache>() , 8usize); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_additionalSheetType { + eAgentSheet = 0, + eUserSheet = 1, + eAuthorSheet = 2, + AdditionalSheetTypeCount = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_ReadyState { + READYSTATE_UNINITIALIZED = 0, + READYSTATE_LOADING = 1, + READYSTATE_INTERACTIVE = 3, + READYSTATE_COMPLETE = 4, +} +/** + * Enumerate all subdocuments. + * The enumerator callback should return true to continue enumerating, or + * false to stop. This will never get passed a null aDocument. + */ +pub type nsIDocument_nsSubDocEnumFunc = + ::std::option::Option<unsafe extern "C" fn(aDocument: *mut nsIDocument, + aData: + *mut ::std::os::raw::c_void) + -> bool>; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_ElementsFromPointFlags { + IGNORE_ROOT_SCROLL_FRAME = 1, + FLUSH_LAYOUT = 2, + IS_ELEMENT_FROM_POINT = 4, +} +/** + * A class that represents an external resource load that has begun but + * doesn't have a document yet. Observers can be registered on this object, + * and will be notified after the document is created. Observers registered + * after the document has been created will NOT be notified. When observers + * are notified, the subject will be the newly-created document, the topic + * will be "external-resource-document-created", and the data will be null. + * If document creation fails for some reason, observers will still be + * notified, with a null document pointer. + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsIDocument_ExternalResourceLoad { + pub _base: nsISupports, + pub mObservers: [u64; 10usize], +} +#[test] +fn bindgen_test_layout_nsIDocument_ExternalResourceLoad() { + assert_eq!(::std::mem::size_of::<nsIDocument_ExternalResourceLoad>() , + 88usize); + assert_eq!(::std::mem::align_of::<nsIDocument_ExternalResourceLoad>() , + 8usize); +} +pub type nsIDocument_ActivityObserverEnumerator = + ::std::option::Option<unsafe extern "C" fn(arg1: *mut nsISupports, + arg2: + *mut ::std::os::raw::c_void)>; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_SuppressionType { eAnimationsOnly = 1, eEvents = 3, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_DocumentTheme { + Doc_Theme_Uninitialized = 0, + Doc_Theme_None = 1, + Doc_Theme_Neutral = 2, + Doc_Theme_Dark = 3, + Doc_Theme_Bright = 4, +} +pub type nsIDocument_FrameRequestCallbackList = + nsTArray<RefPtr<FrameRequestCallback>>; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument__bindgen_ty_bindgen_id_107679 { REQUEST_DISCARD = 1, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_DeprecatedOperations { + eGetAttributeNode = 0, + eSetAttributeNode = 1, + eGetAttributeNodeNS = 2, + eSetAttributeNodeNS = 3, + eRemoveAttributeNode = 4, + eCreateAttribute = 5, + eCreateAttributeNS = 6, + eNodeValue = 7, + eTextContent = 8, + eEnablePrivilege = 9, + eDOMExceptionCode = 10, + eNoExposedProps = 11, + eMutationEvent = 12, + eComponents = 13, + ePrefixedVisibilityAPI = 14, + eNodeIteratorDetach = 15, + eLenientThis = 16, + eGetPreventDefault = 17, + eGetSetUserData = 18, + eMozGetAsFile = 19, + eUseOfCaptureEvents = 20, + eUseOfReleaseEvents = 21, + eUseOfDOM3LoadMethod = 22, + eShowModalDialog = 23, + eWindow_Content = 24, + eSyncXMLHttpRequest = 25, + eDataContainerEvent = 26, + eWindow_Controllers = 27, + eImportXULIntoContent = 28, + ePannerNodeDoppler = 29, + eNavigatorGetUserMedia = 30, + eWebrtcDeprecatedPrefix = 31, + eRTCPeerConnectionGetStreams = 32, + eAppCache = 33, + ePrefixedImageSmoothingEnabled = 34, + ePrefixedFullscreenAPI = 35, + eLenientSetter = 36, + eFileLastModifiedDate = 37, + eDeprecatedOperationCount = 38, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_DocumentWarnings { + eIgnoringWillChangeOverBudget = 0, + ePreventDefaultFromPassiveListener = 1, + eDocumentWarningCount = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_ElementCallbackType { + eCreated = 0, + eAttached = 1, + eDetached = 2, + eAttributeChanged = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_Type { + eUnknown = 0, + eHTML = 1, + eXHTML = 2, + eGenericXML = 3, + eSVG = 4, + eXUL = 5, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_Tri { eTriUnset = 0, eTriFalse = 1, eTriTrue = 2, } +#[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayHeader { - pub mLength: u32, - pub _bitfield_1: u32, +pub struct nsIDocument_FrameRequest { + pub _address: u8, } -impl nsTArrayHeader { +impl Clone for nsIDocument_FrameRequest { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_nsIDocument() { + assert_eq!(::std::mem::size_of::<nsIDocument>() , 912usize); + assert_eq!(::std::mem::align_of::<nsIDocument>() , 8usize); +} +impl nsIDocument { #[inline] - pub fn mCapacity(&self) -> u32 { - (self._bitfield_1 & (2147483647usize as u32)) >> 0usize + pub fn mBidiEnabled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u64)) >> + 0u32) as u8) + } } #[inline] - pub fn set_mCapacity(&mut self, val: u32) { - self._bitfield_1 &= !(2147483647usize as u32); + pub fn set_mBidiEnabled(&mut self, val: bool) { + self._bitfield_1 &= !(1usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 0u32) & (1usize as u64); + } + #[inline] + pub fn mMathMLEnabled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u64)) >> + 1u32) as u8) + } + } + #[inline] + pub fn set_mMathMLEnabled(&mut self, val: bool) { + self._bitfield_1 &= !(2usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 1u32) & (2usize as u64); + } + #[inline] + pub fn mIsInitialDocumentInWindow(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4usize as u64)) >> + 2u32) as u8) + } + } + #[inline] + pub fn set_mIsInitialDocumentInWindow(&mut self, val: bool) { + self._bitfield_1 &= !(4usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 2u32) & (4usize as u64); + } + #[inline] + pub fn mLoadedAsData(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8usize as u64)) >> + 3u32) as u8) + } + } + #[inline] + pub fn set_mLoadedAsData(&mut self, val: bool) { + self._bitfield_1 &= !(8usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 3u32) & (8usize as u64); + } + #[inline] + pub fn mLoadedAsInteractiveData(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16usize as u64)) >> + 4u32) as u8) + } + } + #[inline] + pub fn set_mLoadedAsInteractiveData(&mut self, val: bool) { + self._bitfield_1 &= !(16usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 4u32) & (16usize as u64); + } + #[inline] + pub fn mMayStartLayout(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32usize as u64)) >> + 5u32) as u8) + } + } + #[inline] + pub fn set_mMayStartLayout(&mut self, val: bool) { + self._bitfield_1 &= !(32usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 5u32) & (32usize as u64); + } + #[inline] + pub fn mHaveFiredTitleChange(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (64usize as u64)) >> + 6u32) as u8) + } + } + #[inline] + pub fn set_mHaveFiredTitleChange(&mut self, val: bool) { + self._bitfield_1 &= !(64usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 6u32) & (64usize as u64); + } + #[inline] + pub fn mIsShowing(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (128usize as u64)) >> + 7u32) as u8) + } + } + #[inline] + pub fn set_mIsShowing(&mut self, val: bool) { + self._bitfield_1 &= !(128usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 7u32) & (128usize as u64); + } + #[inline] + pub fn mVisible(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (256usize as u64)) >> + 8u32) as u8) + } + } + #[inline] + pub fn set_mVisible(&mut self, val: bool) { + self._bitfield_1 &= !(256usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 8u32) & (256usize as u64); + } + #[inline] + pub fn mRemovedFromDocShell(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (512usize as u64)) >> + 9u32) as u8) + } + } + #[inline] + pub fn set_mRemovedFromDocShell(&mut self, val: bool) { + self._bitfield_1 &= !(512usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 9u32) & (512usize as u64); + } + #[inline] + pub fn mAllowDNSPrefetch(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1024usize as u64)) >> + 10u32) as u8) + } + } + #[inline] + pub fn set_mAllowDNSPrefetch(&mut self, val: bool) { + self._bitfield_1 &= !(1024usize as u64); self._bitfield_1 |= - ((val as u32) << 0usize) & (2147483647usize as u32); + ((val as u8 as u64) << 10u32) & (1024usize as u64); } #[inline] - pub fn mIsAutoArray(&self) -> u32 { - (self._bitfield_1 & (2147483648usize as u32)) >> 31usize + pub fn mIsStaticDocument(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2048usize as u64)) >> + 11u32) as u8) + } } #[inline] - pub fn set_mIsAutoArray(&mut self, val: bool) { - self._bitfield_1 &= !(2147483648usize as u32); + pub fn set_mIsStaticDocument(&mut self, val: bool) { + self._bitfield_1 &= !(2048usize as u64); self._bitfield_1 |= - ((val as u32) << 31usize) & (2147483648usize as u32); + ((val as u8 as u64) << 11u32) & (2048usize as u64); } #[inline] - pub fn new_bitfield_1(mCapacity: u32, mIsAutoArray: bool) -> u32 { - 0 | ((mCapacity as u32) << 0u32) | ((mIsAutoArray as u32) << 31u32) + pub fn mCreatingStaticClone(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4096usize as u64)) >> + 12u32) as u8) + } + } + #[inline] + pub fn set_mCreatingStaticClone(&mut self, val: bool) { + self._bitfield_1 &= !(4096usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 12u32) & (4096usize as u64); + } + #[inline] + pub fn mInUnlinkOrDeletion(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8192usize as u64)) >> + 13u32) as u8) + } + } + #[inline] + pub fn set_mInUnlinkOrDeletion(&mut self, val: bool) { + self._bitfield_1 &= !(8192usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 13u32) & (8192usize as u64); + } + #[inline] + pub fn mHasHadScriptHandlingObject(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16384usize as u64)) >> + 14u32) as u8) + } + } + #[inline] + pub fn set_mHasHadScriptHandlingObject(&mut self, val: bool) { + self._bitfield_1 &= !(16384usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 14u32) & (16384usize as u64); + } + #[inline] + pub fn mIsBeingUsedAsImage(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32768usize as u64)) >> + 15u32) as u8) + } + } + #[inline] + pub fn set_mIsBeingUsedAsImage(&mut self, val: bool) { + self._bitfield_1 &= !(32768usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 15u32) & (32768usize as u64); + } + #[inline] + pub fn mIsSyntheticDocument(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (65536usize as u64)) >> + 16u32) as u8) + } + } + #[inline] + pub fn set_mIsSyntheticDocument(&mut self, val: bool) { + self._bitfield_1 &= !(65536usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 16u32) & (65536usize as u64); + } + #[inline] + pub fn mHasLinksToUpdate(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (131072usize as u64)) + >> 17u32) as u8) + } + } + #[inline] + pub fn set_mHasLinksToUpdate(&mut self, val: bool) { + self._bitfield_1 &= !(131072usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 17u32) & (131072usize as u64); + } + #[inline] + pub fn mNeedLayoutFlush(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (262144usize as u64)) + >> 18u32) as u8) + } + } + #[inline] + pub fn set_mNeedLayoutFlush(&mut self, val: bool) { + self._bitfield_1 &= !(262144usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 18u32) & (262144usize as u64); + } + #[inline] + pub fn mNeedStyleFlush(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (524288usize as u64)) + >> 19u32) as u8) + } + } + #[inline] + pub fn set_mNeedStyleFlush(&mut self, val: bool) { + self._bitfield_1 &= !(524288usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 19u32) & (524288usize as u64); + } + #[inline] + pub fn mMayHaveDOMMutationObservers(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1048576usize as u64)) + >> 20u32) as u8) + } + } + #[inline] + pub fn set_mMayHaveDOMMutationObservers(&mut self, val: bool) { + self._bitfield_1 &= !(1048576usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 20u32) & (1048576usize as u64); + } + #[inline] + pub fn mMayHaveAnimationObservers(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2097152usize as u64)) + >> 21u32) as u8) + } + } + #[inline] + pub fn set_mMayHaveAnimationObservers(&mut self, val: bool) { + self._bitfield_1 &= !(2097152usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 21u32) & (2097152usize as u64); + } + #[inline] + pub fn mHasMixedActiveContentLoaded(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4194304usize as u64)) + >> 22u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedActiveContentLoaded(&mut self, val: bool) { + self._bitfield_1 &= !(4194304usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 22u32) & (4194304usize as u64); + } + #[inline] + pub fn mHasMixedActiveContentBlocked(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8388608usize as u64)) + >> 23u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedActiveContentBlocked(&mut self, val: bool) { + self._bitfield_1 &= !(8388608usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 23u32) & (8388608usize as u64); + } + #[inline] + pub fn mHasMixedDisplayContentLoaded(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16777216usize as u64)) + >> 24u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedDisplayContentLoaded(&mut self, val: bool) { + self._bitfield_1 &= !(16777216usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 24u32) & (16777216usize as u64); + } + #[inline] + pub fn mHasMixedDisplayContentBlocked(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (33554432usize as u64)) + >> 25u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedDisplayContentBlocked(&mut self, val: bool) { + self._bitfield_1 &= !(33554432usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 25u32) & (33554432usize as u64); + } + #[inline] + pub fn mHasMixedContentObjectSubrequest(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (67108864usize as u64)) + >> 26u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedContentObjectSubrequest(&mut self, val: bool) { + self._bitfield_1 &= !(67108864usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 26u32) & (67108864usize as u64); + } + #[inline] + pub fn mHasCSP(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (134217728usize as u64)) >> 27u32) as + u8) + } + } + #[inline] + pub fn set_mHasCSP(&mut self, val: bool) { + self._bitfield_1 &= !(134217728usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 27u32) & (134217728usize as u64); + } + #[inline] + pub fn mHasUnsafeEvalCSP(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (268435456usize as u64)) >> 28u32) as + u8) + } + } + #[inline] + pub fn set_mHasUnsafeEvalCSP(&mut self, val: bool) { + self._bitfield_1 &= !(268435456usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 28u32) & (268435456usize as u64); + } + #[inline] + pub fn mHasUnsafeInlineCSP(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (536870912usize as u64)) >> 29u32) as + u8) + } + } + #[inline] + pub fn set_mHasUnsafeInlineCSP(&mut self, val: bool) { + self._bitfield_1 &= !(536870912usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 29u32) & (536870912usize as u64); + } + #[inline] + pub fn mHasTrackingContentBlocked(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (1073741824usize as u64)) >> 30u32) as + u8) + } + } + #[inline] + pub fn set_mHasTrackingContentBlocked(&mut self, val: bool) { + self._bitfield_1 &= !(1073741824usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 30u32) & (1073741824usize as u64); + } + #[inline] + pub fn mHasTrackingContentLoaded(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483648usize as u64)) >> 31u32) as + u8) + } + } + #[inline] + pub fn set_mHasTrackingContentLoaded(&mut self, val: bool) { + self._bitfield_1 &= !(2147483648usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 31u32) & (2147483648usize as u64); + } + #[inline] + pub fn mBFCacheDisallowed(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4294967296usize as u64)) >> 32u32) as + u8) + } + } + #[inline] + pub fn set_mBFCacheDisallowed(&mut self, val: bool) { + self._bitfield_1 &= !(4294967296usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 32u32) & (4294967296usize as u64); + } + #[inline] + pub fn mHasHadDefaultView(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (8589934592usize as u64)) >> 33u32) as + u8) + } + } + #[inline] + pub fn set_mHasHadDefaultView(&mut self, val: bool) { + self._bitfield_1 &= !(8589934592usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 33u32) & (8589934592usize as u64); + } + #[inline] + pub fn mStyleSheetChangeEventsEnabled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (17179869184usize as u64)) >> 34u32) + as u8) + } + } + #[inline] + pub fn set_mStyleSheetChangeEventsEnabled(&mut self, val: bool) { + self._bitfield_1 &= !(17179869184usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 34u32) & (17179869184usize as u64); + } + #[inline] + pub fn mIsSrcdocDocument(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (34359738368usize as u64)) >> 35u32) + as u8) + } + } + #[inline] + pub fn set_mIsSrcdocDocument(&mut self, val: bool) { + self._bitfield_1 &= !(34359738368usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 35u32) & (34359738368usize as u64); + } + #[inline] + pub fn mDidDocumentOpen(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (68719476736usize as u64)) >> 36u32) + as u8) + } + } + #[inline] + pub fn set_mDidDocumentOpen(&mut self, val: bool) { + self._bitfield_1 &= !(68719476736usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 36u32) & (68719476736usize as u64); + } + #[inline] + pub fn mHasDisplayDocument(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (137438953472usize as u64)) >> 37u32) + as u8) + } + } + #[inline] + pub fn set_mHasDisplayDocument(&mut self, val: bool) { + self._bitfield_1 &= !(137438953472usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 37u32) & (137438953472usize as u64); + } + #[inline] + pub fn mFontFaceSetDirty(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (274877906944usize as u64)) >> 38u32) + as u8) + } + } + #[inline] + pub fn set_mFontFaceSetDirty(&mut self, val: bool) { + self._bitfield_1 &= !(274877906944usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 38u32) & (274877906944usize as u64); + } + #[inline] + pub fn mGetUserFontSetCalled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (549755813888usize as u64)) >> 39u32) + as u8) + } + } + #[inline] + pub fn set_mGetUserFontSetCalled(&mut self, val: bool) { + self._bitfield_1 &= !(549755813888usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 39u32) & (549755813888usize as u64); + } + #[inline] + pub fn mPostedFlushUserFontSet(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (1099511627776usize as u64)) >> 40u32) + as u8) + } + } + #[inline] + pub fn set_mPostedFlushUserFontSet(&mut self, val: bool) { + self._bitfield_1 &= !(1099511627776usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 40u32) & (1099511627776usize as u64); + } + #[inline] + pub fn mEverInForeground(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2199023255552usize as u64)) >> 41u32) + as u8) + } + } + #[inline] + pub fn set_mEverInForeground(&mut self, val: bool) { + self._bitfield_1 &= !(2199023255552usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 41u32) & (2199023255552usize as u64); + } + #[inline] + pub fn mMayHavePluginFramesForPrinting(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4398046511104usize as u64)) >> 42u32) + as u8) + } + } + #[inline] + pub fn set_mMayHavePluginFramesForPrinting(&mut self, val: bool) { + self._bitfield_1 &= !(4398046511104usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 42u32) & (4398046511104usize as u64); + } + #[inline] + pub fn mDidFireDOMContentLoaded(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_2 & (1usize as u8)) >> + 0u32) as u8) + } + } + #[inline] + pub fn set_mDidFireDOMContentLoaded(&mut self, val: bool) { + self._bitfield_2 &= !(1usize as u8); + self._bitfield_2 |= ((val as u8 as u8) << 0u32) & (1usize as u8); + } + #[inline] + pub fn mHasScrollLinkedEffect(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_2 & (2usize as u8)) >> + 1u32) as u8) + } + } + #[inline] + pub fn set_mHasScrollLinkedEffect(&mut self, val: bool) { + self._bitfield_2 &= !(2usize as u8); + self._bitfield_2 |= ((val as u8 as u8) << 1u32) & (2usize as u8); } } -impl ::std::clone::Clone for nsTArrayHeader { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_nsTArrayHeader() { - assert_eq!(::std::mem::size_of::<nsTArrayHeader>() , 8usize); - assert_eq!(::std::mem::align_of::<nsTArrayHeader>() , 4usize); -} -extern "C" { - #[link_name = "_ZN14nsTArrayHeader9sEmptyHdrE"] - pub static mut nsTArrayHeader_consts_sEmptyHdr: nsTArrayHeader; -} +/** + * An internal interface that abstracts some DOMNode-related parts that both + * nsIContent and nsIDocument share. An instance of this interface has a list + * of nsIContent children and provides access to them. + */ #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsTArray_SafeElementAtHelper<E, Derived> { - pub _phantom0: ::std::marker::PhantomData<E>, - pub _phantom1: ::std::marker::PhantomData<Derived>, -} +#[derive(Debug)] +pub struct nsINode { + pub _base: EventTarget, + pub mNodeInfo: RefPtr<NodeInfo>, + pub mParent: *mut nsINode, + pub mBoolFlags: u32, + pub mNextSibling: *mut nsIContent, + pub mPreviousSibling: *mut nsIContent, + pub mFirstChild: *mut nsIContent, + pub __bindgen_anon_1: nsINode__bindgen_ty_bindgen_id_104382, + pub mSlots: *mut nsINode_nsSlots, + pub mServoNodeData: UniquePtr<ServoNodeData, + DefaultDelete<ServoNodeData>>, +} +pub type nsINode_BoxQuadOptions = BoxQuadOptions; +pub type nsINode_ConvertCoordinateOptions = ConvertCoordinateOptions; +pub type nsINode_DOMPoint = DOMPoint; +pub type nsINode_DOMPointInit = DOMPointInit; +pub type nsINode_DOMQuad = DOMQuad; +pub type nsINode_DOMRectReadOnly = DOMRectReadOnly; +pub type nsINode_OwningNodeOrString = OwningNodeOrString; +pub type nsINode_TextOrElementOrDocument = TextOrElementOrDocument; +pub type nsINode_ErrorResult = ErrorResult; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsTArray_SafeElementAtSmartPtrHelper<E, Derived> { - pub _phantom0: ::std::marker::PhantomData<E>, - pub _phantom1: ::std::marker::PhantomData<Derived>, +pub struct nsINode_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +/** + * Bit-flags to pass (or'ed together) to IsNodeOfType() + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsINode__bindgen_ty_bindgen_id_100513 { + eCONTENT = 1, + eDOCUMENT = 2, + eATTRIBUTE = 4, + eTEXT = 8, + ePROCESSING_INSTRUCTION = 16, + eCOMMENT = 32, + eHTML_FORM_CONTROL = 64, + eDOCUMENT_FRAGMENT = 128, + eDATA_NODE = 256, + eMEDIA = 512, + eANIMATION = 1024, + eFILTER = 2048, } #[repr(C)] -#[derive(Debug)] -pub struct nsTArray_base<Alloc, Copy> { - pub mHdr: *mut nsTArrayHeader, - pub _phantom0: ::std::marker::PhantomData<Alloc>, - pub _phantom1: ::std::marker::PhantomData<Copy>, +pub struct bindgen_vtable__bindgen_id_101282 { } #[repr(C)] #[derive(Debug)] -pub struct nsTArray_base_IsAutoArrayRestorer<Alloc, Copy> { - pub mArray: *mut nsTArray_base<Alloc, Copy>, - pub mElemAlign: usize, - pub mIsAuto: bool, - pub _phantom0: ::std::marker::PhantomData<Copy>, +pub struct nsINode_nsSlots { + pub vtable_: *const bindgen_vtable__bindgen_id_101282, + /** + * A list of mutation observers + */ + pub mMutationObservers: [u64; 2usize], + /** + * An object implementing nsIDOMNodeList for this content (childNodes) + * @see nsIDOMNodeList + * @see nsGenericHTMLElement::GetChildNodes + */ + pub mChildNodes: RefPtr<nsChildContentList>, + /** + * Weak reference to this node. This is cleared by the destructor of + * nsNodeWeakReference. + */ + pub mWeakReference: *mut nsNodeWeakReference, + /** + * Number of descendant nodes in the uncomposed document that have been + * explicitly set as editable. + */ + pub mEditableDescendantCount: u32, } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsDefaultComparator<A, B> { - pub _phantom0: ::std::marker::PhantomData<A>, - pub _phantom1: ::std::marker::PhantomData<B>, +#[test] +fn bindgen_test_layout_nsINode_nsSlots() { + assert_eq!(::std::mem::size_of::<nsINode_nsSlots>() , 48usize); + assert_eq!(::std::mem::align_of::<nsINode_nsSlots>() , 8usize); +} +#[repr(u32)] +/** + * Boolean flags + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsINode_BooleanFlag { + NodeHasRenderingObservers = 0, + IsInDocument = 1, + ParentIsContent = 2, + NodeIsElement = 3, + ElementHasID = 4, + ElementMayHaveStyle = 5, + ElementHasName = 6, + ElementMayHaveContentEditableAttr = 7, + NodeIsCommonAncestorForRangeInSelection = 8, + NodeIsDescendantOfCommonAncestorForRangeInSelection = 9, + NodeIsCCMarkedRoot = 10, + NodeIsCCBlackTree = 11, + NodeIsPurpleRoot = 12, + NodeHasExplicitBaseURI = 13, + ElementHasLockedStyleStates = 14, + ElementHasPointerLock = 15, + NodeMayHaveDOMMutationObserver = 16, + NodeIsContent = 17, + ElementHasAnimations = 18, + NodeHasValidDirAttribute = 19, + NodeHasFixedDir = 20, + NodeHasDirAutoSet = 21, + NodeHasTextNodeDirectionalityMap = 22, + NodeHasDirAuto = 23, + NodeAncestorHasDirAuto = 24, + ElementIsInStyleScope = 25, + ElementIsScopedStyleRoot = 26, + NodeHandlingClick = 27, + NodeHasRelevantHoverRules = 28, + ElementHasWeirdParserInsertionMode = 29, + ParserHasNotified = 30, + MayBeApzAware = 31, + BooleanFlagCount = 32, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArray_CopyWithMemutils; -impl ::std::clone::Clone for nsTArray_CopyWithMemutils { +pub struct nsINode__bindgen_ty_bindgen_id_104382 { + 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::<nsINode__bindgen_ty_bindgen_id_104382>() + , 8usize); + assert_eq!(::std::mem::align_of::<nsINode__bindgen_ty_bindgen_id_104382>() + , 8usize); +} +impl Clone for nsINode__bindgen_ty_bindgen_id_104382 { fn clone(&self) -> Self { *self } } -extern "C" { - #[link_name = "_ZN25nsTArray_CopyWithMemutils12allowReallocE"] - pub static nsTArray_CopyWithMemutils_consts_allowRealloc: bool; +#[test] +fn bindgen_test_layout_nsINode() { + assert_eq!(::std::mem::size_of::<nsINode>() , 104usize); + assert_eq!(::std::mem::align_of::<nsINode>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsTArray_CopyWithConstructors<ElemType> { - pub _phantom0: ::std::marker::PhantomData<ElemType>, +#[derive(Debug)] +pub struct EventTarget { + pub _base: nsIDOMEventTarget, + pub _base_1: nsWrapperCache, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsTArray_CopyChooser<E> { - pub _phantom0: ::std::marker::PhantomData<E>, +pub struct EventTarget_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsTArray_TypedBase<E, Derived> { - pub _base: nsTArray_SafeElementAtHelper<E, Derived>, - pub _phantom0: ::std::marker::PhantomData<Derived>, +#[test] +fn bindgen_test_layout_EventTarget() { + assert_eq!(::std::mem::size_of::<EventTarget>() , 32usize); + assert_eq!(::std::mem::align_of::<EventTarget>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ItemComparatorEq<Item, Comparator> { - pub mItem: *const Item, - pub mComp: *const Comparator, +#[derive(Debug, Copy)] +pub struct nsIDOMEventTarget { + pub _base: nsISupports, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct ItemComparatorFirstElementGT<Item, Comparator> { - pub mItem: *const Item, - pub mComp: *const Comparator, +pub struct nsIDOMEventTarget_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIDOMEventTarget() { + assert_eq!(::std::mem::size_of::<nsIDOMEventTarget>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMEventTarget>() , 8usize); +} +impl Clone for nsIDOMEventTarget { + fn clone(&self) -> Self { *self } } /** - * <div rustbindgen replaces="nsTArray"></div> + * Smart pointer class that can hold a pointer to either an nsStyleSet + * or a ServoStyleSet. */ #[repr(C)] -#[derive(Debug)] -pub struct nsTArray<T> { - pub mBuffer: *mut T, +#[derive(Debug, Copy)] +pub struct StyleSetHandle { + pub mPtr: StyleSetHandle_Ptr, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCOMPtr_helper { - pub _vftable: *const _vftable_nsCOMPtr_helper, +pub struct StyleSetHandle_Ptr { + pub mValue: usize, } -#[repr(C)] -pub struct _vftable_nsCOMPtr_helper { - pub _bindgen_empty_ctype_warning_fix: u64, +#[test] +fn bindgen_test_layout_StyleSetHandle_Ptr() { + assert_eq!(::std::mem::size_of::<StyleSetHandle_Ptr>() , 8usize); + assert_eq!(::std::mem::align_of::<StyleSetHandle_Ptr>() , 8usize); } -impl ::std::clone::Clone for nsCOMPtr_helper { +impl Clone for StyleSetHandle_Ptr { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsCOMPtr_helper() { - assert_eq!(::std::mem::size_of::<nsCOMPtr_helper>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCOMPtr_helper>() , 8usize); +fn bindgen_test_layout_StyleSetHandle() { + assert_eq!(::std::mem::size_of::<StyleSetHandle>() , 8usize); + assert_eq!(::std::mem::align_of::<StyleSetHandle>() , 8usize); +} +impl Clone for StyleSetHandle { + fn clone(&self) -> Self { *self } } +#[repr(i32)] +/** + * Enumeration that represents one of the two supported style system backends. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum StyleBackendType { Gecko = 1, Servo = 2, } +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum SheetType { + Agent = 0, + User = 1, + PresHint = 2, + SVGAttrAnimation = 3, + Doc = 4, + ScopedDoc = 5, + StyleAttr = 6, + Override = 7, + Animation = 8, + Transition = 9, + Count = 10, + Unknown = 255, +} +/** + * Smart pointer class that can hold a pointer to either a CSSStyleSheet + * or a ServoStyleSheet. + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsQueryInterface { - pub mRawPtr: *mut nsISupports, +pub struct StyleSheetHandle { + pub mPtr: StyleSheetHandle_Ptr, +} +pub type StyleSheetHandle_RefPtr = HandleRefPtr<StyleSheetHandle>; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct StyleSheetHandle_Ptr { + pub mValue: usize, +} +#[test] +fn bindgen_test_layout_StyleSheetHandle_Ptr() { + assert_eq!(::std::mem::size_of::<StyleSheetHandle_Ptr>() , 8usize); + assert_eq!(::std::mem::align_of::<StyleSheetHandle_Ptr>() , 8usize); } -impl ::std::clone::Clone for nsQueryInterface { +impl Clone for StyleSheetHandle_Ptr { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsQueryInterface() { - assert_eq!(::std::mem::size_of::<nsQueryInterface>() , 8usize); - assert_eq!(::std::mem::align_of::<nsQueryInterface>() , 8usize); +fn bindgen_test_layout_StyleSheetHandle() { + assert_eq!(::std::mem::size_of::<StyleSheetHandle>() , 8usize); + assert_eq!(::std::mem::align_of::<StyleSheetHandle>() , 8usize); +} +impl Clone for StyleSheetHandle { + fn clone(&self) -> Self { *self } +} +pub const ReferrerPolicy_RP_Default: ReferrerPolicy = + ReferrerPolicy::RP_No_Referrer_When_Downgrade; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum ReferrerPolicy { + RP_No_Referrer = 1, + RP_Origin = 2, + RP_No_Referrer_When_Downgrade = 0, + RP_Origin_When_Crossorigin = 3, + RP_Unsafe_URL = 4, + RP_Unset = 4294967295, } +/** + * EventStates is the class used to represent the event states of nsIContent + * instances. These states are calculated by IntrinsicState() and + * ContentStatesChanged() has to be called when one of them changes thus + * informing the layout/style engine of the change. + * Event states are associated with pseudo-classes. + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsQueryInterfaceWithError { - pub mRawPtr: *mut nsISupports, - pub mErrorPtr: *mut nsresult, +pub struct EventStates { + pub mStates: EventStates_InternalType, } -impl ::std::clone::Clone for nsQueryInterfaceWithError { +pub type EventStates_InternalType = u64; +pub type EventStates_ServoType = u8; +#[test] +fn bindgen_test_layout_EventStates() { + assert_eq!(::std::mem::size_of::<EventStates>() , 8usize); + assert_eq!(::std::mem::align_of::<EventStates>() , 8usize); +} +impl Clone for EventStates { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsQueryInterfaceWithError() { - assert_eq!(::std::mem::size_of::<nsQueryInterfaceWithError>() , 16usize); - assert_eq!(::std::mem::align_of::<nsQueryInterfaceWithError>() , 8usize); +#[repr(u32)] +/** + * |nsRestyleHint| is a bitfield for the result of + * |HasStateDependentStyle| and |HasAttributeDependentStyle|. When no + * restyling is necessary, use |nsRestyleHint(0)|. + * + * Without eRestyle_Force or eRestyle_ForceDescendants, the restyling process + * can stop processing at a frame when it detects no style changes and it is + * known that the styles of the subtree beneath it will not change, leaving + * the old style context on the frame. eRestyle_Force can be used to skip this + * optimization on a frame, and to force its new style context to be used. + * + * Similarly, eRestyle_ForceDescendants will cause the frame and all of its + * descendants to be traversed and for the new style contexts that are created + * to be set on the frames. + * + * NOTE: When adding new restyle hints, please also add them to + * RestyleManager::RestyleHintToString. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsRestyleHint { + eRestyle_Self = 1, + eRestyle_SomeDescendants = 2, + eRestyle_Subtree = 4, + eRestyle_LaterSiblings = 8, + eRestyle_CSSTransitions = 16, + eRestyle_CSSAnimations = 32, + eRestyle_SVGAttrAnimations = 64, + eRestyle_StyleAttribute = 128, + eRestyle_StyleAttribute_Animations = 256, + eRestyle_Force = 512, + eRestyle_ForceDescendants = 1024, + eRestyle_AllHintsWithAnimations = 368, } -//////////////////////////////////////////////////////////////////////////// #[repr(C)] #[derive(Debug, Copy)] -pub struct nsGetServiceByCID { - pub mCID: *const nsCID, +pub struct nsIObserver { + pub _base: nsISupports, } -impl ::std::clone::Clone for nsGetServiceByCID { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIObserver_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsGetServiceByCID() { - assert_eq!(::std::mem::size_of::<nsGetServiceByCID>() , 8usize); - assert_eq!(::std::mem::align_of::<nsGetServiceByCID>() , 8usize); +fn bindgen_test_layout_nsIObserver() { + assert_eq!(::std::mem::size_of::<nsIObserver>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIObserver>() , 8usize); +} +impl Clone for nsIObserver { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsCompatibility { + eCompatibility_FullStandards = 1, + eCompatibility_AlmostStandards = 2, + eCompatibility_NavQuirks = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum VisibilityState { + Hidden = 0, + Visible = 1, + Prerender = 2, + EndGuard_ = 3, } +/** + * The global object which keeps a script context for each supported script + * language. This often used to store per-window global state. + * This is a heavyweight interface implemented only by DOM globals, and + * it might go away some time in the future. + */ #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsGetServiceByCIDWithError { - pub mCID: *const nsCID, - pub mErrorPtr: *mut nsresult, +#[derive(Debug)] +pub struct nsIScriptGlobalObject { + pub _base: nsIGlobalObject, } -impl ::std::clone::Clone for nsGetServiceByCIDWithError { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIScriptGlobalObject_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsGetServiceByCIDWithError() { - assert_eq!(::std::mem::size_of::<nsGetServiceByCIDWithError>() , 16usize); - assert_eq!(::std::mem::align_of::<nsGetServiceByCIDWithError>() , 8usize); +fn bindgen_test_layout_nsIScriptGlobalObject() { + assert_eq!(::std::mem::size_of::<nsIScriptGlobalObject>() , 24usize); + assert_eq!(::std::mem::align_of::<nsIScriptGlobalObject>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsGetServiceByContractID { - pub mContractID: *const ::std::os::raw::c_char, +pub struct ShortcutKeyCandidate { + pub _address: u8, } -impl ::std::clone::Clone for nsGetServiceByContractID { +impl Clone for ShortcutKeyCandidate { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIVariant { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIVariant_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} #[test] -fn bindgen_test_layout_nsGetServiceByContractID() { - assert_eq!(::std::mem::size_of::<nsGetServiceByContractID>() , 8usize); - assert_eq!(::std::mem::align_of::<nsGetServiceByContractID>() , 8usize); +fn bindgen_test_layout_nsIVariant() { + assert_eq!(::std::mem::size_of::<nsIVariant>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIVariant>() , 8usize); +} +impl Clone for nsIVariant { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsGetServiceByContractIDWithError { - pub mContractID: *const ::std::os::raw::c_char, - pub mErrorPtr: *mut nsresult, +pub struct nsIRunnable { + pub _base: nsISupports, } -impl ::std::clone::Clone for nsGetServiceByContractIDWithError { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIRunnable_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsGetServiceByContractIDWithError() { - assert_eq!(::std::mem::size_of::<nsGetServiceByContractIDWithError>() , - 16usize); - assert_eq!(::std::mem::align_of::<nsGetServiceByContractIDWithError>() , - 8usize); +fn bindgen_test_layout_nsIRunnable() { + assert_eq!(::std::mem::size_of::<nsIRunnable>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIRunnable>() , 8usize); +} +impl Clone for nsIRunnable { + fn clone(&self) -> Self { *self } } -/** - * Factors implementation for all template versions of nsCOMPtr. - * - * Here's the way people normally do things like this: - * - * template<class T> class Foo { ... }; - * template<> class Foo<void*> { ... }; - * template<class T> class Foo<T*> : private Foo<void*> { ... }; - */ #[repr(C)] #[derive(Debug)] -pub struct nsCOMPtr_base { - pub mRawPtr: *mut nsISupports, +pub struct Runnable { + pub _base: nsIRunnable, + pub mRefCnt: ThreadSafeAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, } +pub type Runnable_HasThreadSafeRefCnt = TrueType; #[test] -fn bindgen_test_layout_nsCOMPtr_base() { - assert_eq!(::std::mem::size_of::<nsCOMPtr_base>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCOMPtr_base>() , 8usize); +fn bindgen_test_layout_Runnable() { + assert_eq!(::std::mem::size_of::<Runnable>() , 24usize); + assert_eq!(::std::mem::align_of::<Runnable>() , 8usize); } #[repr(C)] -#[derive(Debug)] -pub struct nsCOMPtr<T> { - pub mRawPtr: *mut T, +#[derive(Debug, Copy)] +pub struct nsIDOMAttr { + pub _base: nsIDOMNode, } -/** - * This class is designed to be used for anonymous temporary objects in the - * argument list of calls that return COM interface pointers, e.g., - * - * nsCOMPtr<IFoo> fooP; - * ...->QueryInterface(iid, getter_AddRefs(fooP)) - * - * DO NOT USE THIS TYPE DIRECTLY IN YOUR CODE. Use |getter_AddRefs()| instead. - * - * When initialized with a |nsCOMPtr|, as in the example above, it returns - * a |void**|, a |T**|, or an |nsISupports**| as needed, that the outer call - * (|QueryInterface| in this case) can fill in. - * - * This type should be a nested class inside |nsCOMPtr<T>|. - */ #[repr(C)] -#[derive(Debug)] -pub struct nsGetterAddRefs<T> { - pub mTargetSmartPtr: *mut nsCOMPtr<T>, +#[derive(Debug, Copy, Clone)] +pub struct nsIDOMAttr_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIDOMAttr() { + assert_eq!(::std::mem::size_of::<nsIDOMAttr>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMAttr>() , 8usize); +} +impl Clone for nsIDOMAttr { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsAutoPtr<T> { - pub mRawPtr: *mut T, +#[derive(Debug, Copy)] +pub struct nsIDOMNode { + pub _base: nsISupports, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsAutoPtr_Ptr<T> { - pub mPtr: *mut T, +pub struct nsIDOMNode_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDOMNode__bindgen_ty_bindgen_id_112514 { + ELEMENT_NODE = 1, + ATTRIBUTE_NODE = 2, + TEXT_NODE = 3, + CDATA_SECTION_NODE = 4, + ENTITY_REFERENCE_NODE = 5, + ENTITY_NODE = 6, + PROCESSING_INSTRUCTION_NODE = 7, + COMMENT_NODE = 8, + DOCUMENT_NODE = 9, + DOCUMENT_TYPE_NODE = 10, + DOCUMENT_FRAGMENT_NODE = 11, + NOTATION_NODE = 12, +} +#[test] +fn bindgen_test_layout_nsIDOMNode() { + assert_eq!(::std::mem::size_of::<nsIDOMNode>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMNode>() , 8usize); +} +impl Clone for nsIDOMNode { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsAutoPtr_Proxy<T, R, Args> { - pub mRawPtr: *mut T, - pub _phantom0: ::std::marker::PhantomData<R>, - pub _phantom1: ::std::marker::PhantomData<Args>, +#[derive(Debug, Copy)] +pub struct nsIDOMHTMLCollection { + pub _base: nsISupports, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsAutoPtrGetterTransfers<T> { - pub mTargetSmartPtr: *mut nsAutoPtr<T>, +pub struct nsIDOMHTMLCollection_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIDOMHTMLCollection() { + assert_eq!(::std::mem::size_of::<nsIDOMHTMLCollection>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMHTMLCollection>() , 8usize); +} +impl Clone for nsIDOMHTMLCollection { + fn clone(&self) -> Self { *self } } -/** - * This structure precedes the string buffers "we" allocate. It may be the - * case that nsTAString::mData does not point to one of these special - * buffers. The mFlags member variable distinguishes the buffer type. - * - * When this header is in use, it enables reference counting, and capacity - * tracking. NOTE: A string buffer can be modified only if its reference - * count is 1. - */ #[repr(C)] -#[derive(Debug)] -pub struct nsStringBuffer { - pub mRefCount: u32, - pub mStorageSize: u32, +#[derive(Debug, Copy)] +pub struct nsIControllers { + pub _address: u8, } -#[test] -fn bindgen_test_layout_nsStringBuffer() { - assert_eq!(::std::mem::size_of::<nsStringBuffer>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStringBuffer>() , 4usize); +impl Clone for nsIControllers { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsPresContext { + pub _base: nsIObserver, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mType: nsPresContext_nsPresContextType, + pub mShell: *mut nsIPresShell, + pub mDocument: nsCOMPtr<nsIDocument>, + pub mDeviceContext: RefPtr<nsDeviceContext>, + pub mEventManager: RefPtr<EventStateManager>, + pub mRefreshDriver: RefPtr<nsRefreshDriver>, + pub mEffectCompositor: RefPtr<EffectCompositor>, + pub mTransitionManager: RefPtr<nsTransitionManager>, + pub mAnimationManager: RefPtr<nsAnimationManager>, + pub mRestyleManager: RestyleManagerHandle_RefPtr, + pub mCounterStyleManager: RefPtr<CounterStyleManager>, + pub mMedium: *mut nsIAtom, + pub mMediaEmulated: nsCOMPtr<nsIAtom>, + pub mLinkHandler: *mut nsILinkHandler, + pub mLanguage: nsCOMPtr<nsIAtom>, + pub mInflationDisabledForShrinkWrap: bool, + pub mContainer: u64, + pub mBaseMinFontSize: i32, + pub mTextZoom: f32, + pub mFullZoom: f32, + pub mOverrideDPPX: f32, + pub mLastFontInflationScreenSize: [u64; 2usize], + pub mCurAppUnitsPerDevPixel: i32, + pub mAutoQualityMinFontSizePixelsPref: i32, + pub mTheme: nsCOMPtr<nsITheme>, + pub mLangService: nsCOMPtr<nsILanguageAtomService>, + pub mPrintSettings: nsCOMPtr<nsIPrintSettings>, + pub mPrefChangedTimer: nsCOMPtr<nsITimer>, + pub mPropertyTable: nsPresContext_FramePropertyTable, + pub mInvalidateRequestsSinceLastPaint: nsInvalidateRequestList, + pub mUndeliveredInvalidateRequestsBeforeLastPaint: nsInvalidateRequestList, + pub mTextPerf: nsAutoPtr<gfxTextPerfMetrics>, + pub mMissingFonts: nsAutoPtr<gfxMissingFontRecorder>, + pub mVisibleArea: nsRect, + pub mPageSize: nsSize, + pub mPageScale: f32, + pub mPPScale: f32, + pub mDefaultColor: nscolor, + pub mBackgroundColor: nscolor, + pub mLinkColor: nscolor, + pub mActiveLinkColor: nscolor, + pub mVisitedLinkColor: nscolor, + pub mFocusBackgroundColor: nscolor, + pub mFocusTextColor: nscolor, + pub mBodyTextColor: nscolor, + pub mViewportStyleScrollbar: nsPresContext_ScrollbarStyles, + pub mFocusRingWidth: u8, + pub mExistThrottledUpdates: bool, + pub mImageAnimationMode: u16, + pub mImageAnimationModePref: u16, + pub mLangGroupFontPrefs: nsPresContext_LangGroupFontPrefs, + pub mBorderWidthTable: [nscoord; 3usize], + pub mInterruptChecksToSkip: u32, + pub mElementsRestyled: u64, + pub mFramesConstructed: u64, + pub mFramesReflowed: u64, + pub mReflowStartTime: TimeStamp, + pub mLastStyleUpdateForAllAnimations: TimeStamp, + pub _bitfield_1: u64, + pub mRestyleLoggingEnabled: bool, + pub mInitialized: bool, + pub mLayoutPhaseCount: [u32; 3usize], } +pub type nsPresContext_FramePropertyTable = FramePropertyTable; +pub type nsPresContext_LangGroupFontPrefs = LangGroupFontPrefs; +pub type nsPresContext_ScrollbarStyles = ScrollbarStyles; +pub type nsPresContext_StaticPresData = StaticPresData; +pub type nsPresContext_HasThreadSafeRefCnt = FalseType; #[repr(C)] #[derive(Debug, Copy)] -pub struct nsIAtom { - pub _base: nsISupports, - pub _bitfield_1: u32, - pub mHash: u32, - /** - * WARNING! There is an invisible constraint on |mString|: the chars it - * points to must belong to an nsStringBuffer. This is so that the - * nsStringBuffer::FromData() calls above are valid. - */ - pub mString: *mut ::std::os::raw::c_ushort, +pub struct nsPresContext_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_nsPresContext_cycleCollection() { + assert_eq!(::std::mem::size_of::<nsPresContext_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsPresContext_cycleCollection>() , + 8usize); +} +impl Clone for nsPresContext_cycleCollection { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsPresContext_nsPresContextType { + eContext_Galley = 0, + eContext_PrintPreview = 1, + eContext_Print = 2, + eContext_PageLayout = 3, } +/** + * A class that can be used to temporarily disable reflow interruption. + */ #[repr(C)] -pub struct _vftable_nsIAtom { - pub _base: _vftable_nsISupports, +#[derive(Debug)] +pub struct nsPresContext_InterruptPreventer { + pub mCtx: *mut nsPresContext, + pub mInterruptsEnabled: bool, + pub mHasPendingInterrupt: bool, } -impl nsIAtom { +#[test] +fn bindgen_test_layout_nsPresContext_InterruptPreventer() { + assert_eq!(::std::mem::size_of::<nsPresContext_InterruptPreventer>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsPresContext_InterruptPreventer>() , + 8usize); +} +extern "C" { + #[link_name = "_ZN13nsPresContext21_cycleCollectorGlobalE"] + pub static mut nsPresContext__cycleCollectorGlobal: + nsPresContext_cycleCollection; +} +#[test] +fn bindgen_test_layout_nsPresContext() { + assert_eq!(::std::mem::size_of::<nsPresContext>() , 1184usize); + assert_eq!(::std::mem::align_of::<nsPresContext>() , 8usize); +} +impl nsPresContext { #[inline] - pub fn mLength(&self) -> u32 { - (self._bitfield_1 & (2147483647usize as u32)) >> 0usize + pub fn mHasPendingInterrupt(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u64)) >> + 0u32) as u32) + } } #[inline] - pub fn set_mLength(&mut self, val: u32) { - self._bitfield_1 &= !(2147483647usize as u32); + pub fn set_mHasPendingInterrupt(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 0u32) & (1usize as u64); + } + #[inline] + pub fn mPendingInterruptFromTest(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u64)) >> + 1u32) as u32) + } + } + #[inline] + pub fn set_mPendingInterruptFromTest(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 1u32) & (2usize as u64); + } + #[inline] + pub fn mInterruptsEnabled(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4usize as u64)) >> + 2u32) as u32) + } + } + #[inline] + pub fn set_mInterruptsEnabled(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 2u32) & (4usize as u64); + } + #[inline] + pub fn mUseDocumentFonts(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8usize as u64)) >> + 3u32) as u32) + } + } + #[inline] + pub fn set_mUseDocumentFonts(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 3u32) & (8usize as u64); + } + #[inline] + pub fn mUseDocumentColors(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16usize as u64)) >> + 4u32) as u32) + } + } + #[inline] + pub fn set_mUseDocumentColors(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(16usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 4u32) & (16usize as u64); + } + #[inline] + pub fn mUnderlineLinks(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32usize as u64)) >> + 5u32) as u32) + } + } + #[inline] + pub fn set_mUnderlineLinks(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(32usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 5u32) & (32usize as u64); + } + #[inline] + pub fn mSendAfterPaintToContent(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (64usize as u64)) >> + 6u32) as u32) + } + } + #[inline] + pub fn set_mSendAfterPaintToContent(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(64usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 6u32) & (64usize as u64); + } + #[inline] + pub fn mUseFocusColors(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (128usize as u64)) >> + 7u32) as u32) + } + } + #[inline] + pub fn set_mUseFocusColors(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(128usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 7u32) & (128usize as u64); + } + #[inline] + pub fn mFocusRingOnAnything(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (256usize as u64)) >> + 8u32) as u32) + } + } + #[inline] + pub fn set_mFocusRingOnAnything(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(256usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 8u32) & (256usize as u64); + } + #[inline] + pub fn mFocusRingStyle(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (512usize as u64)) >> + 9u32) as u32) + } + } + #[inline] + pub fn set_mFocusRingStyle(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(512usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 9u32) & (512usize as u64); + } + #[inline] + pub fn mDrawImageBackground(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1024usize as u64)) >> + 10u32) as u32) + } + } + #[inline] + pub fn set_mDrawImageBackground(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1024usize as u64); self._bitfield_1 |= - ((val as u32) << 0usize) & (2147483647usize as u32); + ((val as u32 as u64) << 10u32) & (1024usize as u64); } #[inline] - pub fn mIsStatic(&self) -> u32 { - (self._bitfield_1 & (2147483648usize as u32)) >> 31usize + pub fn mDrawColorBackground(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2048usize as u64)) >> + 11u32) as u32) + } } #[inline] - pub fn set_mIsStatic(&mut self, val: bool) { - self._bitfield_1 &= !(2147483648usize as u32); + pub fn set_mDrawColorBackground(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2048usize as u64); self._bitfield_1 |= - ((val as u32) << 31usize) & (2147483648usize as u32); + ((val as u32 as u64) << 11u32) & (2048usize as u64); } #[inline] - pub fn new_bitfield_1(mLength: u32, mIsStatic: bool) -> u32 { - 0 | ((mLength as u32) << 0u32) | ((mIsStatic as u32) << 31u32) + pub fn mNeverAnimate(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4096usize as u64)) >> + 12u32) as u32) + } + } + #[inline] + pub fn set_mNeverAnimate(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4096usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 12u32) & (4096usize as u64); + } + #[inline] + pub fn mIsRenderingOnlySelection(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8192usize as u64)) >> + 13u32) as u32) + } + } + #[inline] + pub fn set_mIsRenderingOnlySelection(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8192usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 13u32) & (8192usize as u64); + } + #[inline] + pub fn mPaginated(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16384usize as u64)) >> + 14u32) as u32) + } + } + #[inline] + pub fn set_mPaginated(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(16384usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 14u32) & (16384usize as u64); + } + #[inline] + pub fn mCanPaginatedScroll(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32768usize as u64)) >> + 15u32) as u32) + } + } + #[inline] + pub fn set_mCanPaginatedScroll(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(32768usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 15u32) & (32768usize as u64); + } + #[inline] + pub fn mDoScaledTwips(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (65536usize as u64)) >> + 16u32) as u32) + } + } + #[inline] + pub fn set_mDoScaledTwips(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(65536usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 16u32) & (65536usize as u64); + } + #[inline] + pub fn mIsRootPaginatedDocument(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (131072usize as u64)) + >> 17u32) as u32) + } + } + #[inline] + pub fn set_mIsRootPaginatedDocument(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(131072usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 17u32) & (131072usize as u64); + } + #[inline] + pub fn mPrefBidiDirection(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (262144usize as u64)) + >> 18u32) as u32) + } + } + #[inline] + pub fn set_mPrefBidiDirection(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(262144usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 18u32) & (262144usize as u64); + } + #[inline] + pub fn mPrefScrollbarSide(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1572864usize as u64)) + >> 19u32) as u32) + } + } + #[inline] + pub fn set_mPrefScrollbarSide(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1572864usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 19u32) & (1572864usize as u64); + } + #[inline] + pub fn mPendingSysColorChanged(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2097152usize as u64)) + >> 21u32) as u32) + } + } + #[inline] + pub fn set_mPendingSysColorChanged(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2097152usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 21u32) & (2097152usize as u64); + } + #[inline] + pub fn mPendingThemeChanged(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4194304usize as u64)) + >> 22u32) as u32) + } + } + #[inline] + pub fn set_mPendingThemeChanged(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4194304usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 22u32) & (4194304usize as u64); + } + #[inline] + pub fn mPendingUIResolutionChanged(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8388608usize as u64)) + >> 23u32) as u32) + } + } + #[inline] + pub fn set_mPendingUIResolutionChanged(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8388608usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 23u32) & (8388608usize as u64); + } + #[inline] + pub fn mPendingMediaFeatureValuesChanged(&self) + -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16777216usize as u64)) + >> 24u32) as u32) + } + } + #[inline] + pub fn set_mPendingMediaFeatureValuesChanged(&mut self, + val: + ::std::os::raw::c_uint) { + self._bitfield_1 &= !(16777216usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 24u32) & (16777216usize as u64); + } + #[inline] + pub fn mPrefChangePendingNeedsReflow(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (33554432usize as u64)) + >> 25u32) as u32) + } + } + #[inline] + pub fn set_mPrefChangePendingNeedsReflow(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(33554432usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 25u32) & (33554432usize as u64); + } + #[inline] + pub fn mIsEmulatingMedia(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (67108864usize as u64)) + >> 26u32) as u32) + } + } + #[inline] + pub fn set_mIsEmulatingMedia(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(67108864usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 26u32) & (67108864usize as u64); + } + #[inline] + pub fn mAllInvalidated(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (134217728usize as u64)) >> 27u32) as + u32) + } + } + #[inline] + pub fn set_mAllInvalidated(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(134217728usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 27u32) & (134217728usize as u64); + } + #[inline] + pub fn mIsGlyph(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (268435456usize as u64)) >> 28u32) as + u32) + } + } + #[inline] + pub fn set_mIsGlyph(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(268435456usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 28u32) & (268435456usize as u64); + } + #[inline] + pub fn mUsesRootEMUnits(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (536870912usize as u64)) >> 29u32) as + u32) + } + } + #[inline] + pub fn set_mUsesRootEMUnits(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(536870912usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 29u32) & (536870912usize as u64); + } + #[inline] + pub fn mUsesExChUnits(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (1073741824usize as u64)) >> 30u32) as + u32) + } + } + #[inline] + pub fn set_mUsesExChUnits(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1073741824usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 30u32) & (1073741824usize as u64); + } + #[inline] + pub fn mUsesViewportUnits(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483648usize as u64)) >> 31u32) as + u32) + } + } + #[inline] + pub fn set_mUsesViewportUnits(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2147483648usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 31u32) & (2147483648usize as u64); + } + #[inline] + pub fn mPendingViewportChange(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4294967296usize as u64)) >> 32u32) as + u32) + } + } + #[inline] + pub fn set_mPendingViewportChange(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4294967296usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 32u32) & (4294967296usize as u64); + } + #[inline] + pub fn mCounterStylesDirty(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (8589934592usize as u64)) >> 33u32) as + u32) + } + } + #[inline] + pub fn set_mCounterStylesDirty(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8589934592usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 33u32) & (8589934592usize as u64); + } + #[inline] + pub fn mPostedFlushCounterStyles(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (17179869184usize as u64)) >> 34u32) + as u32) + } + } + #[inline] + pub fn set_mPostedFlushCounterStyles(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(17179869184usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 34u32) & (17179869184usize as u64); + } + #[inline] + pub fn mSuppressResizeReflow(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (34359738368usize as u64)) >> 35u32) + as u32) + } + } + #[inline] + pub fn set_mSuppressResizeReflow(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(34359738368usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 35u32) & (34359738368usize as u64); + } + #[inline] + pub fn mIsVisual(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (68719476736usize as u64)) >> 36u32) + as u32) + } + } + #[inline] + pub fn set_mIsVisual(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(68719476736usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 36u32) & (68719476736usize as u64); + } + #[inline] + pub fn mFireAfterPaintEvents(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (137438953472usize as u64)) >> 37u32) + as u32) + } + } + #[inline] + pub fn set_mFireAfterPaintEvents(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(137438953472usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 37u32) & (137438953472usize as u64); + } + #[inline] + pub fn mIsChrome(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (274877906944usize as u64)) >> 38u32) + as u32) + } + } + #[inline] + pub fn set_mIsChrome(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(274877906944usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 38u32) & (274877906944usize as u64); + } + #[inline] + pub fn mIsChromeOriginImage(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (549755813888usize as u64)) >> 39u32) + as u32) + } + } + #[inline] + pub fn set_mIsChromeOriginImage(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(549755813888usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 39u32) & (549755813888usize as u64); + } + #[inline] + pub fn mPaintFlashing(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (1099511627776usize as u64)) >> 40u32) + as u32) + } + } + #[inline] + pub fn set_mPaintFlashing(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1099511627776usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 40u32) & (1099511627776usize as u64); + } + #[inline] + pub fn mPaintFlashingInitialized(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2199023255552usize as u64)) >> 41u32) + as u32) + } + } + #[inline] + pub fn set_mPaintFlashingInitialized(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2199023255552usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 41u32) & (2199023255552usize as u64); + } + #[inline] + pub fn mHasWarnedAboutPositionedTableParts(&self) + -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4398046511104usize as u64)) >> 42u32) + as u32) + } + } + #[inline] + pub fn set_mHasWarnedAboutPositionedTableParts(&mut self, + val: + ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4398046511104usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 42u32) & (4398046511104usize as u64); + } + #[inline] + pub fn mHasWarnedAboutTooLargeDashedOrDottedRadius(&self) + -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (8796093022208usize as u64)) >> 43u32) + as u32) + } + } + #[inline] + pub fn set_mHasWarnedAboutTooLargeDashedOrDottedRadius(&mut self, + val: + ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8796093022208usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 43u32) & (8796093022208usize as u64); + } + #[inline] + pub fn mQuirkSheetAdded(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (17592186044416usize as u64)) >> + 44u32) as u32) + } + } + #[inline] + pub fn set_mQuirkSheetAdded(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(17592186044416usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 44u32) & (17592186044416usize as u64); + } + #[inline] + pub fn mNeedsPrefUpdate(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (35184372088832usize as u64)) >> + 45u32) as u32) + } + } + #[inline] + pub fn set_mNeedsPrefUpdate(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(35184372088832usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 45u32) & (35184372088832usize as u64); } } -impl ::std::clone::Clone for nsIAtom { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_nsIAtom() { - assert_eq!(::std::mem::size_of::<nsIAtom>() , 24usize); - assert_eq!(::std::mem::align_of::<nsIAtom>() , 8usize); +/** + * Smart pointer class that can hold a pointer to either a RestyleManager + * or a ServoRestyleManager. + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct RestyleManagerHandle { + pub mPtr: RestyleManagerHandle_Ptr, } +pub type RestyleManagerHandle_RefPtr = HandleRefPtr<RestyleManagerHandle>; #[repr(C)] -#[derive(Debug)] -pub struct nsAtomString { - pub _base: nsString, +#[derive(Debug, Copy)] +pub struct RestyleManagerHandle_Ptr { + pub mValue: usize, } #[test] -fn bindgen_test_layout_nsAtomString() { - assert_eq!(::std::mem::size_of::<nsAtomString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAtomString>() , 8usize); +fn bindgen_test_layout_RestyleManagerHandle_Ptr() { + assert_eq!(::std::mem::size_of::<RestyleManagerHandle_Ptr>() , 8usize); + assert_eq!(::std::mem::align_of::<RestyleManagerHandle_Ptr>() , 8usize); } -#[repr(C)] -#[derive(Debug)] -pub struct nsAtomCString { - pub _base: nsCString, +impl Clone for RestyleManagerHandle_Ptr { + fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsAtomCString() { - assert_eq!(::std::mem::size_of::<nsAtomCString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAtomCString>() , 8usize); +fn bindgen_test_layout_RestyleManagerHandle() { + assert_eq!(::std::mem::size_of::<RestyleManagerHandle>() , 8usize); + assert_eq!(::std::mem::align_of::<RestyleManagerHandle>() , 8usize); } -#[repr(C)] -pub struct nsDependentAtomString { - pub _base: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct piecewise_construct_t; -impl ::std::clone::Clone for piecewise_construct_t { +impl Clone for RestyleManagerHandle { fn clone(&self) -> Self { *self } } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pair<_T1, _T2> { - pub first: _T1, - pub second: _T2, +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsChangeHint { + nsChangeHint_RepaintFrame = 1, + nsChangeHint_NeedReflow = 2, + nsChangeHint_ClearAncestorIntrinsics = 4, + nsChangeHint_ClearDescendantIntrinsics = 8, + nsChangeHint_NeedDirtyReflow = 16, + nsChangeHint_SyncFrameView = 32, + nsChangeHint_UpdateCursor = 64, + nsChangeHint_UpdateEffects = 128, + nsChangeHint_UpdateOpacityLayer = 256, + nsChangeHint_UpdateTransformLayer = 512, + nsChangeHint_ReconstructFrame = 1024, + nsChangeHint_UpdateOverflow = 2048, + nsChangeHint_UpdateSubtreeOverflow = 4096, + nsChangeHint_UpdatePostTransformOverflow = 8192, + nsChangeHint_UpdateParentOverflow = 16384, + nsChangeHint_ChildrenOnlyTransform = 32768, + nsChangeHint_RecomputePosition = 65536, + nsChangeHint_UpdateContainingBlock = 131072, + nsChangeHint_BorderStyleNoneChange = 262144, + nsChangeHint_UpdateTextPath = 524288, + nsChangeHint_SchedulePaint = 1048576, + nsChangeHint_NeutralChange = 2097152, + nsChangeHint_InvalidateRenderingObservers = 4194304, + nsChangeHint_ReflowChangesSizeOrPosition = 8388608, + nsChangeHint_UpdateComputedBSize = 16777216, + nsChangeHint_UpdateUsesOpacity = 33554432, + nsChangeHint_UpdateBackgroundPosition = 67108864, + nsChangeHint_AllHints = 134217727, +} +pub type nscolor = u32; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum Side { + eSideTop = 0, + eSideRight = 1, + eSideBottom = 2, + eSideLeft = 3, } -pub enum nsIContentSecurityPolicy { } -pub enum nsIDOMDocument { } #[repr(C)] -pub struct nsIPrincipal { - pub _bindgen_opaque_blob: u64, +#[derive(Debug)] +pub struct CallbackFunction { + pub _base: CallbackObject, } #[test] -fn bindgen_test_layout_nsIPrincipal() { - assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize); - assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize); +fn bindgen_test_layout_CallbackFunction() { + assert_eq!(::std::mem::size_of::<CallbackFunction>() , 56usize); + assert_eq!(::std::mem::align_of::<CallbackFunction>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsIExpandedPrincipal { +#[derive(Debug)] +pub struct CallbackObject { pub _base: nsISupports, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mCallback: u64, + pub mCreationStack: u64, + pub mIncumbentGlobal: nsCOMPtr<nsIGlobalObject>, + pub mIncumbentJSGlobal: u64, } #[repr(C)] -pub struct _vftable_nsIExpandedPrincipal { - pub _base: _vftable_nsISupports, -} -impl ::std::clone::Clone for nsIExpandedPrincipal { - fn clone(&self) -> Self { *self } +#[derive(Debug, Copy, Clone)] +pub struct CallbackObject_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } +pub type CallbackObject_HasThreadSafeRefCnt = FalseType; #[repr(C)] #[derive(Debug, Copy)] -pub struct nsIURI { - pub _base: nsISupports, +pub struct CallbackObject_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, } -#[repr(C)] -pub struct _vftable_nsIURI { - pub _base: _vftable_nsISupports, +#[test] +fn bindgen_test_layout_CallbackObject_cycleCollection() { + assert_eq!(::std::mem::size_of::<CallbackObject_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<CallbackObject_cycleCollection>() , + 8usize); } -impl ::std::clone::Clone for nsIURI { +impl Clone for CallbackObject_cycleCollection { fn clone(&self) -> Self { *self } } -pub type PLDHashNumber = u32; +#[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 PLDHashEntryHdr { - pub mKeyHash: PLDHashNumber, -} -impl ::std::clone::Clone for PLDHashEntryHdr { - fn clone(&self) -> Self { *self } +pub struct CallbackObject_FastCallbackConstructor { + pub _address: u8, } #[test] -fn bindgen_test_layout_PLDHashEntryHdr() { - assert_eq!(::std::mem::size_of::<PLDHashEntryHdr>() , 4usize); - assert_eq!(::std::mem::align_of::<PLDHashEntryHdr>() , 4usize); +fn bindgen_test_layout_CallbackObject_FastCallbackConstructor() { + assert_eq!(::std::mem::size_of::<CallbackObject_FastCallbackConstructor>() + , 1usize); + assert_eq!(::std::mem::align_of::<CallbackObject_FastCallbackConstructor>() + , 1usize); +} +impl Clone for CallbackObject_FastCallbackConstructor { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] -pub struct Checker { - pub mState: u32, - pub mIsWritable: u32, -} -#[test] -fn bindgen_test_layout_Checker() { - assert_eq!(::std::mem::size_of::<Checker>() , 8usize); - assert_eq!(::std::mem::align_of::<Checker>() , 4usize); +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::<CallbackObject_CallSetup>() , 400usize); + assert_eq!(::std::mem::align_of::<CallbackObject_CallSetup>() , 8usize); } extern "C" { - #[link_name = "_ZN7Checker5kIdleE"] - pub static Checker_consts_kIdle: ::std::os::raw::c_uint; - #[link_name = "_ZN7Checker6kRead1E"] - pub static Checker_consts_kRead1: ::std::os::raw::c_uint; - #[link_name = "_ZN7Checker8kReadMaxE"] - pub static Checker_consts_kReadMax: ::std::os::raw::c_uint; - #[link_name = "_ZN7Checker6kWriteE"] - pub static Checker_consts_kWrite: ::std::os::raw::c_uint; + #[link_name = "_ZN7mozilla3dom14CallbackObject21_cycleCollectorGlobalE"] + pub static mut CallbackObject__cycleCollectorGlobal: + CallbackObject_cycleCollection; } +#[test] +fn bindgen_test_layout_CallbackObject() { + assert_eq!(::std::mem::size_of::<CallbackObject>() , 56usize); + assert_eq!(::std::mem::align_of::<CallbackObject>() , 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: [u64; 2usize], - pub mChecker: ::std::cell::UnsafeCell<Checker>, + pub mEntryStore: PLDHashTable_EntryStore, + pub mChecker: Checker, } #[repr(C)] +#[derive(Debug)] pub struct PLDHashTable_EntryStore { - pub _bindgen_opaque_blob: [u64; 2usize], + pub mEntryStore: *mut ::std::os::raw::c_char, + pub mGeneration: u32, } #[test] fn bindgen_test_layout_PLDHashTable_EntryStore() { @@ -2607,34 +4993,105 @@ fn bindgen_test_layout_PLDHashTable_Iterator() { assert_eq!(::std::mem::align_of::<PLDHashTable_Iterator>() , 8usize); } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } -#[test] -fn bindgen_test_layout_PLDHashTable() { - assert_eq!(::std::mem::size_of::<PLDHashTable>() , 48usize); - assert_eq!(::std::mem::align_of::<PLDHashTable>() , 8usize); -} extern "C" { #[link_name = "_ZN12PLDHashTable12kMaxCapacityE"] - pub static PLDHashTable_consts_kMaxCapacity: ::std::os::raw::c_uint; + pub static PLDHashTable_kMaxCapacity: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable12kMinCapacityE"] - pub static PLDHashTable_consts_kMinCapacity: ::std::os::raw::c_uint; + pub static PLDHashTable_kMinCapacity: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable17kMaxInitialLengthE"] - pub static PLDHashTable_consts_kMaxInitialLength: ::std::os::raw::c_uint; + pub static PLDHashTable_kMaxInitialLength: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable21kDefaultInitialLengthE"] - pub static PLDHashTable_consts_kDefaultInitialLength: - ::std::os::raw::c_uint; + pub static PLDHashTable_kDefaultInitialLength: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable9kHashBitsE"] - pub static PLDHashTable_consts_kHashBits: ::std::os::raw::c_uint; + pub static PLDHashTable_kHashBits: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable12kGoldenRatioE"] - pub static PLDHashTable_consts_kGoldenRatio: ::std::os::raw::c_uint; + pub static PLDHashTable_kGoldenRatio: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable14kCollisionFlagE"] - pub static PLDHashTable_consts_kCollisionFlag: ::std::os::raw::c_uint; + pub static PLDHashTable_kCollisionFlag: PLDHashNumber; +} +#[test] +fn bindgen_test_layout_PLDHashTable() { + assert_eq!(::std::mem::size_of::<PLDHashTable>() , 48usize); + assert_eq!(::std::mem::align_of::<PLDHashTable>() , 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::<PLDHashTableOps>() , 40usize); + assert_eq!(::std::mem::align_of::<PLDHashTableOps>() , 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::<PLDHashEntryHdr>() , 4usize); + assert_eq!(::std::mem::align_of::<PLDHashEntryHdr>() , 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::<Checker>() , 8usize); + assert_eq!(::std::mem::align_of::<Checker>() , 4usize); +} +impl Clone for Checker { + fn clone(&self) -> Self { *self } } pub type PLDHashHashKey = ::std::option::Option<unsafe extern "C" fn(aKey: *const ::std::os::raw::c_void) - -> PLDHashNumber>; + -> ::std::os::raw::c_uint>; pub type PLDHashMatchEntry = ::std::option::Option<unsafe extern "C" fn(aEntry: *const PLDHashEntryHdr, aKey: @@ -2651,122 +5108,403 @@ pub type PLDHashInitEntry = ::std::option::Option<unsafe extern "C" fn(aEntry: *mut PLDHashEntryHdr, aKey: *const ::std::os::raw::c_void)>; +/** + * hashkey wrapper using T* KeyType + * + * @see nsTHashtable::EntryType for specification + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsPtrHashKey<T> { + pub _base: PLDHashEntryHdr, + pub mKey: *mut T, +} +pub type nsPtrHashKey_KeyType<T> = *mut T; +pub type nsPtrHashKey_KeyTypePointer<T> = *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. + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsIContent { + pub _base: nsINode, +} +pub type nsIContent_IMEState = IMEState; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIContent_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIContent__bindgen_ty_bindgen_id_118596 { + eAllChildren = 0, + eAllButXBL = 1, + eSkipPlaceholderContent = 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 + * of the first matching value. If there was no attribute at all, then + * we return ATTR_MISSING. If there was an attribute but it didn't + * match, we return ATTR_VALUE_NO_MATCH. A non-negative result always + * indicates a match. + * + * @param aNameSpaceID The namespace ID of the attribute. Must not + * be kNameSpaceID_Unknown. + * @param aName The name atom of the attribute. Must not be null. + * @param aValues a nullptr-terminated array of pointers to atom values to test + * against. + * @param aCaseSensitive Whether to do a case-sensitive compare on the values. + * @return ATTR_MISSING, ATTR_VALUE_NO_MATCH or the non-negative index + * indicating the first value of aValues that matched + */ +pub type nsIContent_AttrValuesArray = *const *mut nsIAtom; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIContent_ETabFocusType { + eTabFocus_formElementsMask = 2, + eTabFocus_linksMask = 4, + eTabFocus_any = 7, +} +extern "C" { + #[link_name = "_ZN10nsIContent14sTabFocusModelE"] + pub static mut nsIContent_sTabFocusModel: i32; +} +extern "C" { + #[link_name = "_ZN10nsIContent26sTabFocusModelAppliesToXULE"] + pub static mut nsIContent_sTabFocusModelAppliesToXUL: bool; +} +#[test] +fn bindgen_test_layout_nsIContent() { + assert_eq!(::std::mem::size_of::<nsIContent>() , 104usize); + assert_eq!(::std::mem::align_of::<nsIContent>() , 8usize); +} +/** + * Struct that stores info on an attribute. The name and value must either both + * be null or both be non-null. + * + * Note that, just as the pointers returned by GetAttrNameAt, the pointers that + * this struct hold are only valid until the element or its attributes are + * mutated (directly or via script). + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct PLDHashTableOps { - pub hashKey: PLDHashHashKey, - pub matchEntry: PLDHashMatchEntry, - pub moveEntry: PLDHashMoveEntry, - pub clearEntry: PLDHashClearEntry, - pub initEntry: PLDHashInitEntry, +pub struct BorrowedAttrInfo { + pub mName: *const nsAttrName, + pub mValue: *const nsAttrValue, +} +#[test] +fn bindgen_test_layout_BorrowedAttrInfo() { + assert_eq!(::std::mem::size_of::<BorrowedAttrInfo>() , 16usize); + assert_eq!(::std::mem::align_of::<BorrowedAttrInfo>() , 8usize); } -impl ::std::clone::Clone for PLDHashTableOps { +impl Clone for BorrowedAttrInfo { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_PLDHashTableOps() { - assert_eq!(::std::mem::size_of::<PLDHashTableOps>() , 40usize); - assert_eq!(::std::mem::align_of::<PLDHashTableOps>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsICSSDeclaration { + pub _address: u8, +} +impl Clone for nsICSSDeclaration { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct PLDHashEntryStub { - pub _base: PLDHashEntryHdr, - pub key: *const ::std::os::raw::c_void, +pub struct AudioContext { + pub _address: u8, +} +impl Clone for AudioContext { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct Element { + pub _base: FragmentOrElement, + pub mState: EventStates, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Element_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Element_MappedAttributeEntry { + pub attribute: *mut *mut nsIAtom, +} +#[test] +fn bindgen_test_layout_Element_MappedAttributeEntry() { + assert_eq!(::std::mem::size_of::<Element_MappedAttributeEntry>() , + 8usize); + assert_eq!(::std::mem::align_of::<Element_MappedAttributeEntry>() , + 8usize); } -impl ::std::clone::Clone for PLDHashEntryStub { +impl Clone for Element_MappedAttributeEntry { fn clone(&self) -> Self { *self } } +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element18kFireMutationEventE"] + pub static Element_kFireMutationEvent: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element22kDontFireMutationEventE"] + pub static Element_kDontFireMutationEvent: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element24kNotifyDocumentObserversE"] + pub static Element_kNotifyDocumentObservers: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element28kDontNotifyDocumentObserversE"] + pub static Element_kDontNotifyDocumentObservers: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element17kCallAfterSetAttrE"] + pub static Element_kCallAfterSetAttr: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element21kDontCallAfterSetAttrE"] + pub static Element_kDontCallAfterSetAttr: bool; +} #[test] -fn bindgen_test_layout_PLDHashEntryStub() { - assert_eq!(::std::mem::size_of::<PLDHashEntryStub>() , 16usize); - assert_eq!(::std::mem::align_of::<PLDHashEntryStub>() , 8usize); +fn bindgen_test_layout_Element() { + assert_eq!(::std::mem::size_of::<Element>() , 136usize); + assert_eq!(::std::mem::align_of::<Element>() , 8usize); } -/** - * a base class for templated hashtables. - * - * Clients will rarely need to use this class directly. Check the derived - * classes first, to see if they will meet your needs. - * - * @param EntryType the templated entry-type class that is managed by the - * hashtable. <code>EntryType</code> must extend the following declaration, - * and <strong>must not declare any virtual functions or derive from classes - * with virtual functions.</strong> Any vtable pointer would break the - * PLDHashTable code. - *<pre> class EntryType : public PLDHashEntryHdr - * { - * public: or friend nsTHashtable<EntryType>; - * // KeyType is what we use when Get()ing or Put()ing this entry - * // this should either be a simple datatype (uint32_t, nsISupports*) or - * // a const reference (const nsAString&) - * typedef something KeyType; - * // KeyTypePointer is the pointer-version of KeyType, because - * // PLDHashTable.h requires keys to cast to <code>const void*</code> - * typedef const something* KeyTypePointer; - * - * EntryType(KeyTypePointer aKey); - * - * // A copy or C++11 Move constructor must be defined, even if - * // AllowMemMove() == true, otherwise you will cause link errors. - * EntryType(const EntryType& aEnt); // Either this... - * EntryType(EntryType&& aEnt); // ...or this - * - * // the destructor must be defined... or you will cause link errors! - * ~EntryType(); - * - * // KeyEquals(): does this entry match this key? - * bool KeyEquals(KeyTypePointer aKey) const; - * - * // KeyToPointer(): Convert KeyType to KeyTypePointer - * static KeyTypePointer KeyToPointer(KeyType aKey); - * - * // HashKey(): calculate the hash number - * static PLDHashNumber HashKey(KeyTypePointer aKey); - * - * // ALLOW_MEMMOVE can we move this class with memmove(), or do we have - * // to use the copy constructor? - * enum { ALLOW_MEMMOVE = true/false }; - * }</pre> - * - * @see nsInterfaceHashtable - * @see nsDataHashtable - * @see nsClassHashtable - * @author "Benjamin Smedberg <bsmedberg@covad.net>" - */ #[repr(C)] -pub struct nsTHashtable<EntryType> { - pub mTable: PLDHashTable, - pub _phantom0: ::std::marker::PhantomData<EntryType>, +#[derive(Debug)] +pub struct FragmentOrElement { + pub _base: nsIContent, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + /** + * Array containing all attributes and children for this element + */ + pub mAttrsAndChildren: nsAttrAndChildArray, +} +pub type FragmentOrElement_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FragmentOrElement_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_FragmentOrElement_cycleCollection() { + assert_eq!(::std::mem::size_of::<FragmentOrElement_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<FragmentOrElement_cycleCollection>() , + 8usize); +} +impl Clone for FragmentOrElement_cycleCollection { + fn clone(&self) -> Self { *self } } +/** + * There are a set of DOM- and scripting-specific instance variables + * that may only be instantiated when a content object is accessed + * through the DOM. Rather than burn actual slots in the content + * objects for each of these instance variables, we put them off + * in a side structure that's only allocated when the content is + * accessed through the DOM. + */ #[repr(C)] #[derive(Debug)] -pub struct nsTHashtable_Iterator<EntryType> { - pub _base: PLDHashTable_Iterator, - pub _phantom0: ::std::marker::PhantomData<EntryType>, +pub struct FragmentOrElement_nsDOMSlots { + pub _base: nsINode_nsSlots, + /** + * The .style attribute (an interface that forwards to the actual + * style rules) + * @see nsGenericHTMLElement::GetStyle + */ + pub mStyle: nsCOMPtr<nsICSSDeclaration>, + /** + * The .dataset attribute. + * @see nsGenericHTMLElement::GetDataset + */ + pub mDataset: *mut nsDOMStringMap, + /** + * The .undoManager property. + * @see nsGenericHTMLElement::GetUndoManager + */ + pub mUndoManager: RefPtr<UndoManager>, + /** + * SMIL Overridde style rules (for SMIL animation of CSS properties) + * @see nsIContent::GetSMILOverrideStyle + */ + pub mSMILOverrideStyle: nsCOMPtr<nsICSSDeclaration>, + /** + * Holds any SMIL override style declaration for this element. + */ + pub mSMILOverrideStyleDeclaration: RefPtr<Declaration>, + /** + * An object implementing nsIDOMMozNamedAttrMap for this content (attributes) + * @see FragmentOrElement::GetAttributes + */ + pub mAttributeMap: RefPtr<nsDOMAttributeMap>, + pub __bindgen_anon_1: FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962, + /** + * An object implementing the .children property for this element. + */ + pub mChildrenList: RefPtr<nsContentList>, + /** + * An object implementing the .classList property for this element. + */ + pub mClassList: RefPtr<nsDOMTokenList>, + /** + * ShadowRoot bound to the element. + */ + pub mShadowRoot: RefPtr<ShadowRoot>, + /** + * The root ShadowRoot of this element if it is in a shadow tree. + */ + pub mContainingShadow: RefPtr<ShadowRoot>, + /** + * An array of web component insertion points to which this element + * is distributed. + */ + pub mDestInsertionPoints: nsTArray<*mut nsIContent>, + /** + * XBL binding installed on the element. + */ + pub mXBLBinding: RefPtr<nsXBLBinding>, + /** + * XBL binding installed on the lement. + */ + pub mXBLInsertionParent: nsCOMPtr<nsIContent>, + /** + * Web components custom element data. + */ + pub mCustomElementData: RefPtr<CustomElementData>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962 { + /** + * The nearest enclosing content node with a binding that created us. + * @see FragmentOrElement::GetBindingParent + */ + pub mBindingParent: __BindgenUnionField<*mut nsIContent>, + /** + * The controllers of the XUL Element. + */ + pub mControllers: __BindgenUnionField<*mut nsIControllers>, + pub bindgen_union_field: u64, +} +#[test] +fn bindgen_test_layout_FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962() { + assert_eq!(::std::mem::size_of::<FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962>() + , 8usize); + assert_eq!(::std::mem::align_of::<FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962>() + , 8usize); +} +impl Clone for FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_119962 { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_FragmentOrElement_nsDOMSlots() { + assert_eq!(::std::mem::size_of::<FragmentOrElement_nsDOMSlots>() , + 168usize); + assert_eq!(::std::mem::align_of::<FragmentOrElement_nsDOMSlots>() , + 8usize); +} +extern "C" { + #[link_name = + "_ZN7mozilla3dom17FragmentOrElement21_cycleCollectorGlobalE"] + pub static mut FragmentOrElement__cycleCollectorGlobal: + FragmentOrElement_cycleCollection; +} +#[test] +fn bindgen_test_layout_FragmentOrElement() { + assert_eq!(::std::mem::size_of::<FragmentOrElement>() , 128usize); + assert_eq!(::std::mem::align_of::<FragmentOrElement>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct VoidPtrHashKey { - pub _base: [u64; 2usize], +pub struct nsIWeakReference { + pub _base: nsISupports, } -impl ::std::clone::Clone for VoidPtrHashKey { +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIWeakReference_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIWeakReference() { + assert_eq!(::std::mem::size_of::<nsIWeakReference>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIWeakReference>() , 8usize); +} +impl Clone for nsIWeakReference { fn clone(&self) -> Self { *self } } +pub type nsWeakPtr = nsCOMPtr<nsIWeakReference>; #[repr(C)] -pub struct nsDataHashtable; -pub type nsLoadFlags = u32; +#[derive(Debug, Copy)] +pub struct PrefSetting { + pub _address: u8, +} +impl Clone for PrefSetting { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIChannel { + pub _base: nsIRequest, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIChannel_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIChannel__bindgen_ty_bindgen_id_135707 { + LOAD_DOCUMENT_URI = 65536, + LOAD_RETARGETED_DOCUMENT_URI = 131072, + LOAD_REPLACE = 262144, + LOAD_INITIAL_DOCUMENT_URI = 524288, + LOAD_TARGETED = 1048576, + LOAD_CALL_CONTENT_SNIFFERS = 2097152, + LOAD_CLASSIFY_URI = 4194304, + LOAD_MEDIA_SNIFFER_OVERRIDES_CONTENT_TYPE = 8388608, + LOAD_EXPLICIT_CREDENTIALS = 16777216, + LOAD_BYPASS_SERVICE_WORKER = 33554432, +} +#[test] +fn bindgen_test_layout_nsIChannel() { + assert_eq!(::std::mem::size_of::<nsIChannel>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIChannel>() , 8usize); +} +impl Clone for nsIChannel { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsIRequest { pub _base: nsISupports, } #[repr(C)] -pub struct _vftable_nsIRequest { - pub _base: _vftable_nsISupports, +#[derive(Debug, Copy, Clone)] +pub struct nsIRequest_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsIRequest_nsIRequest_h_unnamed_7 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIRequest__bindgen_ty_bindgen_id_135545 { LOAD_REQUESTMASK = 65535, LOAD_NORMAL = 0, LOAD_BACKGROUND = 1, @@ -2781,29 +5519,91 @@ pub enum nsIRequest_nsIRequest_h_unnamed_7 { LOAD_ANONYMOUS = 16384, LOAD_FRESH_CONNECTION = 32768, } -impl ::std::clone::Clone for nsIRequest { +#[test] +fn bindgen_test_layout_nsIRequest() { + assert_eq!(::std::mem::size_of::<nsIRequest>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIRequest>() , 8usize); +} +impl Clone for nsIRequest { fn clone(&self) -> Self { *self } } -/** - * EventStates is the class used to represent the event states of nsIContent - * instances. These states are calculated by IntrinsicState() and - * ContentStatesChanged() has to be called when one of them changes thus - * informing the layout/style engine of the change. - * Event states are associated with pseudo-classes. - */ +pub type nsLoadFlags = u32; #[repr(C)] #[derive(Debug, Copy)] -pub struct EventStates { - pub mStates: ::std::os::raw::c_ulonglong, +pub struct nsILoadGroup { + pub _base: nsIRequest, } -impl ::std::clone::Clone for EventStates { +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsILoadGroup_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsILoadGroup() { + assert_eq!(::std::mem::size_of::<nsILoadGroup>() , 8usize); + assert_eq!(::std::mem::align_of::<nsILoadGroup>() , 8usize); +} +impl Clone for nsILoadGroup { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug)] +pub struct nsCOMArray_base { + pub mArray: nsTArray<*mut nsISupports>, +} +pub type nsCOMArray_base_nsBaseArrayEnumFunc = + ::std::option::Option<unsafe extern "C" fn(aElement: + *mut ::std::os::raw::c_void, + aData: + *mut ::std::os::raw::c_void) + -> bool>; +pub type nsCOMArray_base_nsBaseArrayComparatorFunc = + ::std::option::Option<unsafe extern "C" fn(aElement1: *mut nsISupports, + aElement2: *mut nsISupports, + aData: + *mut ::std::os::raw::c_void) + -> ::std::os::raw::c_int>; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsCOMArray_base_nsCOMArrayComparatorContext { + pub mComparatorFunc: nsCOMArray_base_nsBaseArrayComparatorFunc, + pub mData: *mut ::std::os::raw::c_void, +} #[test] -fn bindgen_test_layout_EventStates() { - assert_eq!(::std::mem::size_of::<EventStates>() , 8usize); - assert_eq!(::std::mem::align_of::<EventStates>() , 8usize); +fn bindgen_test_layout_nsCOMArray_base_nsCOMArrayComparatorContext() { + assert_eq!(::std::mem::size_of::<nsCOMArray_base_nsCOMArrayComparatorContext>() + , 16usize); + assert_eq!(::std::mem::align_of::<nsCOMArray_base_nsCOMArrayComparatorContext>() + , 8usize); +} +impl Clone for nsCOMArray_base_nsCOMArrayComparatorContext { + fn clone(&self) -> Self { *self } } +#[test] +fn bindgen_test_layout_nsCOMArray_base() { + assert_eq!(::std::mem::size_of::<nsCOMArray_base>() , 8usize); + assert_eq!(::std::mem::align_of::<nsCOMArray_base>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsCOMArray<T> { + pub _base: nsCOMArray_base, + pub _phantom_0: ::std::marker::PhantomData<T>, +} +pub type nsCOMArray_nsCOMArrayEnumFunc<T> = + ::std::option::Option<unsafe extern "C" fn(aElement: *mut T, + aData: + *mut ::std::os::raw::c_void) + -> bool>; +pub type nsCOMArray_nsCOMArrayComparatorFunc<T> = + ::std::option::Option<unsafe extern "C" fn(aElement1: *mut T, + aElement2: *mut T, + aData: + *mut ::std::os::raw::c_void) + -> ::std::os::raw::c_int>; +#[repr(u32)] /** * Enum defining the mode in which a sheet is to be parsed. This is * usually, but not always, the same as the cascade level at which the @@ -2825,8 +5625,7 @@ fn bindgen_test_layout_EventStates() { * styling of anonymous box pseudo-elements can violate layout * invariants. */ -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum SheetParsingMode { eAuthorSheetFeatures = 0, eUserSheetFeatures = 1, @@ -2844,38 +5643,909 @@ pub enum SheetParsingMode { pub struct HandleRefPtr<T> { pub mHandle: T, } -pub enum nsAttrAndChildArray { } -pub enum nsChildContentList { } -pub enum nsCSSSelectorList { } -pub enum nsDOMAttributeMap { } -pub enum nsIAnimationObserver { } -pub enum nsIDOMElement { } -pub enum nsIDOMNodeList { } -pub enum nsIEditor { } -pub enum nsIFrame { } -pub enum nsINodeList { } -pub enum nsNodeSupportsWeakRefTearoff { } -pub enum nsNodeWeakReference { } -pub enum nsDOMMutationObserver { } -pub enum ServoNodeData { } -pub enum EventListenerManager { } -pub enum AccessibleNode { } -pub enum BoxQuadOptions { } -pub enum ConvertCoordinateOptions { } -pub enum DOMPoint { } -pub enum DOMQuad { } -pub enum DOMRectReadOnly { } -pub enum Element { } -pub enum Text { } -pub enum TextOrElementOrDocument { } -pub enum DOMPointInit { } -pub const NODE_IS_DIRTY_FOR_SERVO: nsINode_h_unnamed_8 = - nsINode_h_unnamed_8::NODE_SHARED_RESTYLE_BIT_1; -pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: nsINode_h_unnamed_8 = - nsINode_h_unnamed_8::NODE_SHARED_RESTYLE_BIT_2; +#[repr(C)] +#[derive(Debug)] +pub struct nsAttrValue { + pub mBits: usize, +} +pub type nsAttrValue_AtomArray = nsTArray<nsCOMPtr<nsIAtom>>; +pub const nsAttrValue_ValueType_eSVGTypesBegin: nsAttrValue_ValueType = + nsAttrValue_ValueType::eSVGAngle; +pub const nsAttrValue_ValueType_eSVGTypesEnd: nsAttrValue_ValueType = + nsAttrValue_ValueType::eSVGViewBox; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsAttrValue_ValueType { + eString = 0, + eAtom = 2, + eInteger = 3, + eColor = 7, + eEnum = 11, + ePercent = 15, + eGeckoCSSDeclaration = 16, + eServoCSSDeclaration = 17, + eURL = 18, + eImage = 19, + eAtomArray = 20, + eDoubleValue = 21, + eIntMarginValue = 22, + eSVGAngle = 23, + eSVGIntegerPair = 24, + eSVGLength = 25, + eSVGLengthList = 26, + eSVGNumberList = 27, + eSVGNumberPair = 28, + eSVGPathData = 29, + eSVGPointList = 30, + eSVGPreserveAspectRatio = 31, + eSVGStringList = 32, + eSVGTransformList = 33, + eSVGViewBox = 34, +} +/** + * Structure for a mapping from int (enum) values to strings. When you use + * it you generally create an array of them. + * Instantiate like this: + * EnumTable myTable[] = { + * { "string1", 1 }, + * { "string2", 2 }, + * { nullptr, 0 } + * } + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsAttrValue_EnumTable { + /** The string the value maps to */ + pub tag: *const ::std::os::raw::c_char, + /** The enum value that maps to this string */ + pub value: i16, +} +#[test] +fn bindgen_test_layout_nsAttrValue_EnumTable() { + assert_eq!(::std::mem::size_of::<nsAttrValue_EnumTable>() , 16usize); + assert_eq!(::std::mem::align_of::<nsAttrValue_EnumTable>() , 8usize); +} +impl Clone for nsAttrValue_EnumTable { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsAttrValue_ValueBaseType { + eStringBase = 0, + eOtherBase = 1, + eAtomBase = 2, + eIntegerBase = 3, +} +extern "C" { + #[link_name = "_ZN11nsAttrValue15sEnumTableArrayE"] + pub static mut nsAttrValue_sEnumTableArray: + *mut nsTArray<*const nsAttrValue_EnumTable>; +} +#[test] +fn bindgen_test_layout_nsAttrValue() { + assert_eq!(::std::mem::size_of::<nsAttrValue>() , 8usize); + assert_eq!(::std::mem::align_of::<nsAttrValue>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsNodeInfoManager { + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mNodeInfoHash: *mut PLHashTable, + pub mDocument: *mut nsIDocument, + pub mNonDocumentNodeInfos: u32, + pub mPrincipal: nsCOMPtr<nsIPrincipal>, + pub mDefaultPrincipal: nsCOMPtr<nsIPrincipal>, + pub mTextNodeInfo: *mut NodeInfo, + pub mCommentNodeInfo: *mut NodeInfo, + pub mDocumentNodeInfo: *mut NodeInfo, + pub mBindingManager: RefPtr<nsBindingManager>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsNodeInfoManager_cycleCollection { + pub _base: nsCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_nsNodeInfoManager_cycleCollection() { + assert_eq!(::std::mem::size_of::<nsNodeInfoManager_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsNodeInfoManager_cycleCollection>() , + 8usize); +} +impl Clone for nsNodeInfoManager_cycleCollection { + fn clone(&self) -> Self { *self } +} +pub type nsNodeInfoManager_HasThreadSafeRefCnt = FalseType; +extern "C" { + #[link_name = "_ZN17nsNodeInfoManager21_cycleCollectorGlobalE"] + pub static mut nsNodeInfoManager__cycleCollectorGlobal: + nsNodeInfoManager_cycleCollection; +} +#[test] +fn bindgen_test_layout_nsNodeInfoManager() { + assert_eq!(::std::mem::size_of::<nsNodeInfoManager>() , 88usize); + assert_eq!(::std::mem::align_of::<nsNodeInfoManager>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct NodeInfo { + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mDocument: *mut nsIDocument, + pub mInner: NodeInfo_NodeInfoInner, + pub mOwnerManager: RefPtr<nsNodeInfoManager>, + pub mQualifiedName: nsString, + pub mNodeName: nsString, + pub mLocalName: nsString, +} +pub type NodeInfo_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct NodeInfo_cycleCollection { + pub _base: nsCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_NodeInfo_cycleCollection() { + assert_eq!(::std::mem::size_of::<NodeInfo_cycleCollection>() , 16usize); + assert_eq!(::std::mem::align_of::<NodeInfo_cycleCollection>() , 8usize); +} +impl Clone for NodeInfo_cycleCollection { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct NodeInfo_NodeInfoInner { + pub mName: nsCOMPtr<nsIAtom>, + pub mPrefix: nsCOMPtr<nsIAtom>, + pub mNamespaceID: i32, + pub mNodeType: u16, + pub mNameString: *const nsAString_internal, + pub mExtraName: nsCOMPtr<nsIAtom>, +} +#[test] +fn bindgen_test_layout_NodeInfo_NodeInfoInner() { + assert_eq!(::std::mem::size_of::<NodeInfo_NodeInfoInner>() , 40usize); + assert_eq!(::std::mem::align_of::<NodeInfo_NodeInfoInner>() , 8usize); +} +extern "C" { + #[link_name = "_ZN7mozilla3dom8NodeInfo21_cycleCollectorGlobalE"] + pub static mut NodeInfo__cycleCollectorGlobal: NodeInfo_cycleCollection; +} +#[test] +fn bindgen_test_layout_NodeInfo() { + assert_eq!(::std::mem::size_of::<NodeInfo>() , 120usize); + assert_eq!(::std::mem::align_of::<NodeInfo>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsBindingManager { + pub _address: u8, +} +impl Clone for nsBindingManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIFrame { + pub _address: u8, +} +impl Clone for nsIFrame { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsPropertyTable { + pub mPropertyList: *mut nsPropertyTable_PropertyList, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsPropertyTable_PropertyList { + pub _address: u8, +} +impl Clone for nsPropertyTable_PropertyList { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_nsPropertyTable() { + assert_eq!(::std::mem::size_of::<nsPropertyTable>() , 8usize); + assert_eq!(::std::mem::align_of::<nsPropertyTable>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsAttrAndChildArray { + pub mImpl: *mut nsAttrAndChildArray_Impl, +} +pub type nsAttrAndChildArray_BorrowedAttrInfo = BorrowedAttrInfo; +#[repr(C)] +#[derive(Debug)] +pub struct nsAttrAndChildArray_InternalAttr { + pub mName: nsAttrName, + pub mValue: nsAttrValue, +} +#[test] +fn bindgen_test_layout_nsAttrAndChildArray_InternalAttr() { + assert_eq!(::std::mem::size_of::<nsAttrAndChildArray_InternalAttr>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsAttrAndChildArray_InternalAttr>() , + 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsAttrAndChildArray_Impl { + pub mAttrAndChildCount: u32, + pub mBufferSize: u32, + pub mMappedAttrs: *mut nsMappedAttributes, + pub mBuffer: [*mut ::std::os::raw::c_void; 1usize], +} +#[test] +fn bindgen_test_layout_nsAttrAndChildArray_Impl() { + assert_eq!(::std::mem::size_of::<nsAttrAndChildArray_Impl>() , 24usize); + assert_eq!(::std::mem::align_of::<nsAttrAndChildArray_Impl>() , 8usize); +} +impl Clone for nsAttrAndChildArray_Impl { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_nsAttrAndChildArray() { + assert_eq!(::std::mem::size_of::<nsAttrAndChildArray>() , 8usize); + assert_eq!(::std::mem::align_of::<nsAttrAndChildArray>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsChildContentList { + pub _address: u8, +} +impl Clone for nsChildContentList { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsDOMAttributeMap { + pub _base: nsIDOMMozNamedAttrMap, + pub _base_1: nsWrapperCache, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mContent: nsCOMPtr<Element>, + /** + * Cache of Attrs. + */ + pub mAttributeCache: nsDOMAttributeMap_AttrCache, +} +pub type nsDOMAttributeMap_Attr = Attr; +pub type nsDOMAttributeMap_Element = Element; +pub type nsDOMAttributeMap_ErrorResult = ErrorResult; +pub type nsDOMAttributeMap_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDOMAttributeMap_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_nsDOMAttributeMap_cycleCollection() { + assert_eq!(::std::mem::size_of::<nsDOMAttributeMap_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsDOMAttributeMap_cycleCollection>() , + 8usize); +} +impl Clone for nsDOMAttributeMap_cycleCollection { + fn clone(&self) -> Self { *self } +} +pub type nsDOMAttributeMap_AttrCache = [u64; 6usize]; +extern "C" { + #[link_name = "_ZN17nsDOMAttributeMap21_cycleCollectorGlobalE"] + pub static mut nsDOMAttributeMap__cycleCollectorGlobal: + nsDOMAttributeMap_cycleCollection; +} +#[test] +fn bindgen_test_layout_nsDOMAttributeMap() { + assert_eq!(::std::mem::size_of::<nsDOMAttributeMap>() , 104usize); + assert_eq!(::std::mem::align_of::<nsDOMAttributeMap>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIDOMMozNamedAttrMap { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIDOMMozNamedAttrMap_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIDOMMozNamedAttrMap() { + assert_eq!(::std::mem::size_of::<nsIDOMMozNamedAttrMap>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMMozNamedAttrMap>() , 8usize); +} +impl Clone for nsIDOMMozNamedAttrMap { + fn clone(&self) -> Self { *self } +} +/** + * Presentation shell interface. Presentation shells are the + * controlling point for managing the presentation of a document. The + * presentation shell holds a live reference to the document, the + * presentation context, the style manager, the style set and the root + * frame. <p> + * + * When this object is Release'd, it will release the document, the + * presentation context, the style manager, the style set and the root + * frame. + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsIPresShell { + pub _base: nsISupports, + pub mDocument: nsCOMPtr<nsIDocument>, + pub mPresContext: RefPtr<nsPresContext>, + pub mStyleSet: StyleSetHandle, + pub mFrameConstructor: *mut nsCSSFrameConstructor, + pub mViewManager: *mut nsViewManager, + pub mFrameArena: nsPresArena, + pub mSelection: RefPtr<nsFrameSelection>, + pub mFrameManager: *mut nsFrameManagerBase, + pub mForwardingContainer: u64, + pub mHiddenInvalidationObserverRefreshDriver: *mut nsRefreshDriver, + pub mDocAccessible: *mut DocAccessible, + pub mReflowContinueTimer: nsCOMPtr<nsITimer>, + pub mDrawEventTargetFrame: *mut nsIFrame, + pub mAllocatedPointers: [u64; 6usize], + pub mPaintCount: u64, + pub mScrollPositionClampingScrollPortSize: nsSize, + pub mWeakFrames: *mut nsWeakFrame, + pub mCanvasBackgroundColor: nscolor, + pub mResolution: [u64; 2usize], + pub mSelectionFlags: i16, + pub mRenderFlags: nsIPresShell_RenderFlags, + pub _bitfield_1: u16, + pub mPresShellId: u32, + pub mChangedScopeStyleRoots: [u64; 3usize], + pub mFontSizeInflationEmPerLine: u32, + pub mFontSizeInflationMinTwips: u32, + pub mFontSizeInflationLineThreshold: u32, + pub mFontSizeInflationForceEnabled: bool, + pub mFontSizeInflationDisabledInMasterProcess: bool, + pub mFontSizeInflationEnabled: bool, + pub mPaintingIsFrozen: bool, + pub mFontSizeInflationEnabledIsDirty: bool, + pub mIsNeverPainting: bool, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIPresShell_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +pub type nsIPresShell_LayerManager = LayerManager; +pub type nsIPresShell_SourceSurface = SourceSurface; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_eRenderFlag { + STATE_IGNORING_VIEWPORT_SCROLLING = 1, + STATE_DRAWWINDOW_NOT_FLUSHING = 2, +} +pub type nsIPresShell_RenderFlags = u8; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_ScrollDirection { + eHorizontal = 0, + eVertical = 1, + eEither = 2, +} +#[repr(u32)] +/** + * Tell the pres shell that a frame needs to be marked dirty and needs + * Reflow. It's OK if this is an ancestor of the frame needing reflow as + * long as the ancestor chain between them doesn't cross a reflow root. + * + * The bit to add should be NS_FRAME_IS_DIRTY, NS_FRAME_HAS_DIRTY_CHILDREN + * or nsFrameState(0); passing 0 means that dirty bits won't be set on the + * frame or its ancestors/descendants, but that intrinsic widths will still + * be marked dirty. Passing aIntrinsicDirty = eResize and aBitToAdd = 0 + * would result in no work being done, so don't do that. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_IntrinsicDirty { + eResize = 0, + eTreeChange = 1, + eStyleChange = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_ReflowRootHandling { + ePositionOrSizeChange = 0, + 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; +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_154828 { + SCROLL_TOP = 0, + SCROLL_BOTTOM = 100, + SCROLL_CENTER = 50, + SCROLL_MINIMUM = -1, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_WhenToScroll { + SCROLL_ALWAYS = 0, + SCROLL_IF_NOT_VISIBLE = 1, + SCROLL_IF_NOT_FULLY_VISIBLE = 2, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIPresShell_ScrollAxis { + pub _bindgen_opaque_blob: u32, +} +#[test] +fn bindgen_test_layout_nsIPresShell_ScrollAxis() { + assert_eq!(::std::mem::size_of::<nsIPresShell_ScrollAxis>() , 4usize); + assert_eq!(::std::mem::align_of::<nsIPresShell_ScrollAxis>() , 4usize); +} +impl Clone for nsIPresShell_ScrollAxis { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsIPresShell_PointerCaptureInfo { + pub mPendingContent: nsCOMPtr<nsIContent>, + pub mOverrideContent: nsCOMPtr<nsIContent>, + pub mPrimaryState: bool, +} +#[test] +fn bindgen_test_layout_nsIPresShell_PointerCaptureInfo() { + assert_eq!(::std::mem::size_of::<nsIPresShell_PointerCaptureInfo>() , + 24usize); + assert_eq!(::std::mem::align_of::<nsIPresShell_PointerCaptureInfo>() , + 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIPresShell_PointerInfo { + pub mActiveState: bool, + pub mPointerType: u16, + pub mPrimaryState: bool, +} +#[test] +fn bindgen_test_layout_nsIPresShell_PointerInfo() { + assert_eq!(::std::mem::size_of::<nsIPresShell_PointerInfo>() , 6usize); + assert_eq!(::std::mem::align_of::<nsIPresShell_PointerInfo>() , 2usize); +} +impl Clone for nsIPresShell_PointerInfo { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_PaintFlags { + PAINT_LAYERS = 1, + PAINT_COMPOSITE = 2, + PAINT_SYNC_DECODE_IMAGES = 4, +} +#[repr(u32)] +/** + * Ensures that the refresh driver is running, and schedules a view + * manager flush on the next tick. + * + * @param aType PAINT_DELAYED_COMPRESS : Schedule a paint to be executed after a delay, and + * put FrameLayerBuilder in 'compressed' mode that avoids short cut optimizations. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_PaintType { + PAINT_DEFAULT = 0, + PAINT_DELAYED_COMPRESS = 1, +} +extern "C" { + #[link_name = "_ZN12nsIPresShell12gCaptureInfoE"] + pub static mut nsIPresShell_gCaptureInfo: CapturingContentInfo; +} +extern "C" { + #[link_name = "_ZN12nsIPresShell19gPointerCaptureListE"] + pub static mut nsIPresShell_gPointerCaptureList: *mut [u64; 6usize]; +} +extern "C" { + #[link_name = "_ZN12nsIPresShell18gActivePointersIdsE"] + pub static mut nsIPresShell_gActivePointersIds: *mut (); +} +extern "C" { + #[link_name = "_ZN12nsIPresShell14gKeyDownTargetE"] + pub static mut nsIPresShell_gKeyDownTarget: *mut nsIContent; +} +#[test] +fn bindgen_test_layout_nsIPresShell() { + assert_eq!(::std::mem::size_of::<nsIPresShell>() , 416usize); + assert_eq!(::std::mem::align_of::<nsIPresShell>() , 8usize); +} +impl nsIPresShell { + #[inline] + pub fn mStylesHaveChanged(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u16)) >> + 0u32) as u8) + } + } + #[inline] + pub fn set_mStylesHaveChanged(&mut self, val: bool) { + self._bitfield_1 &= !(1usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 0u32) & (1usize as u16); + } + #[inline] + pub fn mDidInitialize(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u16)) >> + 1u32) as u8) + } + } + #[inline] + pub fn set_mDidInitialize(&mut self, val: bool) { + self._bitfield_1 &= !(2usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 1u32) & (2usize as u16); + } + #[inline] + pub fn mIsDestroying(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4usize as u16)) >> + 2u32) as u8) + } + } + #[inline] + pub fn set_mIsDestroying(&mut self, val: bool) { + self._bitfield_1 &= !(4usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 2u32) & (4usize as u16); + } + #[inline] + pub fn mIsZombie(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8usize as u16)) >> + 3u32) as u8) + } + } + #[inline] + pub fn set_mIsZombie(&mut self, val: bool) { + self._bitfield_1 &= !(8usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 3u32) & (8usize as u16); + } + #[inline] + pub fn mIsReflowing(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16usize as u16)) >> + 4u32) as u8) + } + } + #[inline] + pub fn set_mIsReflowing(&mut self, val: bool) { + self._bitfield_1 &= !(16usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 4u32) & (16usize as u16); + } + #[inline] + pub fn mPaintingSuppressed(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32usize as u16)) >> + 5u32) as u8) + } + } + #[inline] + pub fn set_mPaintingSuppressed(&mut self, val: bool) { + self._bitfield_1 &= !(32usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 5u32) & (32usize as u16); + } + #[inline] + pub fn mIsThemeSupportDisabled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (64usize as u16)) >> + 6u32) as u8) + } + } + #[inline] + pub fn set_mIsThemeSupportDisabled(&mut self, val: bool) { + self._bitfield_1 &= !(64usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 6u32) & (64usize as u16); + } + #[inline] + pub fn mIsActive(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (128usize as u16)) >> + 7u32) as u8) + } + } + #[inline] + pub fn set_mIsActive(&mut self, val: bool) { + self._bitfield_1 &= !(128usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 7u32) & (128usize as u16); + } + #[inline] + pub fn mFrozen(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (256usize as u16)) >> + 8u32) as u8) + } + } + #[inline] + pub fn set_mFrozen(&mut self, val: bool) { + self._bitfield_1 &= !(256usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 8u32) & (256usize as u16); + } + #[inline] + pub fn mIsFirstPaint(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (512usize as u16)) >> + 9u32) as u8) + } + } + #[inline] + pub fn set_mIsFirstPaint(&mut self, val: bool) { + self._bitfield_1 &= !(512usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 9u32) & (512usize as u16); + } + #[inline] + pub fn mObservesMutationsForPrint(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1024usize as u16)) >> + 10u32) as u8) + } + } + #[inline] + pub fn set_mObservesMutationsForPrint(&mut self, val: bool) { + self._bitfield_1 &= !(1024usize as u16); + self._bitfield_1 |= + ((val as u8 as u16) << 10u32) & (1024usize as u16); + } + #[inline] + pub fn mReflowScheduled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2048usize as u16)) >> + 11u32) as u8) + } + } + #[inline] + pub fn set_mReflowScheduled(&mut self, val: bool) { + self._bitfield_1 &= !(2048usize as u16); + self._bitfield_1 |= + ((val as u8 as u16) << 11u32) & (2048usize as u16); + } + #[inline] + pub fn mSuppressInterruptibleReflows(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4096usize as u16)) >> + 12u32) as u8) + } + } + #[inline] + pub fn set_mSuppressInterruptibleReflows(&mut self, val: bool) { + self._bitfield_1 &= !(4096usize as u16); + self._bitfield_1 |= + ((val as u8 as u16) << 12u32) & (4096usize as u16); + } + #[inline] + pub fn mScrollPositionClampingScrollPortSizeSet(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8192usize as u16)) >> + 13u32) as u8) + } + } + #[inline] + pub fn set_mScrollPositionClampingScrollPortSizeSet(&mut self, + val: bool) { + self._bitfield_1 &= !(8192usize as u16); + self._bitfield_1 |= + ((val as u8 as u16) << 13u32) & (8192usize as u16); + } +} +/** + * A class that implements nsIWeakReference + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsNodeWeakReference { + pub _base: nsIWeakReference, + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mNode: *mut nsINode, +} +pub type nsNodeWeakReference_HasThreadSafeRefCnt = FalseType; +#[test] +fn bindgen_test_layout_nsNodeWeakReference() { + assert_eq!(::std::mem::size_of::<nsNodeWeakReference>() , 32usize); + assert_eq!(::std::mem::align_of::<nsNodeWeakReference>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDOMMutationObserver { + pub _address: u8, +} +impl Clone for nsDOMMutationObserver { + fn clone(&self) -> Self { *self } +} +#[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, +} +impl Clone for BoxQuadOptions { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct ConvertCoordinateOptions { + pub _address: u8, +} +impl Clone for ConvertCoordinateOptions { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DOMPoint { + pub _address: u8, +} +impl Clone for DOMPoint { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DOMQuad { + pub _address: u8, +} +impl Clone for DOMQuad { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct DOMRectReadOnly { + pub _base: nsISupports, + pub _base_1: nsWrapperCache, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mParent: nsCOMPtr<nsISupports>, +} +pub type DOMRectReadOnly_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DOMRectReadOnly_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_DOMRectReadOnly_cycleCollection() { + assert_eq!(::std::mem::size_of::<DOMRectReadOnly_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<DOMRectReadOnly_cycleCollection>() , + 8usize); +} +impl Clone for DOMRectReadOnly_cycleCollection { + fn clone(&self) -> Self { *self } +} +extern "C" { + #[link_name = "_ZN7mozilla3dom15DOMRectReadOnly21_cycleCollectorGlobalE"] + pub static mut DOMRectReadOnly__cycleCollectorGlobal: + DOMRectReadOnly_cycleCollection; +} +#[test] +fn bindgen_test_layout_DOMRectReadOnly() { + assert_eq!(::std::mem::size_of::<DOMRectReadOnly>() , 56usize); + assert_eq!(::std::mem::align_of::<DOMRectReadOnly>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct OwningNodeOrString { + pub mType: OwningNodeOrString_Type, + pub mValue: OwningNodeOrString_Value, +} #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsINode_h_unnamed_8 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum OwningNodeOrString_Type { + eUninitialized = 0, + eNode = 1, + eString = 2, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct OwningNodeOrString_Value { + pub mNode: __BindgenUnionField<UnionMember<OwningNonNull<nsINode>>>, + pub mString: __BindgenUnionField<UnionMember<nsString>>, + pub bindgen_union_field: [u64; 2usize], +} +#[test] +fn bindgen_test_layout_OwningNodeOrString_Value() { + assert_eq!(::std::mem::size_of::<OwningNodeOrString_Value>() , 16usize); + assert_eq!(::std::mem::align_of::<OwningNodeOrString_Value>() , 8usize); +} +impl Clone for OwningNodeOrString_Value { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_OwningNodeOrString() { + assert_eq!(::std::mem::size_of::<OwningNodeOrString>() , 24usize); + assert_eq!(::std::mem::align_of::<OwningNodeOrString>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct TextOrElementOrDocument { + pub _address: u8, +} +impl Clone for TextOrElementOrDocument { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DOMPointInit { + pub _address: u8, +} +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 + = + _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_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; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _bindgen_ty_bindgen_id_156879 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -2903,388 +6573,379 @@ pub enum nsINode_h_unnamed_8 { NODE_SHARED_RESTYLE_BIT_2 = 16777216, NODE_TYPE_SPECIFIC_BITS_OFFSET = 23, } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsContentList { + pub _address: u8, +} +impl Clone for nsContentList { + fn clone(&self) -> Self { *self } +} /** - * Class used to detect unexpected mutations. To use the class create an - * nsMutationGuard on the stack before unexpected mutations could occur. - * You can then at any time call Mutated to check if any unexpected mutations - * have occurred. + * The signature of the timer callback function passed to initWithFuncCallback. + * This is the function that will get called when the timer expires if the + * timer is initialized via initWithFuncCallback. + * + * @param aTimer the timer which has expired + * @param aClosure opaque parameter passed to initWithFuncCallback */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsMutationGuard { - pub mStartingGeneration: u64, +pub struct nsITimer { + pub _base: nsISupports, } -impl ::std::clone::Clone for nsMutationGuard { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsITimer_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsITimer__bindgen_ty_bindgen_id_173287 { + TYPE_ONE_SHOT = 0, + TYPE_REPEATING_SLACK = 1, + TYPE_REPEATING_PRECISE = 2, + TYPE_REPEATING_PRECISE_CAN_SKIP = 3, } #[test] -fn bindgen_test_layout_nsMutationGuard() { - assert_eq!(::std::mem::size_of::<nsMutationGuard>() , 8usize); - assert_eq!(::std::mem::align_of::<nsMutationGuard>() , 8usize); +fn bindgen_test_layout_nsITimer() { + assert_eq!(::std::mem::size_of::<nsITimer>() , 8usize); + assert_eq!(::std::mem::align_of::<nsITimer>() , 8usize); } -extern "C" { - #[link_name = "_ZN15nsMutationGuard11sGenerationE"] - pub static mut nsMutationGuard_consts_sGeneration: - ::std::os::raw::c_ulonglong; -} -pub type Float = f32; -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SurfaceType { - DATA = 0, - D2D1_BITMAP = 1, - D2D1_DRAWTARGET = 2, - CAIRO = 3, - CAIRO_IMAGE = 4, - COREGRAPHICS_IMAGE = 5, - COREGRAPHICS_CGCONTEXT = 6, - SKIA = 7, - DUAL_DT = 8, - D2D1_1_IMAGE = 9, - RECORDING = 10, - TILED = 11, -} -pub const A8R8G8B8_UINT32: SurfaceFormat = SurfaceFormat::B8G8R8A8; -pub const X8R8G8B8_UINT32: SurfaceFormat = SurfaceFormat::B8G8R8X8; -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SurfaceFormat { - B8G8R8A8 = 0, - B8G8R8X8 = 1, - R8G8B8A8 = 2, - R8G8B8X8 = 3, - A8R8G8B8 = 4, - X8R8G8B8 = 5, - R8G8B8 = 6, - B8G8R8 = 7, - R5G6B5_UINT16 = 8, - A8 = 9, - YUV = 10, - NV12 = 11, - YUV422 = 12, - HSV = 13, - Lab = 14, - Depth = 15, - UNKNOWN = 16, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FilterType { - BLEND = 0, - TRANSFORM = 1, - MORPHOLOGY = 2, - COLOR_MATRIX = 3, - FLOOD = 4, - TILE = 5, - TABLE_TRANSFER = 6, - DISCRETE_TRANSFER = 7, - LINEAR_TRANSFER = 8, - GAMMA_TRANSFER = 9, - CONVOLVE_MATRIX = 10, - DISPLACEMENT_MAP = 11, - TURBULENCE = 12, - ARITHMETIC_COMBINE = 13, - COMPOSITE = 14, - DIRECTIONAL_BLUR = 15, - GAUSSIAN_BLUR = 16, - POINT_DIFFUSE = 17, - POINT_SPECULAR = 18, - SPOT_DIFFUSE = 19, - SPOT_SPECULAR = 20, - DISTANT_DIFFUSE = 21, - DISTANT_SPECULAR = 22, - CROP = 23, - PREMULTIPLY = 24, - UNPREMULTIPLY = 25, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum DrawTargetType { - SOFTWARE_RASTER = 0, - HARDWARE_RASTER = 1, - VECTOR = 2, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum BackendType { - NONE = 0, - DIRECT2D = 1, - COREGRAPHICS = 2, - COREGRAPHICS_ACCELERATED = 3, - CAIRO = 4, - SKIA = 5, - RECORDING = 6, - DIRECT2D1_1 = 7, - BACKEND_LAST = 8, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FontType { - DWRITE = 0, - GDI = 1, - MAC = 2, - SKIA = 3, - CAIRO = 4, - COREGRAPHICS = 5, - FONTCONFIG = 6, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum NativeSurfaceType { - D3D10_TEXTURE = 0, - CAIRO_CONTEXT = 1, - CGCONTEXT = 2, - CGCONTEXT_ACCELERATED = 3, - OPENGL_TEXTURE = 4, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum NativeFontType { - DWRITE_FONT_FACE = 0, - GDI_FONT_FACE = 1, - MAC_FONT_FACE = 2, - SKIA_FONT_FACE = 3, - CAIRO_FONT_FACE = 4, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FontStyle { NORMAL = 0, ITALIC = 1, BOLD = 2, BOLD_ITALIC = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FontHinting { NONE = 0, LIGHT = 1, NORMAL = 2, FULL = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum CompositionOp { - OP_OVER = 0, - OP_ADD = 1, - OP_ATOP = 2, - OP_OUT = 3, - OP_IN = 4, - OP_SOURCE = 5, - OP_DEST_IN = 6, - OP_DEST_OUT = 7, - OP_DEST_OVER = 8, - OP_DEST_ATOP = 9, - OP_XOR = 10, - OP_MULTIPLY = 11, - OP_SCREEN = 12, - OP_OVERLAY = 13, - OP_DARKEN = 14, - OP_LIGHTEN = 15, - OP_COLOR_DODGE = 16, - OP_COLOR_BURN = 17, - OP_HARD_LIGHT = 18, - OP_SOFT_LIGHT = 19, - OP_DIFFERENCE = 20, - OP_EXCLUSION = 21, - OP_HUE = 22, - OP_SATURATION = 23, - OP_COLOR = 24, - OP_LUMINOSITY = 25, - OP_COUNT = 26, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum Axis { X_AXIS = 0, Y_AXIS = 1, BOTH = 2, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum ExtendMode { - CLAMP = 0, - REPEAT = 1, - REPEAT_X = 2, - REPEAT_Y = 3, - REFLECT = 4, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FillRule { FILL_WINDING = 0, FILL_EVEN_ODD = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum AntialiasMode { NONE = 0, GRAY = 1, SUBPIXEL = 2, DEFAULT = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SamplingFilter { GOOD = 0, LINEAR = 1, POINT = 2, SENTINEL = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum PatternType { - COLOR = 0, - SURFACE = 1, - LINEAR_GRADIENT = 2, - RADIAL_GRADIENT = 3, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum JoinStyle { BEVEL = 0, ROUND = 1, MITER = 2, MITER_OR_BEVEL = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum CapStyle { BUTT = 0, ROUND = 1, SQUARE = 2, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SamplingBounds { UNBOUNDED = 0, BOUNDED = 1, } -#[repr(C)] -#[derive(Debug, Copy)] -pub struct Color { - pub r: Float, - pub g: Float, - pub b: Float, - pub a: Float, -} -impl ::std::clone::Clone for Color { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_Color() { - assert_eq!(::std::mem::size_of::<Color>() , 16usize); - assert_eq!(::std::mem::align_of::<Color>() , 4usize); -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct GradientStop { - pub offset: Float, - pub color: Color, -} -impl ::std::clone::Clone for GradientStop { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_GradientStop() { - assert_eq!(::std::mem::size_of::<GradientStop>() , 20usize); - assert_eq!(::std::mem::align_of::<GradientStop>() , 4usize); +impl Clone for nsITimer { + fn clone(&self) -> Self { *self } } -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum JobStatus { Complete = 0, Wait = 1, Yield = 2, Error = 3, } -pub type gfxImageFormat = SurfaceFormat; +/** + * Data used to track the expiration state of an object. We promise that this + * is 32 bits so that objects that includes this as a field can pad and align + * efficiently. + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct RectCorner; +pub struct nsExpirationState { + pub _bitfield_1: u32, +} #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum RectCorner_Types_h_unnamed_11 { - TopLeft = 0, - TopRight = 1, - BottomRight = 2, - BottomLeft = 3, - Count = 4, +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsExpirationState__bindgen_ty_bindgen_id_173763 { + NOT_TRACKED = 15, + MAX_INDEX_IN_GENERATION = 268435455, +} +#[test] +fn bindgen_test_layout_nsExpirationState() { + assert_eq!(::std::mem::size_of::<nsExpirationState>() , 4usize); + assert_eq!(::std::mem::align_of::<nsExpirationState>() , 4usize); } -impl ::std::clone::Clone for RectCorner { +impl Clone for nsExpirationState { fn clone(&self) -> Self { *self } } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum Side { - eSideTop = 0, - eSideRight = 1, - eSideBottom = 2, - eSideLeft = 3, +impl nsExpirationState { + #[inline] + pub fn mGeneration(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (15usize as u32)) >> + 0u32) as u32) + } + } + #[inline] + pub fn set_mGeneration(&mut self, val: u32) { + self._bitfield_1 &= !(15usize as u32); + self._bitfield_1 |= ((val as u32 as u32) << 0u32) & (15usize as u32); + } + #[inline] + pub fn mIndexInGeneration(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4294967280usize as u32)) >> 4u32) as + u32) + } + } + #[inline] + pub fn set_mIndexInGeneration(&mut self, val: u32) { + self._bitfield_1 &= !(4294967280usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 4u32) & (4294967280usize as u32); + } } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SideBits { - eSideBitsNone = 0, - eSideBitsTop = 1, - eSideBitsRight = 2, - eSideBitsBottom = 4, - eSideBitsLeft = 8, - eSideBitsTopBottom = 5, - eSideBitsLeftRight = 10, - eSideBitsAll = 15, +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PRCListStr { + pub next: *mut PRCList, + pub prev: *mut PRCList, } -pub type nscoord = i32; +#[test] +fn bindgen_test_layout_PRCListStr() { + assert_eq!(::std::mem::size_of::<PRCListStr>() , 16usize); + assert_eq!(::std::mem::align_of::<PRCListStr>() , 8usize); +} +impl Clone for PRCListStr { + fn clone(&self) -> Self { *self } +} +pub type PRCList = PRCListStr; #[repr(C)] -pub struct nsIntPoint { - pub _bindgen_opaque_blob: [u32; 2usize], +#[derive(Debug, Copy, Clone)] +pub struct UnionMember<T> { + pub mStorage: AlignedStorage2<T>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct imgIRequest { + pub _base: nsIRequest, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct imgIRequest_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum imgIRequest__bindgen_ty_bindgen_id_175185 { + STATUS_NONE = 0, + STATUS_SIZE_AVAILABLE = 1, + STATUS_LOAD_COMPLETE = 2, + STATUS_ERROR = 4, + STATUS_FRAME_COMPLETE = 8, + STATUS_DECODE_COMPLETE = 16, + STATUS_IS_ANIMATED = 32, + STATUS_HAS_TRANSPARENCY = 64, } #[test] -fn bindgen_test_layout_nsIntPoint() { - assert_eq!(::std::mem::size_of::<nsIntPoint>() , 8usize); - assert_eq!(::std::mem::align_of::<nsIntPoint>() , 4usize); +fn bindgen_test_layout_imgIRequest() { + assert_eq!(::std::mem::size_of::<imgIRequest>() , 8usize); + assert_eq!(::std::mem::align_of::<imgIRequest>() , 8usize); +} +impl Clone for imgIRequest { + fn clone(&self) -> Self { *self } } -/** - * These *_Simple types are used to map Gecko types to layout-equivalent but - * simpler Rust types, to aid Rust binding generation. - * - * If something in this types or the assertions below needs to change, ask - * bholley, heycam or emilio before! - * - * <div rustbindgen="true" replaces="nsPoint"> - */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsPoint { - pub x: nscoord, - pub y: nscoord, +pub struct nsHTMLCSSStyleSheet { + pub _address: u8, } -impl ::std::clone::Clone for nsPoint { +impl Clone for nsHTMLCSSStyleSheet { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsPoint() { - assert_eq!(::std::mem::size_of::<nsPoint>() , 8usize); - assert_eq!(::std::mem::align_of::<nsPoint>() , 4usize); +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsHTMLStyleSheet { + pub _address: u8, +} +impl Clone for nsHTMLStyleSheet { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIBFCacheEntry { + pub _address: u8, +} +impl Clone for nsIBFCacheEntry { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIDocumentEncoder { + pub _address: u8, +} +impl Clone for nsIDocumentEncoder { + fn clone(&self) -> Self { *self } } /** - * <div rustbindgen="true" replaces="nsMargin"> + * An internal interface */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsMargin { - pub top: nscoord, - pub right: nscoord, - pub bottom: nscoord, - pub left: nscoord, +pub struct nsIHTMLCollection { + pub _base: nsIDOMHTMLCollection, } -impl ::std::clone::Clone for nsMargin { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIHTMLCollection_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsMargin() { - assert_eq!(::std::mem::size_of::<nsMargin>() , 16usize); - assert_eq!(::std::mem::align_of::<nsMargin>() , 4usize); +fn bindgen_test_layout_nsIHTMLCollection() { + assert_eq!(::std::mem::size_of::<nsIHTMLCollection>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIHTMLCollection>() , 8usize); +} +impl Clone for nsIHTMLCollection { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIObjectLoadingContent { + pub _address: u8, +} +impl Clone for nsIObjectLoadingContent { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIStructuredCloneContainer { + pub _address: u8, +} +impl Clone for nsIStructuredCloneContainer { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsViewManager { + pub _address: u8, +} +impl Clone for nsViewManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsSMILAnimationController { + pub _address: u8, } +impl Clone for nsSMILAnimationController { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct SVGAttrAnimationRuleProcessor { + pub _address: u8, +} +impl Clone for SVGAttrAnimationRuleProcessor { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Loader { + pub _address: u8, +} +impl Clone for Loader { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct ImageLoader { + pub _address: u8, +} +impl Clone for ImageLoader { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Animation { + pub _address: u8, +} +impl Clone for Animation { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct AnonymousContent { + pub _address: u8, +} +impl Clone for AnonymousContent { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct Attr { + pub _base: nsIAttribute, + pub _base_1: nsIDOMAttr, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mValue: nsString, +} +pub type Attr_HasThreadSafeRefCnt = FalseType; #[repr(C)] -pub struct nsIntMargin { - pub _bindgen_opaque_blob: [u32; 4usize], +#[derive(Debug, Copy)] +pub struct Attr_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_Attr_cycleCollection() { + assert_eq!(::std::mem::size_of::<Attr_cycleCollection>() , 16usize); + assert_eq!(::std::mem::align_of::<Attr_cycleCollection>() , 8usize); +} +impl Clone for Attr_cycleCollection { + fn clone(&self) -> Self { *self } +} +extern "C" { + #[link_name = "_ZN7mozilla3dom4Attr21_cycleCollectorGlobalE"] + pub static mut Attr__cycleCollectorGlobal: Attr_cycleCollection; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom4Attr12sInitializedE"] + pub static mut Attr_sInitialized: bool; } #[test] -fn bindgen_test_layout_nsIntMargin() { - assert_eq!(::std::mem::size_of::<nsIntMargin>() , 16usize); - assert_eq!(::std::mem::align_of::<nsIntMargin>() , 4usize); +fn bindgen_test_layout_Attr() { + assert_eq!(::std::mem::size_of::<Attr>() , 152usize); + assert_eq!(::std::mem::align_of::<Attr>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsIAttribute { + pub _base: nsINode, + pub mAttrMap: RefPtr<nsDOMAttributeMap>, } #[repr(C)] -pub struct nsIntRect { - pub _bindgen_opaque_blob: [u32; 4usize], +#[derive(Debug, Copy, Clone)] +pub struct nsIAttribute_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsIntRect() { - assert_eq!(::std::mem::size_of::<nsIntRect>() , 16usize); - assert_eq!(::std::mem::align_of::<nsIntRect>() , 4usize); +fn bindgen_test_layout_nsIAttribute() { + assert_eq!(::std::mem::size_of::<nsIAttribute>() , 112usize); + assert_eq!(::std::mem::align_of::<nsIAttribute>() , 8usize); } -/** - * <div rustbindgen="true" replaces="nsRect"> - */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsRect { - pub x: nscoord, - pub y: nscoord, - pub width: nscoord, - pub height: nscoord, +pub struct FontFaceSet { + pub _address: u8, } -impl ::std::clone::Clone for nsRect { +impl Clone for FontFaceSet { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug)] +pub struct FrameRequestCallback { + pub _base: CallbackFunction, +} #[test] -fn bindgen_test_layout_nsRect() { - assert_eq!(::std::mem::size_of::<nsRect>() , 16usize); - assert_eq!(::std::mem::align_of::<nsRect>() , 4usize); +fn bindgen_test_layout_FrameRequestCallback() { + assert_eq!(::std::mem::size_of::<FrameRequestCallback>() , 56usize); + assert_eq!(::std::mem::align_of::<FrameRequestCallback>() , 8usize); } -pub enum AnimationEffectReadOnly { } -pub enum AnimationEffectReadOnlyAtoms { } -pub enum AnimationEffectTimingPropertiesAtoms { } -pub enum ComputedTimingPropertiesAtoms { } -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FullscreenRequest { + pub _address: u8, +} +impl Clone for FullscreenRequest { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct UndoManager { + pub _address: u8, +} +impl Clone for UndoManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct XPathEvaluator { + pub _address: u8, +} +impl Clone for XPathEvaluator { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum FillMode { None = 0, Forwards = 1, @@ -3293,8 +6954,8 @@ pub enum FillMode { Auto = 4, EndGuard_ = 5, } -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum PlaybackDirection { Normal = 0, Reverse = 1, @@ -3302,7 +6963,6 @@ pub enum PlaybackDirection { Alternate_reverse = 3, EndGuard_ = 4, } -pub type NativeType = AnimationEffectReadOnly; #[repr(C)] #[derive(Debug)] pub struct nsAttrName { @@ -3313,199 +6973,55 @@ fn bindgen_test_layout_nsAttrName() { assert_eq!(::std::mem::size_of::<nsAttrName>() , 8usize); assert_eq!(::std::mem::align_of::<nsAttrName>() , 8usize); } -pub type nscolor = u32; -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsHexColorType { NoAlpha = 0, AllowAlpha = 1, } -pub enum nsStyledElement { } -pub enum MiscContainer { } -pub enum ServoDeclarationBlock { } -pub enum Declaration { } -/** - * A class used to construct a nsString from a nsStringBuffer (we might - * want to move this to nsString at some point). - * - * WARNING: Note that nsCheapString doesn't take an explicit length -- it - * assumes the string is maximally large, given the nsStringBuffer's storage - * size. This means the given string buffer *must* be sized exactly correctly - * for the string it contains (including one byte for a null terminator). If - * it has any unused storage space, then that will result in bogus characters - * at the end of our nsCheapString. - */ #[repr(C)] -#[derive(Debug)] -pub struct nsCheapString { - pub _base: nsString, +#[derive(Debug, Copy)] +pub struct Declaration { + pub _address: u8, } -#[test] -fn bindgen_test_layout_nsCheapString() { - assert_eq!(::std::mem::size_of::<nsCheapString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsCheapString>() , 8usize); +impl Clone for Declaration { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] -pub struct nsAttrValue { - pub mBits: usize, -} -pub const eSVGTypesBegin: nsAttrValue_ValueType = - nsAttrValue_ValueType::eSVGAngle; -pub const eSVGTypesEnd: nsAttrValue_ValueType = - nsAttrValue_ValueType::eSVGViewBox; -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAttrValue_ValueType { - eString = 0, - eAtom = 2, - eInteger = 3, - eColor = 7, - eEnum = 11, - ePercent = 15, - eGeckoCSSDeclaration = 16, - eServoCSSDeclaration = 17, - eURL = 18, - eImage = 19, - eAtomArray = 20, - eDoubleValue = 21, - eIntMarginValue = 22, - eSVGAngle = 23, - eSVGIntegerPair = 24, - eSVGLength = 25, - eSVGLengthList = 26, - eSVGNumberList = 27, - eSVGNumberPair = 28, - eSVGPathData = 29, - eSVGPointList = 30, - eSVGPreserveAspectRatio = 31, - eSVGStringList = 32, - eSVGTransformList = 33, - eSVGViewBox = 34, -} -/** - * Structure for a mapping from int (enum) values to strings. When you use - * it you generally create an array of them. - * Instantiate like this: - * EnumTable myTable[] = { - * { "string1", 1 }, - * { "string2", 2 }, - * { nullptr, 0 } - * } - */ -#[repr(C)] -#[derive(Debug, Copy)] -pub struct nsAttrValue_EnumTable { - /** The string the value maps to */ - pub tag: *const ::std::os::raw::c_char, - /** The enum value that maps to this string */ - pub value: i16, -} -impl ::std::clone::Clone for nsAttrValue_EnumTable { - fn clone(&self) -> Self { *self } +pub struct URLValue { + pub _base: URLValueData, + pub mRefCnt: ThreadSafeAutoRefCnt, } +pub type URLValue_HasThreadSafeRefCnt = TrueType; #[test] -fn bindgen_test_layout_nsAttrValue_EnumTable() { - assert_eq!(::std::mem::size_of::<nsAttrValue_EnumTable>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAttrValue_EnumTable>() , 8usize); +fn bindgen_test_layout_URLValue() { + assert_eq!(::std::mem::size_of::<URLValue>() , 56usize); + assert_eq!(::std::mem::align_of::<URLValue>() , 8usize); } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAttrValue_ValueBaseType { - eStringBase = 0, - eOtherBase = 1, - eAtomBase = 2, - eIntegerBase = 3, +#[repr(C)] +#[derive(Debug)] +pub struct URLValueData { + pub mURI: nsMainThreadPtrHandle<nsIURI>, + pub mBaseURI: nsMainThreadPtrHandle<nsIURI>, + pub mString: RefPtr<nsStringBuffer>, + pub mReferrer: nsMainThreadPtrHandle<nsIURI>, + pub mOriginPrincipal: nsMainThreadPtrHandle<nsIPrincipal>, + pub mURIResolved: bool, + pub mLocalURLFlag: bool, } #[test] -fn bindgen_test_layout_nsAttrValue() { - assert_eq!(::std::mem::size_of::<nsAttrValue>() , 8usize); - assert_eq!(::std::mem::align_of::<nsAttrValue>() , 8usize); -} -extern "C" { - #[link_name = "_ZN11nsAttrValue15sEnumTableArrayE"] - pub static mut nsAttrValue_consts_sEnumTableArray: - nsTArray<*const nsAttrValue_EnumTable>; -} -pub enum nsCSSSelector { } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsChangeHint { - nsChangeHint_RepaintFrame = 1, - nsChangeHint_NeedReflow = 2, - nsChangeHint_ClearAncestorIntrinsics = 4, - nsChangeHint_ClearDescendantIntrinsics = 8, - nsChangeHint_NeedDirtyReflow = 16, - nsChangeHint_SyncFrameView = 32, - nsChangeHint_UpdateCursor = 64, - nsChangeHint_UpdateEffects = 128, - nsChangeHint_UpdateOpacityLayer = 256, - nsChangeHint_UpdateTransformLayer = 512, - nsChangeHint_ReconstructFrame = 1024, - nsChangeHint_UpdateOverflow = 2048, - nsChangeHint_UpdateSubtreeOverflow = 4096, - nsChangeHint_UpdatePostTransformOverflow = 8192, - nsChangeHint_UpdateParentOverflow = 16384, - nsChangeHint_ChildrenOnlyTransform = 32768, - nsChangeHint_RecomputePosition = 65536, - nsChangeHint_UpdateContainingBlock = 131072, - nsChangeHint_BorderStyleNoneChange = 262144, - nsChangeHint_UpdateTextPath = 524288, - nsChangeHint_SchedulePaint = 1048576, - nsChangeHint_NeutralChange = 2097152, - nsChangeHint_InvalidateRenderingObservers = 4194304, - nsChangeHint_ReflowChangesSizeOrPosition = 8388608, - nsChangeHint_UpdateComputedBSize = 16777216, - nsChangeHint_UpdateUsesOpacity = 33554432, - nsChangeHint_UpdateBackgroundPosition = 67108864, - nsChangeHint_AllHints = 134217727, -} -pub type nsChangeHint_size_t = ::std::os::raw::c_int; -/** - * |nsRestyleHint| is a bitfield for the result of - * |HasStateDependentStyle| and |HasAttributeDependentStyle|. When no - * restyling is necessary, use |nsRestyleHint(0)|. - * - * Without eRestyle_Force or eRestyle_ForceDescendants, the restyling process - * can stop processing at a frame when it detects no style changes and it is - * known that the styles of the subtree beneath it will not change, leaving - * the old style context on the frame. eRestyle_Force can be used to skip this - * optimization on a frame, and to force its new style context to be used. - * - * Similarly, eRestyle_ForceDescendants will cause the frame and all of its - * descendants to be traversed and for the new style contexts that are created - * to be set on the frames. - * - * NOTE: When adding new restyle hints, please also add them to - * RestyleManager::RestyleHintToString. - */ -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsRestyleHint { - eRestyle_Self = 1, - eRestyle_SomeDescendants = 2, - eRestyle_Subtree = 4, - eRestyle_LaterSiblings = 8, - eRestyle_CSSTransitions = 16, - eRestyle_CSSAnimations = 32, - eRestyle_SVGAttrAnimations = 64, - eRestyle_StyleAttribute = 128, - eRestyle_StyleAttribute_Animations = 256, - eRestyle_Force = 512, - eRestyle_ForceDescendants = 1024, - eRestyle_AllHintsWithAnimations = 368, +fn bindgen_test_layout_URLValueData() { + assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize); + assert_eq!(::std::mem::align_of::<URLValueData>() , 8usize); } -pub type nsRestyleHint_size_t = ::std::os::raw::c_int; -/** - * Additional data used in conjunction with an nsRestyleHint to control the - * restyle process. - */ #[repr(C)] #[derive(Debug)] -pub struct RestyleHintData { - pub mSelectorsForDescendants: nsTArray<*mut nsCSSSelector>, +pub struct ImageValue { + pub _base: URLValueData, + pub mRequests: [u64; 6usize], + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, } +pub type ImageValue_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_RestyleHintData() { - assert_eq!(::std::mem::size_of::<RestyleHintData>() , 8usize); - assert_eq!(::std::mem::align_of::<RestyleHintData>() , 8usize); +fn bindgen_test_layout_ImageValue() { + assert_eq!(::std::mem::size_of::<ImageValue>() , 112usize); + assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize); } /** * A structure representing a single attribute name and value. @@ -3523,12 +7039,12 @@ fn bindgen_test_layout_ServoAttrSnapshot() { assert_eq!(::std::mem::size_of::<ServoAttrSnapshot>() , 16usize); assert_eq!(::std::mem::align_of::<ServoAttrSnapshot>() , 8usize); } +#[repr(u8)] /** * A bitflags enum class used to determine what data does a ServoElementSnapshot * contains. */ -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum ServoElementSnapshotFlags { State = 1, Attributes = 2, All = 3, } /** * This class holds all non-tree-structural state of an element that might be @@ -3540,268 +7056,304 @@ pub enum ServoElementSnapshotFlags { State = 1, Attributes = 2, All = 3, } #[repr(C)] #[derive(Debug)] pub struct ServoElementSnapshot { - pub mContains: ServoElementSnapshotFlags, + pub mContains: ServoElementSnapshot_Flags, pub mAttrs: nsTArray<ServoAttrSnapshot>, - pub mState: ::std::os::raw::c_uchar, + pub mState: ServoElementSnapshot_ServoStateType, pub mExplicitRestyleHint: nsRestyleHint, pub mExplicitChangeHint: nsChangeHint, pub mIsHTMLElementInHTMLDocument: bool, pub mIsInChromeDocument: bool, } +pub type ServoElementSnapshot_BorrowedAttrInfo = BorrowedAttrInfo; +pub type ServoElementSnapshot_Element = Element; +pub type ServoElementSnapshot_ServoStateType = EventStates_ServoType; +pub type ServoElementSnapshot_Flags = ServoElementSnapshotFlags; #[test] fn bindgen_test_layout_ServoElementSnapshot() { assert_eq!(::std::mem::size_of::<ServoElementSnapshot>() , 32usize); assert_eq!(::std::mem::align_of::<ServoElementSnapshot>() , 8usize); } -pub enum ErrorReporter { } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSTokenType { - eCSSToken_Whitespace = 0, - eCSSToken_Comment = 1, - eCSSToken_Ident = 2, - eCSSToken_Function = 3, - eCSSToken_AtKeyword = 4, - eCSSToken_ID = 5, - eCSSToken_Hash = 6, - eCSSToken_Number = 7, - eCSSToken_Dimension = 8, - eCSSToken_Percentage = 9, - eCSSToken_String = 10, - eCSSToken_Bad_String = 11, - eCSSToken_URL = 12, - eCSSToken_Bad_URL = 13, - eCSSToken_Symbol = 14, - eCSSToken_Includes = 15, - eCSSToken_Dashmatch = 16, - eCSSToken_Beginsmatch = 17, - eCSSToken_Endsmatch = 18, - eCSSToken_Containsmatch = 19, - eCSSToken_URange = 20, - eCSSToken_HTMLComment = 21, +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsMappedAttributes { + pub _address: u8, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSTokenSerializationType { - eCSSTokenSerialization_Nothing = 0, - eCSSTokenSerialization_Whitespace = 1, - eCSSTokenSerialization_AtKeyword_or_Hash = 2, - eCSSTokenSerialization_Number = 3, - eCSSTokenSerialization_Dimension = 4, - eCSSTokenSerialization_Percentage = 5, - eCSSTokenSerialization_URange = 6, - eCSSTokenSerialization_URL_or_BadURL = 7, - eCSSTokenSerialization_Function = 8, - eCSSTokenSerialization_Ident = 9, - eCSSTokenSerialization_CDC = 10, - eCSSTokenSerialization_DashMatch = 11, - eCSSTokenSerialization_ContainsMatch = 12, - eCSSTokenSerialization_Symbol_Hash = 13, - eCSSTokenSerialization_Symbol_At = 14, - eCSSTokenSerialization_Symbol_Dot_or_Plus = 15, - eCSSTokenSerialization_Symbol_Minus = 16, - eCSSTokenSerialization_Symbol_OpenParen = 17, - eCSSTokenSerialization_Symbol_Question = 18, - eCSSTokenSerialization_Symbol_Assorted = 19, - eCSSTokenSerialization_Symbol_Equals = 20, - eCSSTokenSerialization_Symbol_Bar = 21, - eCSSTokenSerialization_Symbol_Slash = 22, - eCSSTokenSerialization_Symbol_Asterisk = 23, - eCSSTokenSerialization_Other = 24, +impl Clone for nsMappedAttributes { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct nsCSSToken { - pub mIdent: nsAutoString, - pub mNumber: f32, - pub mInteger: i32, - pub mInteger2: i32, - pub mType: nsCSSTokenType, - pub mSymbol: ::std::os::raw::c_ushort, - pub mIntegerValid: bool, - pub mHasSign: bool, +#[derive(Debug, Copy)] +pub struct nsXBLBinding { + pub _address: u8, +} +impl Clone for nsXBLBinding { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct ShadowRoot { + pub _address: u8, +} +impl Clone for ShadowRoot { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct CustomElementData { + pub _address: u8, +} +impl Clone for CustomElementData { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct IMEState { + pub _address: u8, +} +impl Clone for IMEState { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDOMTokenList { + pub _address: u8, +} +impl Clone for nsDOMTokenList { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDOMStringMap { + pub _address: u8, +} +impl Clone for nsDOMStringMap { + fn clone(&self) -> Self { *self } +} +/** + * Interface used for handling clicks on links + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsILinkHandler { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsILinkHandler_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsCSSToken() { - assert_eq!(::std::mem::size_of::<nsCSSToken>() , 184usize); - assert_eq!(::std::mem::align_of::<nsCSSToken>() , 8usize); +fn bindgen_test_layout_nsILinkHandler() { + assert_eq!(::std::mem::size_of::<nsILinkHandler>() , 8usize); + assert_eq!(::std::mem::align_of::<nsILinkHandler>() , 8usize); +} +impl Clone for nsILinkHandler { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCSSScannerPosition { - pub mOffset: u32, - pub mLineNumber: u32, - pub mLineOffset: u32, - pub mTokenLineNumber: u32, - pub mTokenLineOffset: u32, - pub mTokenOffset: u32, - pub mInitialized: bool, +pub struct nsStyleContext { + pub _address: u8, +} +impl Clone for nsStyleContext { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsFrameManagerBase { + pub mPresShell: *mut nsIPresShell, + pub mRootFrame: *mut nsIFrame, + pub mPlaceholderMap: PLDHashTable, + pub mUndisplayedMap: *mut nsFrameManagerBase_UndisplayedMap, + pub mDisplayContentsMap: *mut nsFrameManagerBase_UndisplayedMap, + pub mIsDestroyingFrames: bool, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsFrameManagerBase_UndisplayedMap { + pub _address: u8, } -impl ::std::clone::Clone for nsCSSScannerPosition { +impl Clone for nsFrameManagerBase_UndisplayedMap { fn clone(&self) -> Self { *self } } +extern "C" { + #[link_name = "_ZN18nsFrameManagerBase23sGlobalGenerationNumberE"] + pub static mut nsFrameManagerBase_sGlobalGenerationNumber: u32; +} #[test] -fn bindgen_test_layout_nsCSSScannerPosition() { - assert_eq!(::std::mem::size_of::<nsCSSScannerPosition>() , 28usize); - assert_eq!(::std::mem::align_of::<nsCSSScannerPosition>() , 4usize); +fn bindgen_test_layout_nsFrameManagerBase() { + assert_eq!(::std::mem::size_of::<nsFrameManagerBase>() , 88usize); + assert_eq!(::std::mem::align_of::<nsFrameManagerBase>() , 8usize); } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSScannerExclude { - eCSSScannerExclude_None = 0, - eCSSScannerExclude_Comments = 1, - eCSSScannerExclude_WhitespaceAndComments = 2, +#[repr(C)] +#[derive(Debug)] +pub struct nsPresArena { + pub mFreeLists: [u64; 6usize], + pub mPool: [u64; 7usize], + pub mArenaRefPtrs: [u64; 6usize], } #[repr(C)] #[derive(Debug)] -pub struct nsCSSScanner { - pub mBuffer: *const ::std::os::raw::c_ushort, - pub mOffset: u32, - pub mCount: u32, - pub mLineNumber: u32, - pub mLineOffset: u32, - pub mTokenLineNumber: u32, - pub mTokenLineOffset: u32, - pub mTokenOffset: u32, - pub mRecordStartOffset: u32, - pub mEOFCharacters: nsCSSScanner_EOFCharacters, - pub mReporter: *mut ErrorReporter, - pub mSVGMode: bool, - pub mRecording: bool, - pub mSeenBadToken: bool, - pub mSeenVariableReference: bool, +pub struct nsPresArena_FreeList { + pub _base: PLDHashEntryHdr, + pub mEntries: nsTArray<*mut ::std::os::raw::c_void>, + pub mEntrySize: usize, + pub mEntriesEverAllocated: usize, + pub mKey: nsPresArena_FreeList_KeyTypePointer, } +pub type nsPresArena_FreeList_KeyType = u32; +pub type nsPresArena_FreeList_KeyTypePointer = *const ::std::os::raw::c_void; #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSScanner_EOFCharacters { - eEOFCharacters_None = 0, - eEOFCharacters_DropBackslash = 1, - eEOFCharacters_ReplacementChar = 2, - eEOFCharacters_Asterisk = 4, - eEOFCharacters_Slash = 8, - eEOFCharacters_DoubleQuote = 16, - eEOFCharacters_SingleQuote = 32, - eEOFCharacters_CloseParen = 64, +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsPresArena_FreeList__bindgen_ty_bindgen_id_195712 { + ALLOW_MEMMOVE = 0, +} +#[test] +fn bindgen_test_layout_nsPresArena_FreeList() { + assert_eq!(::std::mem::size_of::<nsPresArena_FreeList>() , 40usize); + assert_eq!(::std::mem::align_of::<nsPresArena_FreeList>() , 8usize); } #[test] -fn bindgen_test_layout_nsCSSScanner() { - assert_eq!(::std::mem::size_of::<nsCSSScanner>() , 64usize); - assert_eq!(::std::mem::align_of::<nsCSSScanner>() , 8usize); +fn bindgen_test_layout_nsPresArena() { + assert_eq!(::std::mem::size_of::<nsPresArena>() , 152usize); + assert_eq!(::std::mem::align_of::<nsPresArena>() , 8usize); } #[repr(C)] -pub struct nsCSSGridTemplateAreaToken { - pub mName: nsAutoString, - pub isTrash: bool, +#[derive(Debug, Copy)] +pub struct imgINotificationObserver { + pub _base: nsISupports, } -#[test] -fn bindgen_test_layout_nsCSSGridTemplateAreaToken() { - assert_eq!(::std::mem::size_of::<nsCSSGridTemplateAreaToken>() , - 168usize); - assert_eq!(::std::mem::align_of::<nsCSSGridTemplateAreaToken>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct imgINotificationObserver_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum imgINotificationObserver__bindgen_ty_bindgen_id_195859 { + SIZE_AVAILABLE = 1, + FRAME_UPDATE = 2, + FRAME_COMPLETE = 3, + LOAD_COMPLETE = 4, + DECODE_COMPLETE = 5, + DISCARD = 6, + UNLOCKED_DRAW = 7, + IS_ANIMATED = 8, + HAS_TRANSPARENCY = 9, +} +#[test] +fn bindgen_test_layout_imgINotificationObserver() { + assert_eq!(::std::mem::size_of::<imgINotificationObserver>() , 8usize); + assert_eq!(::std::mem::align_of::<imgINotificationObserver>() , 8usize); +} +impl Clone for imgINotificationObserver { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCSSGridTemplateAreaScanner { - pub mBuffer: *const ::std::os::raw::c_ushort, - pub mOffset: u32, - pub mCount: u32, +pub struct nsFrameSelection { + pub _address: u8, } -impl ::std::clone::Clone for nsCSSGridTemplateAreaScanner { +impl Clone for nsFrameSelection { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsCSSGridTemplateAreaScanner() { - assert_eq!(::std::mem::size_of::<nsCSSGridTemplateAreaScanner>() , - 16usize); - assert_eq!(::std::mem::align_of::<nsCSSGridTemplateAreaScanner>() , - 8usize); +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsCSSFrameConstructor { + pub _address: u8, +} +impl Clone for nsCSSFrameConstructor { + fn clone(&self) -> Self { *self } } -pub enum CSSVariableResolver { } #[repr(C)] -pub struct CSSVariableValues { - pub mVariableIDs: [u64; 6usize], - /** - * Array of variables, indexed by variable ID. - */ - pub mVariables: nsTArray<CSSVariableValues_Variable>, +#[derive(Debug, Copy)] +pub struct nsWeakFrame { + pub _address: u8, +} +impl Clone for nsWeakFrame { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] -pub struct CSSVariableValues_Variable { - pub mVariableName: nsString, - pub mValue: nsString, - pub mFirstToken: nsCSSTokenSerializationType, - pub mLastToken: nsCSSTokenSerializationType, +pub struct ScrollbarStyles { + pub mHorizontal: u8, + pub mVertical: u8, + pub mScrollBehavior: u8, + pub mScrollSnapTypeX: u8, + pub mScrollSnapTypeY: u8, + pub mScrollSnapPointsX: nsStyleCoord, + pub mScrollSnapPointsY: nsStyleCoord, + pub mScrollSnapDestinationX: nsStyleCoord_CalcValue, + pub mScrollSnapDestinationY: nsStyleCoord_CalcValue, } #[test] -fn bindgen_test_layout_CSSVariableValues_Variable() { - assert_eq!(::std::mem::size_of::<CSSVariableValues_Variable>() , 40usize); - assert_eq!(::std::mem::align_of::<CSSVariableValues_Variable>() , 8usize); +fn bindgen_test_layout_ScrollbarStyles() { + assert_eq!(::std::mem::size_of::<ScrollbarStyles>() , 64usize); + assert_eq!(::std::mem::align_of::<ScrollbarStyles>() , 8usize); } -#[test] -fn bindgen_test_layout_CSSVariableValues() { - assert_eq!(::std::mem::size_of::<CSSVariableValues>() , 56usize); - assert_eq!(::std::mem::align_of::<CSSVariableValues>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsRefreshDriver { + pub _address: u8, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SheetType { - Agent = 0, - User = 1, - PresHint = 2, - SVGAttrAnimation = 3, - Doc = 4, - ScopedDoc = 5, - StyleAttr = 6, - Override = 7, - Animation = 8, - Transition = 9, - Count = 10, - Unknown = -1, +impl Clone for nsRefreshDriver { + fn clone(&self) -> Self { *self } } -/** - * StaticAutoPtr and StaticRefPtr are like nsAutoPtr and nsRefPtr, except they - * are suitable for use as global variables. - * - * In particular, a global instance of Static{Auto,Ref}Ptr doesn't cause the - * compiler to emit a static initializer (in release builds, anyway). - * - * In order to accomplish this, Static{Auto,Ref}Ptr must have a trivial - * constructor and destructor. As a consequence, it cannot initialize its raw - * pointer to 0 on construction, and it cannot delete/release its raw pointer - * upon destruction. - * - * Since the compiler guarantees that all global variables are initialized to - * 0, these trivial constructors are safe. Since we rely on this, the clang - * plugin, run as part of our "static analysis" builds, makes it a compile-time - * error to use Static{Auto,Ref}Ptr as anything except a global variable. - * - * Static{Auto,Ref}Ptr have a limited interface as compared to ns{Auto,Ref}Ptr; - * this is intentional, since their range of acceptable uses is smaller. - */ #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct StaticAutoPtr<T> { - pub mRawPtr: *mut T, +#[derive(Debug, Copy)] +pub struct DocAccessible { + pub _address: u8, +} +impl Clone for DocAccessible { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct StaticRefPtr<T> { - pub mRawPtr: *mut T, +#[derive(Debug, Copy)] +pub struct LayerManager { + pub _address: u8, +} +impl Clone for LayerManager { + fn clone(&self) -> Self { *self } } -pub enum Zero { } -pub const eFamily_generic_first: FontFamilyType = +#[repr(C)] +#[derive(Debug, Copy)] +pub struct SourceSurface { + pub _address: u8, +} +impl Clone for SourceSurface { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct CapturingContentInfo { + pub mAllowed: bool, + pub mPointerLock: bool, + pub mRetargetToElement: bool, + pub mPreventDrag: bool, + pub mContent: StaticRefPtr<nsIContent>, +} +#[test] +fn bindgen_test_layout_CapturingContentInfo() { + assert_eq!(::std::mem::size_of::<CapturingContentInfo>() , 16usize); + assert_eq!(::std::mem::align_of::<CapturingContentInfo>() , 8usize); +} +pub const FontFamilyType_eFamily_generic_first: FontFamilyType = FontFamilyType::eFamily_serif; -pub const eFamily_generic_last: FontFamilyType = +pub const FontFamilyType_eFamily_generic_last: FontFamilyType = FontFamilyType::eFamily_fantasy; -pub const eFamily_generic_count: FontFamilyType = +pub const FontFamilyType_eFamily_generic_count: FontFamilyType = FontFamilyType::eFamily_monospace; +#[repr(u32)] /** * type of font family name, either a name (e.g. Helvetica) or a * generic (e.g. serif, sans-serif), with the ability to distinguish * between unquoted and quoted names for serializaiton */ -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum FontFamilyType { eFamily_none = 0, eFamily_named = 1, @@ -3814,9 +7366,6 @@ pub enum FontFamilyType { eFamily_moz_variable = 8, eFamily_moz_fixed = 9, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum QuotedName { eQuotedName = 0, eUnquotedName = 1, } /** * font family name, a string for the name if not a generic and * a font type indicated named family or which generic family @@ -3854,14 +7403,14 @@ pub struct gfxFontFeature { pub mTag: u32, pub mValue: u32, } -impl ::std::clone::Clone for gfxFontFeature { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_gfxFontFeature() { assert_eq!(::std::mem::size_of::<gfxFontFeature>() , 8usize); assert_eq!(::std::mem::align_of::<gfxFontFeature>() , 4usize); } +impl Clone for gfxFontFeature { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug)] pub struct gfxAlternateValue { @@ -3874,22 +7423,84 @@ fn bindgen_test_layout_gfxAlternateValue() { assert_eq!(::std::mem::align_of::<gfxAlternateValue>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct gfxFontFeatureValueSet { - pub _bindgen_opaque_blob: [u64; 8usize], + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mFontFeatureValues: [u64; 6usize], +} +pub type gfxFontFeatureValueSet_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug)] +pub struct gfxFontFeatureValueSet_ValueList { + pub name: nsString, + pub featureSelectors: nsTArray<::std::os::raw::c_uint>, +} +#[test] +fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { + assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet_ValueList>() , + 24usize); + assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet_ValueList>() , + 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct gfxFontFeatureValueSet_FeatureValues { + pub alternate: u32, + pub valuelist: nsTArray<gfxFontFeatureValueSet_ValueList>, +} +#[test] +fn bindgen_test_layout_gfxFontFeatureValueSet_FeatureValues() { + assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet_FeatureValues>() , + 16usize); + assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet_FeatureValues>() + , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct gfxFontFeatureValueSet_FeatureValueHashKey { + pub mFamily: nsString, + pub mPropVal: u32, + pub mName: nsString, +} +#[test] +fn bindgen_test_layout_gfxFontFeatureValueSet_FeatureValueHashKey() { + assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet_FeatureValueHashKey>() + , 40usize); + assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet_FeatureValueHashKey>() + , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { + pub _base: PLDHashEntryHdr, + pub mKey: gfxFontFeatureValueSet_FeatureValueHashKey, + pub mValues: nsTArray<::std::os::raw::c_uint>, +} +pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = + *const gfxFontFeatureValueSet_FeatureValueHashKey; +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 + { + ALLOW_MEMMOVE = 1, +} +#[test] +fn bindgen_test_layout_gfxFontFeatureValueSet_FeatureValueHashEntry() { + assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet_FeatureValueHashEntry>() + , 56usize); + assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet_FeatureValueHashEntry>() + , 8usize); } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet() { assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet>() , 64usize); assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet>() , 8usize); } -pub enum gfxFontStyle { } -pub type nsFontFamilyEnumFunc = - ::std::option::Option<unsafe extern "C" fn(aFamily: *const nsString, - aGeneric: bool, - aData: - *mut ::std::os::raw::c_void) - -> bool>; #[repr(C)] +#[derive(Debug)] pub struct nsFont { pub fontlist: FontFamilyList, pub style: u8, @@ -3918,16 +7529,192 @@ fn bindgen_test_layout_nsFont() { assert_eq!(::std::mem::size_of::<nsFont>() , 88usize); assert_eq!(::std::mem::align_of::<nsFont>() , 8usize); } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub type TimeStampValue = u64; +/** + * Instances of this class represent moments in time, or a special + * "null" moment. We do not use the non-monotonic system clock or + * local time, since they can be reset, causing apparent backward + * travel in time, which can confuse algorithms. Instead we measure + * elapsed time according to the system. This time can never go + * backwards (i.e. it never wraps around, at least not in less than + * five million years of system elapsed time). It might not advance + * while the system is sleeping. If TimeStamp::SetNow() is not called + * at all for hours or days, we might not notice the passage of some + * of that time. + * + * We deliberately do not expose a way to convert TimeStamps to some + * particular unit. All you can do is compute a difference between two + * TimeStamps to get a TimeDuration. You can also add a TimeDuration + * to a TimeStamp to get a new TimeStamp. You can't do something + * meaningless like add two TimeStamps. + * + * Internally this is implemented as either a wrapper around + * - high-resolution, monotonic, system clocks if they exist on this + * platform + * - PRIntervalTime otherwise. We detect wraparounds of + * PRIntervalTime and work around them. + * + * This class is similar to C++11's time_point, however it is + * explicitly nullable and provides an IsNull() method. time_point + * is initialized to the clock's epoch and provides a + * time_since_epoch() method that functions similiarly. i.e. + * t.IsNull() is equivalent to t.time_since_epoch() == decltype(t)::duration::zero(); + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct TimeStamp { + /** + * When built with PRIntervalTime, a value of 0 means this instance + * is "null". Otherwise, the low 32 bits represent a PRIntervalTime, + * and the high 32 bits represent a counter of the number of + * rollovers of PRIntervalTime that we've seen. This counter starts + * at 1 to avoid a real time colliding with the "null" value. + * + * PR_INTERVAL_MAX is set at 100,000 ticks per second. So the minimum + * time to wrap around is about 2^64/100000 seconds, i.e. about + * 5,849,424 years. + * + * When using a system clock, a value is system dependent. + */ + pub mValue: TimeStampValue, +} +#[test] +fn bindgen_test_layout_TimeStamp() { + assert_eq!(::std::mem::size_of::<TimeStamp>() , 8usize); + assert_eq!(::std::mem::align_of::<TimeStamp>() , 8usize); +} +impl Clone for TimeStamp { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FramePropertyDescriptorUntyped { + pub mDestructor: FramePropertyDescriptorUntyped_UntypedDestructor, + pub mDestructorWithFrame: FramePropertyDescriptorUntyped_UntypedDestructorWithFrame, +} +/** + * mDestructor will be called if it's non-null. + */ +pub type FramePropertyDescriptorUntyped_UntypedDestructor = + ::std::option::Option<unsafe extern "C" fn(aPropertyValue: + *mut ::std::os::raw::c_void)>; +/** + * mDestructorWithFrame will be called if it's non-null and mDestructor + * is null. WARNING: The frame passed to mDestructorWithFrame may + * be a dangling frame pointer, if this is being called during + * presshell teardown. Do not use it except to compare against + * other frame pointers. No frame will have been allocated with + * the same address yet. + */ +pub type FramePropertyDescriptorUntyped_UntypedDestructorWithFrame = + ::std::option::Option<unsafe extern "C" fn(aFrame: *const nsIFrame, + aPropertyValue: + *mut ::std::os::raw::c_void)>; +#[test] +fn bindgen_test_layout_FramePropertyDescriptorUntyped() { + assert_eq!(::std::mem::size_of::<FramePropertyDescriptorUntyped>() , + 16usize); + assert_eq!(::std::mem::align_of::<FramePropertyDescriptorUntyped>() , + 8usize); +} +impl Clone for FramePropertyDescriptorUntyped { + fn clone(&self) -> Self { *self } +} +/** + * The FramePropertyTable is optimized for storing 0 or 1 properties on + * a given frame. Storing very large numbers of properties on a single + * frame will not be efficient. + * + * Property values are passed as void* but do not actually have to be + * valid pointers. You can use NS_INT32_TO_PTR/NS_PTR_TO_INT32 to + * store int32_t values. Null/zero values can be stored and retrieved. + * Of course, the destructor function (if any) must handle such values + * correctly. + */ +#[repr(C)] +#[derive(Debug)] +pub struct FramePropertyTable { + pub mEntries: [u64; 6usize], + pub mLastFrame: *const nsIFrame, + pub mLastEntry: *mut FramePropertyTable_Entry, +} +pub type FramePropertyTable_UntypedDescriptor = + *const FramePropertyDescriptorUntyped; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct FramePropertyTable_ReinterpretHelper<T> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, +} +/** + * Stores a property descriptor/value pair. It can also be used to + * store an nsTArray of PropertyValues. + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FramePropertyTable_PropertyValue { + pub mProperty: FramePropertyTable_UntypedDescriptor, + pub mValue: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_FramePropertyTable_PropertyValue() { + assert_eq!(::std::mem::size_of::<FramePropertyTable_PropertyValue>() , + 16usize); + assert_eq!(::std::mem::align_of::<FramePropertyTable_PropertyValue>() , + 8usize); +} +impl Clone for FramePropertyTable_PropertyValue { + fn clone(&self) -> Self { *self } +} +/** + * Used with an array of PropertyValues to allow lookups that compare + * only on the FramePropertyDescriptor. + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FramePropertyTable_PropertyComparator { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_FramePropertyTable_PropertyComparator() { + assert_eq!(::std::mem::size_of::<FramePropertyTable_PropertyComparator>() + , 1usize); + assert_eq!(::std::mem::align_of::<FramePropertyTable_PropertyComparator>() + , 1usize); +} +impl Clone for FramePropertyTable_PropertyComparator { + fn clone(&self) -> Self { *self } +} +/** + * Our hashtable entry. The key is an nsIFrame*, the value is a + * PropertyValue representing one or more property/value pairs. + */ +#[repr(C)] +#[derive(Debug)] +pub struct FramePropertyTable_Entry { + pub _base: nsPtrHashKey<nsIFrame>, + pub mProp: FramePropertyTable_PropertyValue, +} +#[test] +fn bindgen_test_layout_FramePropertyTable_Entry() { + assert_eq!(::std::mem::size_of::<FramePropertyTable_Entry>() , 32usize); + assert_eq!(::std::mem::align_of::<FramePropertyTable_Entry>() , 8usize); +} +#[test] +fn bindgen_test_layout_FramePropertyTable() { + assert_eq!(::std::mem::size_of::<FramePropertyTable>() , 64usize); + assert_eq!(::std::mem::align_of::<FramePropertyTable>() , 8usize); +} +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBasicShapeType { Polygon = 0, Circle = 1, Ellipse = 2, Inset = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxAlign { Stretch = 0, Start = 1, @@ -3935,26 +7722,23 @@ pub enum StyleBoxAlign { Baseline = 3, End = 4, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxDecorationBreak { Slice = 0, Clone = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxDirection { Normal = 0, Reverse = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxOrient { Horizontal = 0, Vertical = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxPack { Start = 0, Center = 1, End = 2, Justify = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxSizing { Content = 0, Border = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum StyleBoxShadowType { Inset = 0, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleClear { None = 0, Left = 1, @@ -3965,8 +7749,8 @@ pub enum StyleClear { Line = 8, Max = 13, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleClipPathGeometryBox { NoBox = 0, Content = 1, @@ -3977,11 +7761,11 @@ pub enum StyleClipPathGeometryBox { Stroke = 6, View = 7, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleFillRule { Nonzero = 0, Evenodd = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleFloat { None = 0, Left = 1, @@ -3989,11 +7773,11 @@ pub enum StyleFloat { InlineStart = 3, InlineEnd = 4, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleFloatEdge { ContentBox = 0, MarginBox = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleShapeOutsideShapeBox { NoBox = 0, Content = 1, @@ -4001,11 +7785,11 @@ pub enum StyleShapeOutsideShapeBox { Border = 3, Margin = 4, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleShapeSourceType { None = 0, URL = 1, Shape = 2, Box = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleUserFocus { None = 0, Ignore = 1, @@ -4016,8 +7800,8 @@ pub enum StyleUserFocus { SelectSame = 6, SelectMenu = 7, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleUserSelect { None = 0, Text = 1, @@ -4030,8 +7814,8 @@ pub enum StyleUserSelect { MozAll = 8, MozText = 9, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleDisplay { None = 0, Block = 1, @@ -4072,20 +7856,504 @@ pub enum StyleDisplay { Groupbox = 36, Popup = 37, } -pub const eCSSProperty_COUNT_DUMMY: nsCSSPropertyID = +pub const nsStyleUnit_eStyleUnit_MAX: nsStyleUnit = + nsStyleUnit::eStyleUnit_Calc; +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsStyleUnit { + eStyleUnit_Null = 0, + eStyleUnit_Normal = 1, + eStyleUnit_Auto = 2, + eStyleUnit_None = 3, + eStyleUnit_Percent = 10, + eStyleUnit_Factor = 11, + eStyleUnit_Degree = 12, + eStyleUnit_Grad = 13, + eStyleUnit_Radian = 14, + eStyleUnit_Turn = 15, + eStyleUnit_FlexFraction = 16, + eStyleUnit_Coord = 20, + eStyleUnit_Integer = 30, + eStyleUnit_Enumerated = 32, + eStyleUnit_Calc = 40, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct _bindgen_ty_bindgen_id_197858 { + pub mInt: __BindgenUnionField<i32>, + pub mFloat: __BindgenUnionField<f32>, + 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>() , + 8usize); + assert_eq!(::std::mem::align_of::<_bindgen_ty_bindgen_id_197858>() , + 8usize); +} +impl Clone for _bindgen_ty_bindgen_id_197858 { + fn clone(&self) -> Self { *self } +} +pub type nsStyleUnion = _bindgen_ty_bindgen_id_197858; +/** + * Class that hold a single size specification used by the style + * system. The size specification consists of two parts -- a number + * and a unit. The number is an integer, a floating point value, an + * nscoord, or undefined, and the unit is an nsStyleUnit. Checking + * the unit is a must before asking for the value in any particular + * form. + */ + /** <div rustbindgen private accessor="unsafe"></div> */ +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleCoord { + mUnit: nsStyleUnit, + mValue: nsStyleUnion, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsStyleCoord_CalcValue { + pub mLength: nscoord, + pub mPercent: f32, + pub mHasPercent: bool, +} +#[test] +fn bindgen_test_layout_nsStyleCoord_CalcValue() { + assert_eq!(::std::mem::size_of::<nsStyleCoord_CalcValue>() , 12usize); + assert_eq!(::std::mem::align_of::<nsStyleCoord_CalcValue>() , 4usize); +} +impl Clone for nsStyleCoord_CalcValue { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleCoord_Calc { + pub _base: nsStyleCoord_CalcValue, + pub mRefCnt: ThreadSafeAutoRefCnt, +} +pub type nsStyleCoord_Calc_HasThreadSafeRefCnt = TrueType; +#[test] +fn bindgen_test_layout_nsStyleCoord_Calc() { + assert_eq!(::std::mem::size_of::<nsStyleCoord_Calc>() , 24usize); + assert_eq!(::std::mem::align_of::<nsStyleCoord_Calc>() , 8usize); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsStyleCoord_CoordConstructorType { CoordConstructor = 0, } +#[test] +fn bindgen_test_layout_nsStyleCoord() { + assert_eq!(::std::mem::size_of::<nsStyleCoord>() , 16usize); + assert_eq!(::std::mem::align_of::<nsStyleCoord>() , 8usize); +} +impl nsStyleCoord { + #[inline] + pub unsafe fn get_mUnit(&self) -> &nsStyleUnit { &self.mUnit } + #[inline] + pub unsafe fn get_mUnit_mut(&mut self) -> &mut nsStyleUnit { + &mut self.mUnit + } + #[inline] + pub unsafe fn get_mValue(&self) -> &nsStyleUnion { &self.mValue } + #[inline] + pub unsafe fn get_mValue_mut(&mut self) -> &mut nsStyleUnion { + &mut self.mValue + } +} +/** + * Class that represents a set of top/right/bottom/left nsStyleCoords. + * This is commonly used to hold the widths of the borders, margins, + * or paddings of a box. + */ + /** <div rustbindgen private accessor="unsafe"></div> */ +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleSides { + mUnits: [nsStyleUnit; 4usize], + mValues: [nsStyleUnion; 4usize], +} +#[test] +fn bindgen_test_layout_nsStyleSides() { + assert_eq!(::std::mem::size_of::<nsStyleSides>() , 40usize); + assert_eq!(::std::mem::align_of::<nsStyleSides>() , 8usize); +} +impl nsStyleSides { + #[inline] + pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 4usize] { &self.mUnits } + #[inline] + pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 4usize] { + &mut self.mUnits + } + #[inline] + pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 4usize] { + &self.mValues + } + #[inline] + pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 4usize] { + &mut self.mValues + } +} +/** + * Class that represents a set of top-left/top-right/bottom-right/bottom-left + * nsStyleCoord pairs. This is used to hold the dimensions of the + * corners of a box (for, e.g., border-radius and outline-radius). + */ + /** <div rustbindgen private accessor="unsafe"></div> */ +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleCorners { + mUnits: [nsStyleUnit; 8usize], + mValues: [nsStyleUnion; 8usize], +} +#[test] +fn bindgen_test_layout_nsStyleCorners() { + assert_eq!(::std::mem::size_of::<nsStyleCorners>() , 72usize); + assert_eq!(::std::mem::align_of::<nsStyleCorners>() , 8usize); +} +impl nsStyleCorners { + #[inline] + pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 8usize] { &self.mUnits } + #[inline] + pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 8usize] { + &mut self.mUnits + } + #[inline] + pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 8usize] { + &self.mValues + } + #[inline] + pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 8usize] { + &mut self.mValues + } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleDisplay { + pub mBinding: RefPtr<URLValue>, + pub mDisplay: StyleDisplay, + pub mOriginalDisplay: StyleDisplay, + pub mContain: u8, + pub mAppearance: u8, + pub mPosition: u8, + pub mFloat: StyleFloat, + pub mOriginalFloat: StyleFloat, + pub mBreakType: StyleClear, + pub mBreakInside: u8, + pub mBreakBefore: bool, + pub mBreakAfter: bool, + pub mOverflowX: u8, + pub mOverflowY: u8, + pub mOverflowClipBox: u8, + pub mResize: u8, + pub mOrient: u8, + pub mIsolation: u8, + pub mTopLayer: u8, + pub mWillChangeBitField: u8, + pub mWillChange: nsTArray<nsString>, + pub mTouchAction: u8, + pub mScrollBehavior: u8, + pub mScrollSnapTypeX: u8, + pub mScrollSnapTypeY: u8, + pub mScrollSnapPointsX: nsStyleCoord, + pub mScrollSnapPointsY: nsStyleCoord, + pub mScrollSnapDestination: Position, + pub mScrollSnapCoordinate: nsTArray<Position>, + pub mBackfaceVisibility: u8, + pub mTransformStyle: u8, + pub mTransformBox: u8, + pub mSpecifiedTransform: RefPtr<nsCSSValueSharedList>, + pub mTransformOrigin: [nsStyleCoord; 3usize], + pub mChildPerspective: nsStyleCoord, + pub mPerspectiveOrigin: [nsStyleCoord; 2usize], + pub mVerticalAlign: nsStyleCoord, + pub mTransitions: nsStyleAutoArray<StyleTransition>, + pub mTransitionTimingFunctionCount: u32, + pub mTransitionDurationCount: u32, + pub mTransitionDelayCount: u32, + pub mTransitionPropertyCount: u32, + pub mAnimations: nsStyleAutoArray<StyleAnimation>, + pub mAnimationTimingFunctionCount: u32, + pub mAnimationDurationCount: u32, + pub mAnimationDelayCount: u32, + pub mAnimationNameCount: u32, + pub mAnimationDirectionCount: u32, + pub mAnimationFillModeCount: u32, + pub mAnimationPlayStateCount: u32, + pub mAnimationIterationCountCount: u32, + pub mShapeOutside: StyleShapeOutside, +} +#[test] +fn bindgen_test_layout_nsStyleDisplay() { + assert_eq!(::std::mem::size_of::<nsStyleDisplay>() , 424usize); + assert_eq!(::std::mem::align_of::<nsStyleDisplay>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsILanguageAtomService { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsILanguageAtomService_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsILanguageAtomService() { + assert_eq!(::std::mem::size_of::<nsILanguageAtomService>() , 8usize); + assert_eq!(::std::mem::align_of::<nsILanguageAtomService>() , 8usize); +} +impl Clone for nsILanguageAtomService { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct LangGroupFontPrefs { + pub mLangGroup: nsCOMPtr<nsIAtom>, + pub mMinimumFontSize: nscoord, + pub mDefaultVariableFont: nsFont, + pub mDefaultFixedFont: nsFont, + pub mDefaultSerifFont: nsFont, + pub mDefaultSansSerifFont: nsFont, + pub mDefaultMonospaceFont: nsFont, + pub mDefaultCursiveFont: nsFont, + pub mDefaultFantasyFont: nsFont, + pub mNext: nsAutoPtr<LangGroupFontPrefs>, +} +#[test] +fn bindgen_test_layout_LangGroupFontPrefs() { + assert_eq!(::std::mem::size_of::<LangGroupFontPrefs>() , 640usize); + assert_eq!(::std::mem::align_of::<LangGroupFontPrefs>() , 8usize); +} +/** + * Some functionality that has historically lived on nsPresContext does not + * actually need to be per-document. This singleton class serves as a host + * for that functionality. We delegate to it from nsPresContext where + * appropriate, and use it standalone in some cases as well. + */ +#[repr(C)] +#[derive(Debug)] +pub struct StaticPresData { + pub mLangService: nsCOMPtr<nsILanguageAtomService>, + pub mBorderWidthTable: [nscoord; 3usize], + pub mStaticLangGroupFontPrefs: LangGroupFontPrefs, +} +#[test] +fn bindgen_test_layout_StaticPresData() { + assert_eq!(::std::mem::size_of::<StaticPresData>() , 664usize); + assert_eq!(::std::mem::align_of::<StaticPresData>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIPrintSettings { + pub _address: u8, +} +impl Clone for nsIPrintSettings { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsITheme { + pub _address: u8, +} +impl Clone for nsITheme { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct gfxTextPerfMetrics { + pub _address: u8, +} +impl Clone for gfxTextPerfMetrics { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsTransitionManager { + pub _address: u8, +} +impl Clone for nsTransitionManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsAnimationManager { + pub _address: u8, +} +impl Clone for nsAnimationManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDeviceContext { + pub _address: u8, +} +impl Clone for nsDeviceContext { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct gfxMissingFontRecorder { + pub _address: u8, +} +impl Clone for gfxMissingFontRecorder { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct EffectCompositor { + pub _address: u8, +} +impl Clone for EffectCompositor { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct EventStateManager { + pub _address: u8, +} +impl Clone for EventStateManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct CounterStyleManager { + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mPresContext: *mut nsPresContext, + pub mCacheTable: [u64; 6usize], +} +pub type CounterStyleManager_HasThreadSafeRefCnt = FalseType; +#[test] +fn bindgen_test_layout_CounterStyleManager() { + assert_eq!(::std::mem::size_of::<CounterStyleManager>() , 72usize); + assert_eq!(::std::mem::align_of::<CounterStyleManager>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsInvalidateRequestList { + pub mRequests: nsTArray<nsInvalidateRequestList_Request>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsInvalidateRequestList_Request { + pub mRect: nsRect, + pub mFlags: u32, +} +#[test] +fn bindgen_test_layout_nsInvalidateRequestList_Request() { + assert_eq!(::std::mem::size_of::<nsInvalidateRequestList_Request>() , + 20usize); + assert_eq!(::std::mem::align_of::<nsInvalidateRequestList_Request>() , + 4usize); +} +impl Clone for nsInvalidateRequestList_Request { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_nsInvalidateRequestList() { + assert_eq!(::std::mem::size_of::<nsInvalidateRequestList>() , 8usize); + assert_eq!(::std::mem::align_of::<nsInvalidateRequestList>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DisplayItemClip_RoundedRect { + pub mRect: nsRect, + pub mRadii: [nscoord; 8usize], +} +#[test] +fn bindgen_test_layout_DisplayItemClip_RoundedRect() { + assert_eq!(::std::mem::size_of::<DisplayItemClip_RoundedRect>() , + 48usize); + assert_eq!(::std::mem::align_of::<DisplayItemClip_RoundedRect>() , + 4usize); +} +impl Clone for DisplayItemClip_RoundedRect { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Grid { + pub _address: u8, +} +impl Clone for Grid { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsCSSTokenSerializationType { + eCSSTokenSerialization_Nothing = 0, + eCSSTokenSerialization_Whitespace = 1, + eCSSTokenSerialization_AtKeyword_or_Hash = 2, + eCSSTokenSerialization_Number = 3, + eCSSTokenSerialization_Dimension = 4, + eCSSTokenSerialization_Percentage = 5, + eCSSTokenSerialization_URange = 6, + eCSSTokenSerialization_URL_or_BadURL = 7, + eCSSTokenSerialization_Function = 8, + eCSSTokenSerialization_Ident = 9, + eCSSTokenSerialization_CDC = 10, + eCSSTokenSerialization_DashMatch = 11, + eCSSTokenSerialization_ContainsMatch = 12, + eCSSTokenSerialization_Symbol_Hash = 13, + eCSSTokenSerialization_Symbol_At = 14, + eCSSTokenSerialization_Symbol_Dot_or_Plus = 15, + eCSSTokenSerialization_Symbol_Minus = 16, + eCSSTokenSerialization_Symbol_OpenParen = 17, + eCSSTokenSerialization_Symbol_Question = 18, + eCSSTokenSerialization_Symbol_Assorted = 19, + eCSSTokenSerialization_Symbol_Equals = 20, + eCSSTokenSerialization_Symbol_Bar = 21, + eCSSTokenSerialization_Symbol_Slash = 22, + eCSSTokenSerialization_Symbol_Asterisk = 23, + eCSSTokenSerialization_Other = 24, +} +#[repr(C)] +#[derive(Debug)] +pub struct CSSVariableValues { + /** + * Map of variable names to IDs. Variable IDs are indexes into + * mVariables. + */ + pub mVariableIDs: [u64; 6usize], + /** + * Array of variables, indexed by variable ID. + */ + pub mVariables: nsTArray<CSSVariableValues_Variable>, +} +#[repr(C)] +#[derive(Debug)] +pub struct CSSVariableValues_Variable { + pub mVariableName: nsString, + pub mValue: nsString, + pub mFirstToken: nsCSSTokenSerializationType, + pub mLastToken: nsCSSTokenSerializationType, +} +#[test] +fn bindgen_test_layout_CSSVariableValues_Variable() { + assert_eq!(::std::mem::size_of::<CSSVariableValues_Variable>() , 40usize); + assert_eq!(::std::mem::align_of::<CSSVariableValues_Variable>() , 8usize); +} +#[test] +fn bindgen_test_layout_CSSVariableValues() { + assert_eq!(::std::mem::size_of::<CSSVariableValues>() , 56usize); + assert_eq!(::std::mem::align_of::<CSSVariableValues>() , 8usize); +} +pub const nsCSSPropertyID_eCSSProperty_COUNT_DUMMY: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_z_index; -pub const eCSSProperty_all: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSProperty_all: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_COUNT_no_shorthands; -pub const eCSSProperty_COUNT_DUMMY2: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSProperty_COUNT_DUMMY2: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_transition; -pub const eCSSPropertyAlias_WordWrap: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSPropertyAlias_WordWrap: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_COUNT; -pub const eCSSProperty_COUNT_DUMMY3: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSProperty_COUNT_DUMMY3: nsCSSPropertyID = nsCSSPropertyID::eCSSPropertyAlias_WebkitMaskSize; -pub const eCSSPropertyExtra_no_properties: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSPropertyExtra_no_properties: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_COUNT_with_aliases; #[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSPropertyID { eCSSProperty_UNKNOWN = -1, eCSSProperty_align_content = 0, @@ -4554,52 +8822,6 @@ pub enum nsCSSPropertyID { eCSSPropertyExtra_x_auto_value = 463, eCSSPropertyExtra_variable = 464, } -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSFontDesc { - eCSSFontDesc_UNKNOWN = -1, - eCSSFontDesc_Family = 0, - eCSSFontDesc_Style = 1, - eCSSFontDesc_Weight = 2, - eCSSFontDesc_Stretch = 3, - eCSSFontDesc_Src = 4, - eCSSFontDesc_UnicodeRange = 5, - eCSSFontDesc_FontFeatureSettings = 6, - eCSSFontDesc_FontLanguageOverride = 7, - eCSSFontDesc_Display = 8, - eCSSFontDesc_COUNT = 9, -} -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSCounterDesc { - eCSSCounterDesc_UNKNOWN = -1, - eCSSCounterDesc_System = 0, - eCSSCounterDesc_Symbols = 1, - eCSSCounterDesc_AdditiveSymbols = 2, - eCSSCounterDesc_Negative = 3, - eCSSCounterDesc_Prefix = 4, - eCSSCounterDesc_Suffix = 5, - eCSSCounterDesc_Range = 6, - eCSSCounterDesc_Pad = 7, - eCSSCounterDesc_Fallback = 8, - eCSSCounterDesc_SpeakAs = 9, - eCSSCounterDesc_COUNT = 10, -} -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSPropertyLogicalGroup { - eCSSPropertyLogicalGroup_UNKNOWN = -1, - eCSSPropertyLogicalGroup_BorderColor = 0, - eCSSPropertyLogicalGroup_BorderStyle = 1, - eCSSPropertyLogicalGroup_BorderWidth = 2, - eCSSPropertyLogicalGroup_Margin = 3, - eCSSPropertyLogicalGroup_MaxSize = 4, - eCSSPropertyLogicalGroup_Offset = 5, - eCSSPropertyLogicalGroup_Padding = 6, - eCSSPropertyLogicalGroup_MinSize = 7, - eCSSPropertyLogicalGroup_Size = 8, - eCSSPropertyLogicalGroup_COUNT = 9, -} /** * Class to safely handle main-thread-only pointers off the main thread. * @@ -4645,38 +8867,152 @@ pub struct nsMainThreadPtrHolder<T> { pub mRawPtr: *mut T, pub mStrict: bool, } +pub type nsMainThreadPtrHolder_HasThreadSafeRefCnt = TrueType; #[repr(C)] #[derive(Debug)] pub struct nsMainThreadPtrHandle<T> { pub mPtr: RefPtr<T>, } -pub enum CSSStyleSheet { } #[repr(C)] -pub struct URLValueData { - pub _bindgen_opaque_blob: [u64; 6usize], +#[derive(Debug)] +pub struct imgRequestProxy { + pub _base: imgIRequest, + pub _base_1: IProgressObserver, + pub _base_2: nsISupportsPriority, + pub _base_3: nsISecurityInfoProvider, + pub _base_4: nsITimedChannel, + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mBehaviour: UniquePtr<ProxyBehaviour, DefaultDelete<ProxyBehaviour>>, + pub mURI: RefPtr<ImageURL>, + pub mListener: *mut imgINotificationObserver, + pub mLoadGroup: nsCOMPtr<nsILoadGroup>, + pub mLoadFlags: nsLoadFlags, + pub mLockCount: u32, + pub mAnimationConsumers: u32, + pub mCanceled: bool, + pub mIsInLoadGroup: bool, + pub mListenerIsStrongRef: bool, + pub mDecodeRequested: bool, + pub mDeferNotifications: bool, +} +pub type imgRequestProxy_Image = Image; +pub type imgRequestProxy_ImageURL = ImageURL; +pub type imgRequestProxy_ProgressTracker = ProgressTracker; +pub type imgRequestProxy_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug)] +pub struct imgRequestProxy_imgCancelRunnable { + pub _base: Runnable, + pub mOwner: RefPtr<imgRequestProxy>, + pub mStatus: nsresult, } #[test] -fn bindgen_test_layout_URLValueData() { - assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize); - assert_eq!(::std::mem::align_of::<URLValueData>() , 8usize); +fn bindgen_test_layout_imgRequestProxy_imgCancelRunnable() { + assert_eq!(::std::mem::size_of::<imgRequestProxy_imgCancelRunnable>() , + 40usize); + assert_eq!(::std::mem::align_of::<imgRequestProxy_imgCancelRunnable>() , + 8usize); +} +#[test] +fn bindgen_test_layout_imgRequestProxy() { + assert_eq!(::std::mem::size_of::<imgRequestProxy>() , 120usize); + assert_eq!(::std::mem::align_of::<imgRequestProxy>() , 8usize); } #[repr(C)] -pub struct URLValue { - pub _bindgen_opaque_blob: [u64; 7usize], +pub struct bindgen_vtable__bindgen_id_206771 { +} +/** + * An interface for observing changes to image state, as reported by + * ProgressTracker. + * + * This is the ImageLib-internal version of imgINotificationObserver, + * essentially, with implementation details that code outside of ImageLib + * shouldn't see. + * + * XXX(seth): It's preferable to avoid adding anything to this interface if + * possible. In the long term, it would be ideal to get to a place where we can + * just use the imgINotificationObserver interface internally as well. + */ +#[repr(C)] +#[derive(Debug)] +pub struct IProgressObserver { + pub vtable_: *const bindgen_vtable__bindgen_id_206771, + pub _base: u64, } #[test] -fn bindgen_test_layout_URLValue() { - assert_eq!(::std::mem::size_of::<URLValue>() , 56usize); - assert_eq!(::std::mem::align_of::<URLValue>() , 8usize); +fn bindgen_test_layout_IProgressObserver() { + assert_eq!(::std::mem::size_of::<IProgressObserver>() , 16usize); + assert_eq!(::std::mem::align_of::<IProgressObserver>() , 8usize); } #[repr(C)] -pub struct ImageValue { - pub _bindgen_opaque_blob: [u64; 14usize], +#[derive(Debug, Copy)] +pub struct nsISupportsPriority { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsISupportsPriority_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsISupportsPriority__bindgen_ty_bindgen_id_206852 { + PRIORITY_HIGHEST = -20, + PRIORITY_HIGH = -10, + PRIORITY_NORMAL = 0, + PRIORITY_LOW = 10, + PRIORITY_LOWEST = 20, } #[test] -fn bindgen_test_layout_ImageValue() { - assert_eq!(::std::mem::size_of::<ImageValue>() , 112usize); - assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize); +fn bindgen_test_layout_nsISupportsPriority() { + assert_eq!(::std::mem::size_of::<nsISupportsPriority>() , 8usize); + assert_eq!(::std::mem::align_of::<nsISupportsPriority>() , 8usize); +} +impl Clone for nsISupportsPriority { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsISecurityInfoProvider { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsISecurityInfoProvider_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsISecurityInfoProvider() { + assert_eq!(::std::mem::size_of::<nsISecurityInfoProvider>() , 8usize); + assert_eq!(::std::mem::align_of::<nsISecurityInfoProvider>() , 8usize); +} +impl Clone for nsISecurityInfoProvider { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsITimedChannel { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsITimedChannel_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsITimedChannel() { + assert_eq!(::std::mem::size_of::<nsITimedChannel>() , 8usize); + assert_eq!(::std::mem::align_of::<nsITimedChannel>() , 8usize); +} +impl Clone for nsITimedChannel { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] @@ -4701,6 +9037,7 @@ pub struct GridTemplateAreasValue { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type GridTemplateAreasValue_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_GridTemplateAreasValue() { assert_eq!(::std::mem::size_of::<GridTemplateAreasValue>() , 40usize); @@ -4713,13 +9050,14 @@ pub struct FontFamilyListRefCnt { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type FontFamilyListRefCnt_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_FontFamilyListRefCnt() { assert_eq!(::std::mem::size_of::<FontFamilyListRefCnt>() , 32usize); assert_eq!(::std::mem::align_of::<FontFamilyListRefCnt>() , 8usize); } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSUnit { eCSSUnit_Null = 0, eCSSUnit_Auto = 1, @@ -4808,184 +9146,71 @@ pub enum nsCSSUnit { } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValue { - pub mUnit: nsCSSUnit, - pub mValue: nsCSSValue_nsCSSValue_h_unnamed_13, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSValue_Serialization { eNormalized = 0, eAuthorSpecified = 1, } -#[repr(C)] -#[derive(Debug, Copy)] -pub struct nsCSSValue_nsCSSValue_h_unnamed_13 { - pub mInt: __BindgenUnionField<i32>, - pub mFloat: __BindgenUnionField<f32>, - pub mString: __BindgenUnionField<*mut nsStringBuffer>, - pub mColor: __BindgenUnionField<nscolor>, - pub mArray: __BindgenUnionField<*mut Array>, - pub mURL: __BindgenUnionField<*mut URLValue>, - pub mImage: __BindgenUnionField<*mut ImageValue>, - pub mGridTemplateAreas: __BindgenUnionField<*mut GridTemplateAreasValue>, - pub mGradient: __BindgenUnionField<*mut nsCSSValueGradient>, - pub mTokenStream: __BindgenUnionField<*mut nsCSSValueTokenStream>, - pub mPair: __BindgenUnionField<*mut nsCSSValuePair_heap>, - pub mRect: __BindgenUnionField<*mut nsCSSRect_heap>, - pub mTriplet: __BindgenUnionField<*mut nsCSSValueTriplet_heap>, - pub mList: __BindgenUnionField<*mut nsCSSValueList_heap>, - pub mListDependent: __BindgenUnionField<*mut nsCSSValueList>, - pub mSharedList: __BindgenUnionField<*mut nsCSSValueSharedList>, - pub mPairList: __BindgenUnionField<*mut nsCSSValuePairList_heap>, - pub mPairListDependent: __BindgenUnionField<*mut nsCSSValuePairList>, - pub mFloatColor: __BindgenUnionField<*mut nsCSSValueFloatColor>, - pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>, - pub _bindgen_data_: u64, -} -impl nsCSSValue_nsCSSValue_h_unnamed_13 { - pub unsafe fn mInt(&mut self) -> *mut i32 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mFloat(&mut self) -> *mut f32 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mString(&mut self) -> *mut *mut nsStringBuffer { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mColor(&mut self) -> *mut nscolor { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mArray(&mut self) -> *mut *mut Array { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mURL(&mut self) -> *mut *mut URLValue { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mImage(&mut self) -> *mut *mut ImageValue { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mGridTemplateAreas(&mut self) - -> *mut *mut GridTemplateAreasValue { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mGradient(&mut self) -> *mut *mut nsCSSValueGradient { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mTokenStream(&mut self) -> *mut *mut nsCSSValueTokenStream { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPair(&mut self) -> *mut *mut nsCSSValuePair_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mRect(&mut self) -> *mut *mut nsCSSRect_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mTriplet(&mut self) -> *mut *mut nsCSSValueTriplet_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mList(&mut self) -> *mut *mut nsCSSValueList_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mListDependent(&mut self) -> *mut *mut nsCSSValueList { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mSharedList(&mut self) -> *mut *mut nsCSSValueSharedList { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPairList(&mut self) -> *mut *mut nsCSSValuePairList_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPairListDependent(&mut self) - -> *mut *mut nsCSSValuePairList { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mFloatColor(&mut self) -> *mut *mut nsCSSValueFloatColor { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mFontFamilyList(&mut self) - -> *mut *mut FontFamilyListRefCnt { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsCSSValue_nsCSSValue_h_unnamed_13 { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_nsCSSValue_nsCSSValue_h_unnamed_13() { - assert_eq!(::std::mem::size_of::<nsCSSValue_nsCSSValue_h_unnamed_13>() , - 8usize); - assert_eq!(::std::mem::align_of::<nsCSSValue_nsCSSValue_h_unnamed_13>() , - 8usize); -} -#[test] -fn bindgen_test_layout_nsCSSValue() { - assert_eq!(::std::mem::size_of::<nsCSSValue>() , 16usize); - assert_eq!(::std::mem::align_of::<nsCSSValue>() , 8usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct Array { - pub mRefCnt: usize, - pub mCount: usize, - pub mArray: [nsCSSValue; 1usize], +pub struct nsCSSValueGradient { + pub mIsRadial: bool, + pub mIsRepeating: bool, + pub mIsLegacySyntax: bool, + pub mIsExplicitSize: bool, + pub mBgPos: nsCSSValuePair, + pub mAngle: nsCSSValue, + pub mRadialValues: [nsCSSValue; 2usize], + pub mStops: nsTArray<nsCSSValueGradientStop>, + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValueGradient_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_Array() { - assert_eq!(::std::mem::size_of::<Array>() , 32usize); - assert_eq!(::std::mem::align_of::<Array>() , 8usize); +fn bindgen_test_layout_nsCSSValueGradient() { + assert_eq!(::std::mem::size_of::<nsCSSValueGradient>() , 112usize); + assert_eq!(::std::mem::align_of::<nsCSSValueGradient>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueList { - pub mValue: nsCSSValue, - pub mNext: *mut nsCSSValueList, +pub struct nsCSSValuePair { + pub mXValue: nsCSSValue, + pub mYValue: nsCSSValue, } #[test] -fn bindgen_test_layout_nsCSSValueList() { - assert_eq!(::std::mem::size_of::<nsCSSValueList>() , 24usize); - assert_eq!(::std::mem::align_of::<nsCSSValueList>() , 8usize); +fn bindgen_test_layout_nsCSSValuePair() { + assert_eq!(::std::mem::size_of::<nsCSSValuePair>() , 32usize); + assert_eq!(::std::mem::align_of::<nsCSSValuePair>() , 8usize); } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum Serialization { eNormalized = 0, eAuthorSpecified = 1, } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueList_heap { - pub _base: nsCSSValueList, +pub struct nsCSSValuePair_heap { + pub _base: nsCSSValuePair, pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValuePair_heap_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValueList_heap() { - assert_eq!(::std::mem::size_of::<nsCSSValueList_heap>() , 40usize); - assert_eq!(::std::mem::align_of::<nsCSSValueList_heap>() , 8usize); +fn bindgen_test_layout_nsCSSValuePair_heap() { + assert_eq!(::std::mem::size_of::<nsCSSValuePair_heap>() , 48usize); + assert_eq!(::std::mem::align_of::<nsCSSValuePair_heap>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueSharedList { +pub struct nsCSSValueTokenStream { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, - pub mHead: *mut nsCSSValueList, + pub mPropertyID: nsCSSPropertyID, + pub mShorthandPropertyID: nsCSSPropertyID, + pub mTokenStream: nsString, + pub mBaseURI: nsCOMPtr<nsIURI>, + pub mSheetURI: nsCOMPtr<nsIURI>, + pub mSheetPrincipal: nsCOMPtr<nsIPrincipal>, + pub mLineNumber: u32, + pub mLineOffset: u32, + pub mLevel: SheetType, } +pub type nsCSSValueTokenStream_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValueSharedList() { - assert_eq!(::std::mem::size_of::<nsCSSValueSharedList>() , 24usize); - assert_eq!(::std::mem::align_of::<nsCSSValueSharedList>() , 8usize); +fn bindgen_test_layout_nsCSSValueTokenStream() { + assert_eq!(::std::mem::size_of::<nsCSSValueTokenStream>() , 80usize); + assert_eq!(::std::mem::align_of::<nsCSSValueTokenStream>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -4995,15 +9220,16 @@ pub struct nsCSSRect { pub mBottom: nsCSSValue, pub mLeft: nsCSSValue, } +pub type nsCSSRect_side_type = *mut nsCSSValue; +extern "C" { + #[link_name = "_ZN9nsCSSRect5sidesE"] + pub static mut nsCSSRect_sides: [nsCSSRect_side_type; 4usize]; +} #[test] fn bindgen_test_layout_nsCSSRect() { assert_eq!(::std::mem::size_of::<nsCSSRect>() , 64usize); assert_eq!(::std::mem::align_of::<nsCSSRect>() , 8usize); } -extern "C" { - #[link_name = "_ZN9nsCSSRect5sidesE"] - pub static mut nsCSSRect_consts_sides: [::std::os::raw::c_void; 4usize]; -} #[repr(C)] #[derive(Debug)] pub struct nsCSSRect_heap { @@ -5011,6 +9237,7 @@ pub struct nsCSSRect_heap { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSRect_heap_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_nsCSSRect_heap() { assert_eq!(::std::mem::size_of::<nsCSSRect_heap>() , 80usize); @@ -5018,50 +9245,40 @@ fn bindgen_test_layout_nsCSSRect_heap() { } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValuePair { - pub mXValue: nsCSSValue, - pub mYValue: nsCSSValue, +pub struct nsCSSValueList { + pub mValue: nsCSSValue, + pub mNext: *mut nsCSSValueList, } #[test] -fn bindgen_test_layout_nsCSSValuePair() { - assert_eq!(::std::mem::size_of::<nsCSSValuePair>() , 32usize); - assert_eq!(::std::mem::align_of::<nsCSSValuePair>() , 8usize); +fn bindgen_test_layout_nsCSSValueList() { + assert_eq!(::std::mem::size_of::<nsCSSValueList>() , 24usize); + assert_eq!(::std::mem::align_of::<nsCSSValueList>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValuePair_heap { - pub _base: nsCSSValuePair, +pub struct nsCSSValueList_heap { + pub _base: nsCSSValueList, pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValueList_heap_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValuePair_heap() { - assert_eq!(::std::mem::size_of::<nsCSSValuePair_heap>() , 48usize); - assert_eq!(::std::mem::align_of::<nsCSSValuePair_heap>() , 8usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct nsCSSValueTriplet { - pub mXValue: nsCSSValue, - pub mYValue: nsCSSValue, - pub mZValue: nsCSSValue, -} -#[test] -fn bindgen_test_layout_nsCSSValueTriplet() { - assert_eq!(::std::mem::size_of::<nsCSSValueTriplet>() , 48usize); - assert_eq!(::std::mem::align_of::<nsCSSValueTriplet>() , 8usize); +fn bindgen_test_layout_nsCSSValueList_heap() { + assert_eq!(::std::mem::size_of::<nsCSSValueList_heap>() , 40usize); + assert_eq!(::std::mem::align_of::<nsCSSValueList_heap>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueTriplet_heap { - pub _base: nsCSSValueTriplet, +pub struct nsCSSValueSharedList { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, + pub mHead: *mut nsCSSValueList, } +pub type nsCSSValueSharedList_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValueTriplet_heap() { - assert_eq!(::std::mem::size_of::<nsCSSValueTriplet_heap>() , 64usize); - assert_eq!(::std::mem::align_of::<nsCSSValueTriplet_heap>() , 8usize); +fn bindgen_test_layout_nsCSSValueSharedList() { + assert_eq!(::std::mem::size_of::<nsCSSValueSharedList>() , 24usize); + assert_eq!(::std::mem::align_of::<nsCSSValueSharedList>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -5082,6 +9299,7 @@ pub struct nsCSSValuePairList_heap { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValuePairList_heap_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_nsCSSValuePairList_heap() { assert_eq!(::std::mem::size_of::<nsCSSValuePairList_heap>() , 56usize); @@ -5089,53 +9307,28 @@ fn bindgen_test_layout_nsCSSValuePairList_heap() { } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueGradientStop { - pub mLocation: nsCSSValue, - pub mColor: nsCSSValue, - pub mIsInterpolationHint: bool, +pub struct nsCSSValueTriplet { + pub mXValue: nsCSSValue, + pub mYValue: nsCSSValue, + pub mZValue: nsCSSValue, } #[test] -fn bindgen_test_layout_nsCSSValueGradientStop() { - assert_eq!(::std::mem::size_of::<nsCSSValueGradientStop>() , 40usize); - assert_eq!(::std::mem::align_of::<nsCSSValueGradientStop>() , 8usize); +fn bindgen_test_layout_nsCSSValueTriplet() { + assert_eq!(::std::mem::size_of::<nsCSSValueTriplet>() , 48usize); + assert_eq!(::std::mem::align_of::<nsCSSValueTriplet>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueGradient { - pub mIsRadial: bool, - pub mIsRepeating: bool, - pub mIsLegacySyntax: bool, - pub mIsExplicitSize: bool, - pub mBgPos: nsCSSValuePair, - pub mAngle: nsCSSValue, - pub mRadialValues: [nsCSSValue; 2usize], - pub mStops: nsTArray<nsCSSValueGradientStop>, +pub struct nsCSSValueTriplet_heap { + pub _base: nsCSSValueTriplet, pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValueTriplet_heap_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValueGradient() { - assert_eq!(::std::mem::size_of::<nsCSSValueGradient>() , 112usize); - assert_eq!(::std::mem::align_of::<nsCSSValueGradient>() , 8usize); -} -#[repr(C)] -pub struct nsCSSValueTokenStream { - pub mRefCnt: nsAutoRefCnt, - pub _mOwningThread: nsAutoOwningThread, - pub mPropertyID: nsCSSPropertyID, - pub mShorthandPropertyID: nsCSSPropertyID, - pub mTokenStream: nsString, - pub mBaseURI: nsCOMPtr<nsIURI>, - pub mSheetURI: nsCOMPtr<nsIURI>, - pub mSheetPrincipal: nsCOMPtr<nsIPrincipal>, - pub mLineNumber: u32, - pub mLineOffset: u32, - pub mLevel: SheetType, -} -#[test] -fn bindgen_test_layout_nsCSSValueTokenStream() { - assert_eq!(::std::mem::size_of::<nsCSSValueTokenStream>() , 80usize); - assert_eq!(::std::mem::align_of::<nsCSSValueTokenStream>() , 8usize); +fn bindgen_test_layout_nsCSSValueTriplet_heap() { + assert_eq!(::std::mem::size_of::<nsCSSValueTriplet_heap>() , 64usize); + assert_eq!(::std::mem::align_of::<nsCSSValueTriplet_heap>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -5147,6 +9340,7 @@ pub struct nsCSSValueFloatColor { pub mComponent3: f32, pub mAlpha: f32, } +pub type nsCSSValueFloatColor_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_nsCSSValueFloatColor() { assert_eq!(::std::mem::size_of::<nsCSSValueFloatColor>() , 32usize); @@ -5154,420 +9348,161 @@ fn bindgen_test_layout_nsCSSValueFloatColor() { } #[repr(C)] #[derive(Debug)] -pub struct nsCSSCornerSizes { - pub mTopLeft: nsCSSValue, - pub mTopRight: nsCSSValue, - pub mBottomRight: nsCSSValue, - pub mBottomLeft: nsCSSValue, +pub struct nsCSSValue { + pub mUnit: nsCSSUnit, + pub mValue: nsCSSValue__bindgen_ty_bindgen_id_209746, } -#[test] -fn bindgen_test_layout_nsCSSCornerSizes() { - assert_eq!(::std::mem::size_of::<nsCSSCornerSizes>() , 64usize); - assert_eq!(::std::mem::align_of::<nsCSSCornerSizes>() , 8usize); +#[repr(C)] +#[derive(Debug)] +pub struct nsCSSValue_Array { + pub mRefCnt: usize, + pub mCount: usize, + pub mArray: [nsCSSValue; 1usize], } -extern "C" { - #[link_name = "_ZN16nsCSSCornerSizes7cornersE"] - pub static mut nsCSSCornerSizes_consts_corners: - [::std::os::raw::c_void; 4usize]; +#[test] +fn bindgen_test_layout_nsCSSValue_Array() { + assert_eq!(::std::mem::size_of::<nsCSSValue_Array>() , 32usize); + assert_eq!(::std::mem::align_of::<nsCSSValue_Array>() , 8usize); } -pub enum WritingMode { } -pub type CounterValue = i32; -pub enum NegativeType { } -pub enum PadType { } #[repr(C)] #[derive(Debug, Copy)] -pub struct CounterStyle { - pub _vftable: *const _vftable_CounterStyle, - pub mStyle: i32, +pub struct nsCSSValue__bindgen_ty_bindgen_id_209746 { + pub mInt: __BindgenUnionField<i32>, + pub mFloat: __BindgenUnionField<f32>, + pub mString: __BindgenUnionField<*mut nsStringBuffer>, + pub mColor: __BindgenUnionField<nscolor>, + pub mArray: __BindgenUnionField<*mut nsCSSValue_Array>, + pub mURL: __BindgenUnionField<*mut URLValue>, + pub mImage: __BindgenUnionField<*mut ImageValue>, + pub mGridTemplateAreas: __BindgenUnionField<*mut GridTemplateAreasValue>, + pub mGradient: __BindgenUnionField<*mut nsCSSValueGradient>, + pub mTokenStream: __BindgenUnionField<*mut nsCSSValueTokenStream>, + pub mPair: __BindgenUnionField<*mut nsCSSValuePair_heap>, + pub mRect: __BindgenUnionField<*mut nsCSSRect_heap>, + pub mTriplet: __BindgenUnionField<*mut nsCSSValueTriplet_heap>, + pub mList: __BindgenUnionField<*mut nsCSSValueList_heap>, + pub mListDependent: __BindgenUnionField<*mut nsCSSValueList>, + pub mSharedList: __BindgenUnionField<*mut nsCSSValueSharedList>, + pub mPairList: __BindgenUnionField<*mut nsCSSValuePairList_heap>, + pub mPairListDependent: __BindgenUnionField<*mut nsCSSValuePairList>, + pub mFloatColor: __BindgenUnionField<*mut nsCSSValueFloatColor>, + pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>, + pub bindgen_union_field: u64, } -#[repr(C)] -pub struct _vftable_CounterStyle { - pub _bindgen_empty_ctype_warning_fix: u64, +#[test] +fn bindgen_test_layout_nsCSSValue__bindgen_ty_bindgen_id_209746() { + assert_eq!(::std::mem::size_of::<nsCSSValue__bindgen_ty_bindgen_id_209746>() + , 8usize); + assert_eq!(::std::mem::align_of::<nsCSSValue__bindgen_ty_bindgen_id_209746>() + , 8usize); } -impl ::std::clone::Clone for CounterStyle { +impl Clone for nsCSSValue__bindgen_ty_bindgen_id_209746 { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_CounterStyle() { - assert_eq!(::std::mem::size_of::<CounterStyle>() , 16usize); - assert_eq!(::std::mem::align_of::<CounterStyle>() , 8usize); +fn bindgen_test_layout_nsCSSValue() { + assert_eq!(::std::mem::size_of::<nsCSSValue>() , 16usize); + assert_eq!(::std::mem::align_of::<nsCSSValue>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct AnonymousCounterStyle { - pub _base: CounterStyle, - pub mRefCnt: nsAutoRefCnt, - pub _mOwningThread: nsAutoOwningThread, - pub mSingleString: bool, - pub mSystem: u8, - pub mSymbols: nsTArray<nsString>, -} -#[repr(C)] -pub struct _vftable_AnonymousCounterStyle { - pub _base: _vftable_CounterStyle, +pub struct nsCSSValueGradientStop { + pub mLocation: nsCSSValue, + pub mColor: nsCSSValue, + pub mIsInterpolationHint: bool, } #[test] -fn bindgen_test_layout_AnonymousCounterStyle() { - assert_eq!(::std::mem::size_of::<AnonymousCounterStyle>() , 48usize); - assert_eq!(::std::mem::align_of::<AnonymousCounterStyle>() , 8usize); +fn bindgen_test_layout_nsCSSValueGradientStop() { + assert_eq!(::std::mem::size_of::<nsCSSValueGradientStop>() , 40usize); + assert_eq!(::std::mem::align_of::<nsCSSValueGradientStop>() , 8usize); } #[repr(C)] -pub struct CounterStyleManager { - pub _bindgen_opaque_blob: [u64; 9usize], -} -#[test] -fn bindgen_test_layout_CounterStyleManager() { - assert_eq!(::std::mem::size_of::<CounterStyleManager>() , 72usize); - assert_eq!(::std::mem::align_of::<CounterStyleManager>() , 8usize); +pub struct bindgen_vtable__bindgen_id_209953 { } -/** - * A class for holding strong references to nsPresArena-allocated - * objects. - * - * Since the arena's lifetime is not related to the refcounts - * of the objects allocated within it, it is possible to have a strong - * reference to an arena-allocated object that lives until the - * destruction of the arena. An ArenaRefPtr acts like a weak reference - * in that it will clear its referent if the arena is about to go away. - * - * T must be a class that has these two methods: - * - * static mozilla::ArenaObjectID ArenaObjectID(); - * U* Arena(); - * - * where U is a class that has these two methods: - * - * void RegisterArenaRefPtr(ArenaRefPtr<T>*); - * void DeregisterArenaRefPtr(ArenaRefPtr<T>*); - * - * Currently, both nsPresArena and nsIPresShell can be used as U. - * - * The ArenaObjectID method must return the mozilla::ArenaObjectID that - * uniquely identifies T, and the Arena method must return the nsPresArena - * (or a proxy for it) in which the object was allocated. - */ #[repr(C)] -#[derive(Debug)] -pub struct ArenaRefPtr<T> { - pub mPtr: RefPtr<T>, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum gfxFontConstants_h_unnamed_14 { - eFeatureAlternates_historical = 0, - eFeatureAlternates_stylistic = 1, - eFeatureAlternates_styleset = 2, - eFeatureAlternates_character_variant = 3, - eFeatureAlternates_swash = 4, - eFeatureAlternates_ornaments = 5, - eFeatureAlternates_annotation = 6, - eFeatureAlternates_numFeatures = 7, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum gfxFontConstants_h_unnamed_15 { - eFeatureEastAsian_jis78 = 0, - eFeatureEastAsian_jis83 = 1, - eFeatureEastAsian_jis90 = 2, - eFeatureEastAsian_jis04 = 3, - eFeatureEastAsian_simplified = 4, - eFeatureEastAsian_traditional = 5, - eFeatureEastAsian_full_width = 6, - eFeatureEastAsian_prop_width = 7, - eFeatureEastAsian_ruby = 8, - eFeatureEastAsian_numFeatures = 9, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum gfxFontConstants_h_unnamed_16 { - eFeatureLigatures_none = 0, - eFeatureLigatures_common = 1, - eFeatureLigatures_no_common = 2, - eFeatureLigatures_discretionary = 3, - eFeatureLigatures_no_discretionary = 4, - eFeatureLigatures_historical = 5, - eFeatureLigatures_no_historical = 6, - eFeatureLigatures_contextual = 7, - eFeatureLigatures_no_contextual = 8, - eFeatureLigatures_numFeatures = 9, +#[derive(Debug, Copy)] +pub struct CounterStyle { + pub vtable_: *const bindgen_vtable__bindgen_id_209953, + pub mStyle: i32, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum gfxFontConstants_h_unnamed_17 { - eFeatureNumeric_lining = 0, - eFeatureNumeric_oldstyle = 1, - eFeatureNumeric_proportional = 2, - eFeatureNumeric_tabular = 3, - eFeatureNumeric_diagonal_fractions = 4, - eFeatureNumeric_stacked_fractions = 5, - eFeatureNumeric_slashedzero = 6, - eFeatureNumeric_ordinal = 7, - eFeatureNumeric_numFeatures = 8, -} -pub const eFontPrefLang_First: eFontPrefLang = - eFontPrefLang::eFontPrefLang_Western; -pub const eFontPrefLang_Last: eFontPrefLang = - eFontPrefLang::eFontPrefLang_Others; -pub const eFontPrefLang_Count: eFontPrefLang = - eFontPrefLang::eFontPrefLang_CJKSet; -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum eFontPrefLang { - eFontPrefLang_Western = 0, - eFontPrefLang_Japanese = 1, - eFontPrefLang_ChineseTW = 2, - eFontPrefLang_ChineseCN = 3, - eFontPrefLang_ChineseHK = 4, - eFontPrefLang_Korean = 5, - eFontPrefLang_Cyrillic = 6, - eFontPrefLang_Greek = 7, - eFontPrefLang_Thai = 8, - eFontPrefLang_Hebrew = 9, - eFontPrefLang_Arabic = 10, - eFontPrefLang_Devanagari = 11, - eFontPrefLang_Tamil = 12, - eFontPrefLang_Armenian = 13, - eFontPrefLang_Bengali = 14, - eFontPrefLang_Canadian = 15, - eFontPrefLang_Ethiopic = 16, - eFontPrefLang_Georgian = 17, - eFontPrefLang_Gujarati = 18, - eFontPrefLang_Gurmukhi = 19, - eFontPrefLang_Khmer = 20, - eFontPrefLang_Malayalam = 21, - eFontPrefLang_Mathematics = 22, - eFontPrefLang_Oriya = 23, - eFontPrefLang_Telugu = 24, - eFontPrefLang_Kannada = 25, - eFontPrefLang_Sinhala = 26, - eFontPrefLang_Tibetan = 27, - eFontPrefLang_Others = 28, - eFontPrefLang_CJKSet = 29, +#[test] +fn bindgen_test_layout_CounterStyle() { + assert_eq!(::std::mem::size_of::<CounterStyle>() , 16usize); + assert_eq!(::std::mem::align_of::<CounterStyle>() , 8usize); } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum LogicalAxis { eLogicalAxisBlock = 0, eLogicalAxisInline = 1, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum LogicalEdge { eLogicalEdgeStart = 0, eLogicalEdgeEnd = 1, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum LogicalSide { - eLogicalSideBStart = 0, - eLogicalSideBEnd = 1, - eLogicalSideIStart = 2, - eLogicalSideIEnd = 3, -} -pub const eStyleUnit_MAX: nsStyleUnit = nsStyleUnit::eStyleUnit_Calc; -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleUnit { - eStyleUnit_Null = 0, - eStyleUnit_Normal = 1, - eStyleUnit_Auto = 2, - eStyleUnit_None = 3, - eStyleUnit_Percent = 10, - eStyleUnit_Factor = 11, - eStyleUnit_Degree = 12, - eStyleUnit_Grad = 13, - eStyleUnit_Radian = 14, - eStyleUnit_Turn = 15, - eStyleUnit_FlexFraction = 16, - eStyleUnit_Coord = 20, - eStyleUnit_Integer = 30, - eStyleUnit_Enumerated = 32, - eStyleUnit_Calc = 40, +impl Clone for CounterStyle { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleCoord_h_unnamed_18 { - pub mInt: __BindgenUnionField<i32>, - pub mFloat: __BindgenUnionField<f32>, - pub mPointer: __BindgenUnionField<*mut ::std::os::raw::c_void>, - pub _bindgen_data_: u64, -} -impl nsStyleCoord_h_unnamed_18 { - pub unsafe fn mInt(&mut self) -> *mut i32 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mFloat(&mut self) -> *mut f32 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPointer(&mut self) -> *mut *mut ::std::os::raw::c_void { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleCoord_h_unnamed_18 { - fn clone(&self) -> Self { *self } +pub struct LookAndFeelInt { + pub id: i32, + pub value: i32, } #[test] -fn bindgen_test_layout_nsStyleCoord_h_unnamed_18() { - assert_eq!(::std::mem::size_of::<nsStyleCoord_h_unnamed_18>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleCoord_h_unnamed_18>() , 8usize); +fn bindgen_test_layout_LookAndFeelInt() { + assert_eq!(::std::mem::size_of::<LookAndFeelInt>() , 8usize); + assert_eq!(::std::mem::align_of::<LookAndFeelInt>() , 4usize); } -pub type nsStyleUnion = nsStyleCoord_h_unnamed_18; -/** - * Class that hold a single size specification used by the style - * system. The size specification consists of two parts -- a number - * and a unit. The number is an integer, a floating point value, an - * nscoord, or undefined, and the unit is an nsStyleUnit. Checking - * the unit is a must before asking for the value in any particular - * form. - */ - /** <div rustbindgen private accessor="unsafe"></div> */ -#[repr(C)] -#[derive(Debug)] -pub struct nsStyleCoord { - mUnit: nsStyleUnit, - mValue: nsStyleUnion, -} -impl nsStyleCoord { - #[inline] - pub unsafe fn get_mUnit(&self) -> &nsStyleUnit { &self.mUnit } - pub unsafe fn get_mUnit_mut(&mut self) -> &mut nsStyleUnit { - &mut self.mUnit - } - #[inline] - pub unsafe fn get_mValue(&self) -> &nsStyleUnion { &self.mValue } - pub unsafe fn get_mValue_mut(&mut self) -> &mut nsStyleUnion { - &mut self.mValue - } +impl Clone for LookAndFeelInt { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleCoord_CalcValue { - pub mLength: nscoord, - pub mPercent: f32, - pub mHasPercent: bool, +pub struct imgIContainer { + pub _address: u8, } -impl ::std::clone::Clone for nsStyleCoord_CalcValue { +impl Clone for imgIContainer { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsStyleCoord_CalcValue() { - assert_eq!(::std::mem::size_of::<nsStyleCoord_CalcValue>() , 12usize); - assert_eq!(::std::mem::align_of::<nsStyleCoord_CalcValue>() , 4usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct nsStyleCoord_Calc { - pub _base: nsStyleCoord_CalcValue, - pub mRefCnt: ThreadSafeAutoRefCnt, -} -#[test] -fn bindgen_test_layout_nsStyleCoord_Calc() { - assert_eq!(::std::mem::size_of::<nsStyleCoord_Calc>() , 24usize); - assert_eq!(::std::mem::align_of::<nsStyleCoord_Calc>() , 8usize); -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleCoord_CoordConstructorType { CoordConstructor = 0, } -#[test] -fn bindgen_test_layout_nsStyleCoord() { - assert_eq!(::std::mem::size_of::<nsStyleCoord>() , 16usize); - assert_eq!(::std::mem::align_of::<nsStyleCoord>() , 8usize); -} -/** - * Class that represents a set of top/right/bottom/left nsStyleCoords. - * This is commonly used to hold the widths of the borders, margins, - * or paddings of a box. - */ - /** <div rustbindgen private accessor="unsafe"></div> */ #[repr(C)] -#[derive(Debug)] -pub struct nsStyleSides { - mUnits: [nsStyleUnit; 4usize], - mValues: [nsStyleUnion; 4usize], -} -impl nsStyleSides { - #[inline] - pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 4usize] { &self.mUnits } - pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 4usize] { - &mut self.mUnits - } - #[inline] - pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 4usize] { - &self.mValues - } - pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 4usize] { - &mut self.mValues - } +#[derive(Debug, Copy)] +pub struct ImageURL { + pub _address: u8, } -#[test] -fn bindgen_test_layout_nsStyleSides() { - assert_eq!(::std::mem::size_of::<nsStyleSides>() , 40usize); - assert_eq!(::std::mem::align_of::<nsStyleSides>() , 8usize); +impl Clone for ImageURL { + fn clone(&self) -> Self { *self } } -/** - * Class that represents a set of top-left/top-right/bottom-right/bottom-left - * nsStyleCoord pairs. This is used to hold the dimensions of the - * corners of a box (for, e.g., border-radius and outline-radius). - */ - /** <div rustbindgen private accessor="unsafe"></div> */ #[repr(C)] -#[derive(Debug)] -pub struct nsStyleCorners { - mUnits: [nsStyleUnit; 8usize], - mValues: [nsStyleUnion; 8usize], -} -impl nsStyleCorners { - #[inline] - pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 8usize] { &self.mUnits } - pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 8usize] { - &mut self.mUnits - } - #[inline] - pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 8usize] { - &self.mValues - } - pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 8usize] { - &mut self.mValues - } +#[derive(Debug, Copy)] +pub struct Image { + pub _address: u8, } -#[test] -fn bindgen_test_layout_nsStyleCorners() { - assert_eq!(::std::mem::size_of::<nsStyleCorners>() , 72usize); - assert_eq!(::std::mem::align_of::<nsStyleCorners>() , 8usize); +impl Clone for Image { + fn clone(&self) -> Self { *self } } -pub enum imgIContainer { } -pub enum imgINotificationObserver { } #[repr(C)] -pub struct imgIRequest { - pub _bindgen_opaque_blob: u64, +#[derive(Debug, Copy)] +pub struct ProgressTracker { + pub _address: u8, } -#[test] -fn bindgen_test_layout_imgIRequest() { - assert_eq!(::std::mem::size_of::<imgIRequest>() , 8usize); - assert_eq!(::std::mem::align_of::<imgIRequest>() , 8usize); +impl Clone for ProgressTracker { + fn clone(&self) -> Self { *self } } -pub enum imgStatusNotifyRunnable { } -pub enum ProxyBehaviour { } -pub enum Image { } -pub enum ImageURL { } -pub enum ProgressTracker { } #[repr(C)] -pub struct imgRequestProxy { - pub _bindgen_opaque_blob: [u64; 15usize], +#[derive(Debug, Copy)] +pub struct ProxyBehaviour { + pub _address: u8, } -#[test] -fn bindgen_test_layout_imgRequestProxy() { - assert_eq!(::std::mem::size_of::<imgRequestProxy>() , 120usize); - assert_eq!(::std::mem::align_of::<imgRequestProxy>() , 8usize); +impl Clone for ProxyBehaviour { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct imgRequestProxyStatic { - pub _bindgen_opaque_blob: [u64; 16usize], +#[derive(Debug)] +pub struct nsStyleVisibility { + pub mImageOrientation: nsStyleImageOrientation, + pub mDirection: u8, + pub mVisible: u8, + pub mImageRendering: u8, + pub mWritingMode: u8, + pub mTextOrientation: u8, + pub mColorAdjust: u8, } #[test] -fn bindgen_test_layout_imgRequestProxyStatic() { - assert_eq!(::std::mem::size_of::<imgRequestProxyStatic>() , 128usize); - assert_eq!(::std::mem::align_of::<imgRequestProxyStatic>() , 8usize); +fn bindgen_test_layout_nsStyleVisibility() { + assert_eq!(::std::mem::size_of::<nsStyleVisibility>() , 7usize); + assert_eq!(::std::mem::align_of::<nsStyleVisibility>() , 1usize); } -pub enum nsStyleContext { } -pub enum nsTextFrame { } #[repr(C)] #[derive(Debug)] pub struct FragmentOrURL { @@ -5582,18 +9517,20 @@ fn bindgen_test_layout_FragmentOrURL() { #[repr(C)] #[derive(Debug, Copy)] pub struct Position { - pub mXPosition: nsStyleCoord_CalcValue, - pub mYPosition: nsStyleCoord_CalcValue, -} -impl ::std::clone::Clone for Position { - fn clone(&self) -> Self { *self } + pub mXPosition: Position_Coord, + pub mYPosition: Position_Coord, } +pub type Position_Coord = nsStyleCoord_CalcValue; #[test] fn bindgen_test_layout_Position() { assert_eq!(::std::mem::size_of::<Position>() , 24usize); assert_eq!(::std::mem::align_of::<Position>() , 4usize); } +impl Clone for Position { + fn clone(&self) -> Self { *self } +} #[repr(C)] +#[derive(Debug)] pub struct nsStyleFont { pub mFont: nsFont, pub mSize: nscoord, @@ -5641,13 +9578,14 @@ pub struct nsStyleGradient { pub mStops: nsTArray<nsStyleGradientStop>, pub mRefCnt: ThreadSafeAutoRefCnt, } +pub type nsStyleGradient_HasThreadSafeRefCnt = TrueType; #[test] fn bindgen_test_layout_nsStyleGradient() { assert_eq!(::std::mem::size_of::<nsStyleGradient>() , 104usize); assert_eq!(::std::mem::align_of::<nsStyleGradient>() , 8usize); } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageType { eStyleImageType_Null = 0, eStyleImageType_Image = 1, @@ -5655,9 +9593,10 @@ pub enum nsStyleImageType { eStyleImageType_Element = 3, } #[repr(C)] +#[derive(Debug)] pub struct CachedBorderImageData { pub mCachedSVGViewportSize: [u64; 2usize], - pub mSubImages: u64, + pub mSubImages: nsCOMArray<imgIContainer>, } #[test] fn bindgen_test_layout_CachedBorderImageData() { @@ -5675,47 +9614,33 @@ fn bindgen_test_layout_CachedBorderImageData() { * image of type (1)). */ #[repr(C)] +#[derive(Debug)] pub struct nsStyleImage { pub mCachedBIData: UniquePtr<CachedBorderImageData, DefaultDelete<CachedBorderImageData>>, pub mType: nsStyleImageType, - pub nsStyleImage_nsStyleStruct_h_unnamed_21: nsStyleImage_nsStyleStruct_h_unnamed_21, + pub __bindgen_anon_1: nsStyleImage__bindgen_ty_bindgen_id_211908, pub mCropRect: UniquePtr<nsStyleSides, DefaultDelete<nsStyleSides>>, pub mImageTracked: bool, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleImage_nsStyleStruct_h_unnamed_21 { +pub struct nsStyleImage__bindgen_ty_bindgen_id_211908 { pub mImage: __BindgenUnionField<*mut imgRequestProxy>, pub mGradient: __BindgenUnionField<*mut nsStyleGradient>, - pub mElementId: __BindgenUnionField<*mut ::std::os::raw::c_ushort>, - pub _bindgen_data_: u64, -} -impl nsStyleImage_nsStyleStruct_h_unnamed_21 { - pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mGradient(&mut self) -> *mut *mut nsStyleGradient { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mElementId(&mut self) - -> *mut *mut ::std::os::raw::c_ushort { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleImage_nsStyleStruct_h_unnamed_21 { - fn clone(&self) -> Self { *self } + pub mElementId: __BindgenUnionField<*mut u16>, + pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleImage_nsStyleStruct_h_unnamed_21() { - assert_eq!(::std::mem::size_of::<nsStyleImage_nsStyleStruct_h_unnamed_21>() +fn bindgen_test_layout_nsStyleImage__bindgen_ty_bindgen_id_211908() { + assert_eq!(::std::mem::size_of::<nsStyleImage__bindgen_ty_bindgen_id_211908>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleImage_nsStyleStruct_h_unnamed_21>() + assert_eq!(::std::mem::align_of::<nsStyleImage__bindgen_ty_bindgen_id_211908>() , 8usize); } +impl Clone for nsStyleImage__bindgen_ty_bindgen_id_211908 { + fn clone(&self) -> Self { *self } +} #[test] fn bindgen_test_layout_nsStyleImage() { assert_eq!(::std::mem::size_of::<nsStyleImage>() , 40usize); @@ -5742,11 +9667,12 @@ pub struct nsStyleAutoArray<T> { pub mOtherElements: nsTArray<T>, } #[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleAutoArray_WithSingleInitialElement { WITH_SINGLE_INITIAL_ELEMENT = 0, } #[repr(C)] +#[derive(Debug)] pub struct nsStyleImageLayers { pub mAttachmentCount: u32, pub mClipCount: u32, @@ -5762,8 +9688,8 @@ pub struct nsStyleImageLayers { pub mLayers: nsStyleAutoArray<nsStyleImageLayers_Layer>, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleImageLayers_nsStyleStruct_h_unnamed_22 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsStyleImageLayers__bindgen_ty_bindgen_id_211954 { shorthand = 0, color = 1, image = 2, @@ -5777,8 +9703,8 @@ pub enum nsStyleImageLayers_nsStyleStruct_h_unnamed_22 { maskMode = 10, composite = 11, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageLayers_LayerType { Background = 0, Mask = 1, } #[repr(C)] #[derive(Debug, Copy)] @@ -5793,9 +9719,6 @@ pub struct nsStyleImageLayers_Size { pub struct nsStyleImageLayers_Size_Dimension { pub _base: nsStyleCoord_CalcValue, } -impl ::std::clone::Clone for nsStyleImageLayers_Size_Dimension { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_nsStyleImageLayers_Size_Dimension() { assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Size_Dimension>() , @@ -5803,8 +9726,11 @@ fn bindgen_test_layout_nsStyleImageLayers_Size_Dimension() { assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Size_Dimension>() , 4usize); } +impl Clone for nsStyleImageLayers_Size_Dimension { + fn clone(&self) -> Self { *self } +} #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageLayers_Size_DimensionType { eContain = 0, eCover = 1, @@ -5812,29 +9738,30 @@ pub enum nsStyleImageLayers_Size_DimensionType { eLengthPercentage = 3, eDimensionType_COUNT = 4, } -impl ::std::clone::Clone for nsStyleImageLayers_Size { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_nsStyleImageLayers_Size() { assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Size>() , 28usize); assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Size>() , 4usize); } +impl Clone for nsStyleImageLayers_Size { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsStyleImageLayers_Repeat { pub mXRepeat: u8, pub mYRepeat: u8, } -impl ::std::clone::Clone for nsStyleImageLayers_Repeat { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_nsStyleImageLayers_Repeat() { assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Repeat>() , 2usize); assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Repeat>() , 1usize); } +impl Clone for nsStyleImageLayers_Repeat { + fn clone(&self) -> Self { *self } +} #[repr(C)] +#[derive(Debug)] pub struct nsStyleImageLayers_Layer { pub mImage: nsStyleImage, pub mSourceURI: FragmentOrURL, @@ -5853,20 +9780,22 @@ fn bindgen_test_layout_nsStyleImageLayers_Layer() { assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Layer>() , 120usize); assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Layer>() , 8usize); } -#[test] -fn bindgen_test_layout_nsStyleImageLayers() { - assert_eq!(::std::mem::size_of::<nsStyleImageLayers>() , 176usize); - assert_eq!(::std::mem::align_of::<nsStyleImageLayers>() , 8usize); -} extern "C" { #[link_name = "_ZN18nsStyleImageLayers21kBackgroundLayerTableE"] - pub static mut nsStyleImageLayers_consts_kBackgroundLayerTable: + pub static mut nsStyleImageLayers_kBackgroundLayerTable: *const nsCSSPropertyID; +} +extern "C" { #[link_name = "_ZN18nsStyleImageLayers15kMaskLayerTableE"] - pub static mut nsStyleImageLayers_consts_kMaskLayerTable: - *const nsCSSPropertyID; + pub static mut nsStyleImageLayers_kMaskLayerTable: *const nsCSSPropertyID; +} +#[test] +fn bindgen_test_layout_nsStyleImageLayers() { + assert_eq!(::std::mem::size_of::<nsStyleImageLayers>() , 176usize); + assert_eq!(::std::mem::align_of::<nsStyleImageLayers>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleBackground { pub mImage: nsStyleImageLayers, pub mBackgroundColor: nscolor, @@ -5930,12 +9859,14 @@ pub struct nsCSSShadowArray { pub mLength: u32, pub mArray: [nsCSSShadowItem; 1usize], } +pub type nsCSSShadowArray_HasThreadSafeRefCnt = TrueType; #[test] fn bindgen_test_layout_nsCSSShadowArray() { assert_eq!(::std::mem::size_of::<nsCSSShadowArray>() , 40usize); assert_eq!(::std::mem::align_of::<nsCSSShadowArray>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleBorder { pub mBorderColors: *mut *mut nsBorderColors, pub mBorderRadius: nsStyleCorners, @@ -5984,14 +9915,18 @@ fn bindgen_test_layout_nsStyleOutline() { #[derive(Debug)] pub struct nsStyleQuoteValues { pub mRefCnt: ThreadSafeAutoRefCnt, - pub mQuotePairs: nsTArray<pair<nsString, nsString>>, + pub mQuotePairs: nsStyleQuoteValues_QuotePairArray, } +pub type nsStyleQuoteValues_QuotePairArray = + nsTArray<pair<nsString, nsString>>; +pub type nsStyleQuoteValues_HasThreadSafeRefCnt = TrueType; #[test] fn bindgen_test_layout_nsStyleQuoteValues() { assert_eq!(::std::mem::size_of::<nsStyleQuoteValues>() , 16usize); assert_eq!(::std::mem::align_of::<nsStyleQuoteValues>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleList { pub mListStylePosition: u8, pub mCounterStyle: RefPtr<CounterStyle>, @@ -5999,18 +9934,19 @@ pub struct nsStyleList { pub mQuotes: RefPtr<nsStyleQuoteValues>, pub mImageRegion: nsRect, } -#[test] -fn bindgen_test_layout_nsStyleList() { - assert_eq!(::std::mem::size_of::<nsStyleList>() , 48usize); - assert_eq!(::std::mem::align_of::<nsStyleList>() , 8usize); -} extern "C" { #[link_name = "_ZN11nsStyleList14sInitialQuotesE"] - pub static mut nsStyleList_consts_sInitialQuotes: + pub static mut nsStyleList_sInitialQuotes: StaticRefPtr<nsStyleQuoteValues>; +} +extern "C" { #[link_name = "_ZN11nsStyleList11sNoneQuotesE"] - pub static mut nsStyleList_consts_sNoneQuotes: - StaticRefPtr<nsStyleQuoteValues>; + pub static mut nsStyleList_sNoneQuotes: StaticRefPtr<nsStyleQuoteValues>; +} +#[test] +fn bindgen_test_layout_nsStyleList() { + assert_eq!(::std::mem::size_of::<nsStyleList>() , 48usize); + assert_eq!(::std::mem::align_of::<nsStyleList>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -6019,17 +9955,19 @@ pub struct nsStyleGridLine { pub mInteger: i32, pub mLineName: nsString, } +extern "C" { + #[link_name = "_ZN15nsStyleGridLine8kMinLineE"] + pub static nsStyleGridLine_kMinLine: i32; +} +extern "C" { + #[link_name = "_ZN15nsStyleGridLine8kMaxLineE"] + pub static nsStyleGridLine_kMaxLine: i32; +} #[test] fn bindgen_test_layout_nsStyleGridLine() { assert_eq!(::std::mem::size_of::<nsStyleGridLine>() , 24usize); assert_eq!(::std::mem::align_of::<nsStyleGridLine>() , 8usize); } -extern "C" { - #[link_name = "_ZN15nsStyleGridLine8kMinLineE"] - pub static nsStyleGridLine_consts_kMinLine: ::std::os::raw::c_int; - #[link_name = "_ZN15nsStyleGridLine8kMaxLineE"] - pub static nsStyleGridLine_consts_kMaxLine: ::std::os::raw::c_int; -} #[repr(C)] #[derive(Debug)] pub struct nsStyleGridTemplate { @@ -6041,34 +9979,36 @@ pub struct nsStyleGridTemplate { pub mRepeatAutoIndex: i16, pub _bitfield_1: u8, } +#[test] +fn bindgen_test_layout_nsStyleGridTemplate() { + assert_eq!(::std::mem::size_of::<nsStyleGridTemplate>() , 48usize); + assert_eq!(::std::mem::align_of::<nsStyleGridTemplate>() , 8usize); +} impl nsStyleGridTemplate { #[inline] - pub fn mIsAutoFill(&self) -> u8 { - (self._bitfield_1 & (1usize as u8)) >> 0usize + pub fn mIsAutoFill(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u8)) >> + 0u32) as u8) + } } #[inline] pub fn set_mIsAutoFill(&mut self, val: bool) { self._bitfield_1 &= !(1usize as u8); - self._bitfield_1 |= ((val as u8) << 0usize) & (1usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 0u32) & (1usize as u8); } #[inline] - pub fn mIsSubgrid(&self) -> u8 { - (self._bitfield_1 & (2usize as u8)) >> 1usize + pub fn mIsSubgrid(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u8)) >> + 1u32) as u8) + } } #[inline] pub fn set_mIsSubgrid(&mut self, val: bool) { self._bitfield_1 &= !(2usize as u8); - self._bitfield_1 |= ((val as u8) << 1usize) & (2usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 1u32) & (2usize as u8); } - #[inline] - pub fn new_bitfield_1(mIsAutoFill: bool, mIsSubgrid: bool) -> u8 { - 0 | ((mIsAutoFill as u8) << 0u32) | ((mIsSubgrid as u8) << 1u32) - } -} -#[test] -fn bindgen_test_layout_nsStyleGridTemplate() { - assert_eq!(::std::mem::size_of::<nsStyleGridTemplate>() , 48usize); - assert_eq!(::std::mem::align_of::<nsStyleGridTemplate>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -6186,121 +10126,109 @@ pub struct nsStyleText { pub mTextShadow: RefPtr<nsCSSShadowArray>, pub mTextEmphasisStyleString: nsString, } +#[test] +fn bindgen_test_layout_nsStyleText() { + assert_eq!(::std::mem::size_of::<nsStyleText>() , 136usize); + assert_eq!(::std::mem::align_of::<nsStyleText>() , 8usize); +} impl nsStyleText { #[inline] - pub fn mTextAlignTrue(&self) -> u8 { - (self._bitfield_1 & (1usize as u8)) >> 0usize + pub fn mTextAlignTrue(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u8)) >> + 0u32) as u8) + } } #[inline] pub fn set_mTextAlignTrue(&mut self, val: bool) { self._bitfield_1 &= !(1usize as u8); - self._bitfield_1 |= ((val as u8) << 0usize) & (1usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 0u32) & (1usize as u8); } #[inline] - pub fn mTextAlignLastTrue(&self) -> u8 { - (self._bitfield_1 & (2usize as u8)) >> 1usize + pub fn mTextAlignLastTrue(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u8)) >> + 1u32) as u8) + } } #[inline] pub fn set_mTextAlignLastTrue(&mut self, val: bool) { self._bitfield_1 &= !(2usize as u8); - self._bitfield_1 |= ((val as u8) << 1usize) & (2usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 1u32) & (2usize as u8); } #[inline] - pub fn mTextEmphasisColorForeground(&self) -> u8 { - (self._bitfield_1 & (4usize as u8)) >> 2usize + 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) << 2usize) & (4usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 2u32) & (4usize as u8); } #[inline] - pub fn mWebkitTextFillColorForeground(&self) -> u8 { - (self._bitfield_1 & (8usize as u8)) >> 3usize + 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) << 3usize) & (8usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 3u32) & (8usize as u8); } #[inline] - pub fn mWebkitTextStrokeColorForeground(&self) -> u8 { - (self._bitfield_1 & (16usize as u8)) >> 4usize + 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) << 4usize) & (16usize as u8); - } - #[inline] - pub fn new_bitfield_1(mTextAlignTrue: bool, mTextAlignLastTrue: bool, - mTextEmphasisColorForeground: bool, - mWebkitTextFillColorForeground: bool, - mWebkitTextStrokeColorForeground: bool) -> u8 { - 0 | ((mTextAlignTrue as u8) << 0u32) | - ((mTextAlignLastTrue as u8) << 1u32) | - ((mTextEmphasisColorForeground as u8) << 2u32) | - ((mWebkitTextFillColorForeground as u8) << 3u32) | - ((mWebkitTextStrokeColorForeground as u8) << 4u32) + self._bitfield_1 |= ((val as u8 as u8) << 4u32) & (16usize as u8); } } -#[test] -fn bindgen_test_layout_nsStyleText() { - assert_eq!(::std::mem::size_of::<nsStyleText>() , 136usize); - assert_eq!(::std::mem::align_of::<nsStyleText>() , 8usize); -} #[repr(C)] #[derive(Debug, Copy)] pub struct nsStyleImageOrientation { pub mOrientation: u8, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageOrientation_Bits { ORIENTATION_MASK = 3, FLIP_MASK = 4, FROM_IMAGE_MASK = 8, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageOrientation_Angles { ANGLE_0 = 0, ANGLE_90 = 1, ANGLE_180 = 2, ANGLE_270 = 3, } -impl ::std::clone::Clone for nsStyleImageOrientation { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_nsStyleImageOrientation() { assert_eq!(::std::mem::size_of::<nsStyleImageOrientation>() , 1usize); assert_eq!(::std::mem::align_of::<nsStyleImageOrientation>() , 1usize); } -#[repr(C)] -#[derive(Debug)] -pub struct nsStyleVisibility { - pub mImageOrientation: nsStyleImageOrientation, - pub mDirection: u8, - pub mVisible: u8, - pub mImageRendering: u8, - pub mWritingMode: u8, - pub mTextOrientation: u8, - pub mColorAdjust: u8, -} -#[test] -fn bindgen_test_layout_nsStyleVisibility() { - assert_eq!(::std::mem::size_of::<nsStyleVisibility>() , 7usize); - assert_eq!(::std::mem::align_of::<nsStyleVisibility>() , 1usize); +impl Clone for nsStyleImageOrientation { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] pub struct nsTimingFunction { pub mType: nsTimingFunction_Type, - pub nsTimingFunction_nsStyleStruct_h_unnamed_23: nsTimingFunction_nsStyleStruct_h_unnamed_23, + pub __bindgen_anon_1: nsTimingFunction__bindgen_ty_bindgen_id_213713, } #[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsTimingFunction_Type { Ease = 0, Linear = 1, @@ -6312,75 +10240,60 @@ pub enum nsTimingFunction_Type { CubicBezier = 7, } #[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsTimingFunction_Keyword { Implicit = 0, Explicit = 1, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23 { - pub mFunc: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24>, - pub nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>, - pub _bindgen_data_: [u32; 4usize], -} -impl nsTimingFunction_nsStyleStruct_h_unnamed_23 { - pub unsafe fn mFunc(&mut self) - -> - *mut nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25(&mut self) - -> - *mut nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsTimingFunction_nsStyleStruct_h_unnamed_23 { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23() { - assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23>() - , 16usize); - assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23>() - , 4usize); +pub struct nsTimingFunction__bindgen_ty_bindgen_id_213713 { + pub mFunc: __BindgenUnionField<nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714>, + pub __bindgen_anon_1: __BindgenUnionField<nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725>, + pub bindgen_union_field: [u32; 4usize], } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24 { +pub struct nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714 { pub mX1: f32, pub mY1: f32, pub mX2: f32, pub mY2: f32, } -impl ::std::clone::Clone for - nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24 { - fn clone(&self) -> Self { *self } -} #[test] -fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24() { - assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24>() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714() { + assert_eq!(::std::mem::size_of::<nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714>() , 16usize); - assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24>() + assert_eq!(::std::mem::align_of::<nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714>() , 4usize); } +impl Clone for + nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213714 + { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 { +pub struct nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725 { pub mSteps: u32, } -impl ::std::clone::Clone for - nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 { +#[test] +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725() { + assert_eq!(::std::mem::size_of::<nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725>() + , 4usize); + assert_eq!(::std::mem::align_of::<nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725>() + , 4usize); +} +impl Clone for + nsTimingFunction__bindgen_ty_bindgen_id_213713__bindgen_ty_bindgen_id_213725 + { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25() { - assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>() - , 4usize); - assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_213713() { + assert_eq!(::std::mem::size_of::<nsTimingFunction__bindgen_ty_bindgen_id_213713>() + , 16usize); + assert_eq!(::std::mem::align_of::<nsTimingFunction__bindgen_ty_bindgen_id_213713>() , 4usize); } -impl ::std::clone::Clone for nsTimingFunction { +impl Clone for nsTimingFunction__bindgen_ty_bindgen_id_213713 { fn clone(&self) -> Self { *self } } #[test] @@ -6388,6 +10301,9 @@ fn bindgen_test_layout_nsTimingFunction() { assert_eq!(::std::mem::size_of::<nsTimingFunction>() , 20usize); assert_eq!(::std::mem::align_of::<nsTimingFunction>() , 4usize); } +impl Clone for nsTimingFunction { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug)] pub struct StyleTransition { @@ -6429,6 +10345,7 @@ pub struct StyleBasicShape { pub mPosition: Position, pub mRadius: nsStyleCorners, } +pub type StyleBasicShape_HasThreadSafeRefCnt = TrueType; #[test] fn bindgen_test_layout_StyleBasicShape() { assert_eq!(::std::mem::size_of::<StyleBasicShape>() , 120usize); @@ -6437,92 +10354,21 @@ fn bindgen_test_layout_StyleBasicShape() { #[repr(C)] #[derive(Debug)] pub struct StyleShapeSource<ReferenceBox> { - pub StyleShapeSource_nsStyleStruct_h_unnamed_26: StyleShapeSource_nsStyleStruct_h_unnamed_26<ReferenceBox>, + pub __bindgen_anon_1: StyleShapeSource__bindgen_ty_bindgen_id_214096<ReferenceBox>, pub mType: StyleShapeSourceType, pub mReferenceBox: ReferenceBox, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct StyleShapeSource_nsStyleStruct_h_unnamed_26<ReferenceBox> { +pub struct StyleShapeSource__bindgen_ty_bindgen_id_214096<ReferenceBox> { pub mBasicShape: __BindgenUnionField<*mut StyleBasicShape>, pub mURL: __BindgenUnionField<*mut FragmentOrURL>, - pub _bindgen_data_: u64, - pub _phantom0: ::std::marker::PhantomData<ReferenceBox>, -} -impl <ReferenceBox> StyleShapeSource_nsStyleStruct_h_unnamed_26<ReferenceBox> - { - pub unsafe fn mBasicShape(&mut self) -> *mut *mut StyleBasicShape { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mURL(&mut self) -> *mut *mut FragmentOrURL { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } + pub bindgen_union_field: u64, + pub _phantom_0: ::std::marker::PhantomData<ReferenceBox>, } pub type StyleClipPath = StyleShapeSource<StyleClipPathGeometryBox>; pub type StyleShapeOutside = StyleShapeSource<StyleShapeOutsideShapeBox>; #[repr(C)] -pub struct nsStyleDisplay { - pub mBinding: RefPtr<URLValue>, - pub mDisplay: StyleDisplay, - pub mOriginalDisplay: StyleDisplay, - pub mContain: u8, - pub mAppearance: u8, - pub mPosition: u8, - pub mFloat: StyleFloat, - pub mOriginalFloat: StyleFloat, - pub mBreakType: StyleClear, - pub mBreakInside: u8, - pub mBreakBefore: bool, - pub mBreakAfter: bool, - pub mOverflowX: u8, - pub mOverflowY: u8, - pub mOverflowClipBox: u8, - pub mResize: u8, - pub mOrient: u8, - pub mIsolation: u8, - pub mTopLayer: u8, - pub mWillChangeBitField: u8, - pub mWillChange: nsTArray<nsString>, - pub mTouchAction: u8, - pub mScrollBehavior: u8, - pub mScrollSnapTypeX: u8, - pub mScrollSnapTypeY: u8, - pub mScrollSnapPointsX: nsStyleCoord, - pub mScrollSnapPointsY: nsStyleCoord, - pub mScrollSnapDestination: Position, - pub mScrollSnapCoordinate: nsTArray<Position>, - pub mBackfaceVisibility: u8, - pub mTransformStyle: u8, - pub mTransformBox: u8, - pub mSpecifiedTransform: RefPtr<nsCSSValueSharedList>, - pub mTransformOrigin: [nsStyleCoord; 3usize], - pub mChildPerspective: nsStyleCoord, - pub mPerspectiveOrigin: [nsStyleCoord; 2usize], - pub mVerticalAlign: nsStyleCoord, - pub mTransitions: nsStyleAutoArray<StyleTransition>, - pub mTransitionTimingFunctionCount: u32, - pub mTransitionDurationCount: u32, - pub mTransitionDelayCount: u32, - pub mTransitionPropertyCount: u32, - pub mAnimations: nsStyleAutoArray<StyleAnimation>, - pub mAnimationTimingFunctionCount: u32, - pub mAnimationDurationCount: u32, - pub mAnimationDelayCount: u32, - pub mAnimationNameCount: u32, - pub mAnimationDirectionCount: u32, - pub mAnimationFillModeCount: u32, - pub mAnimationPlayStateCount: u32, - pub mAnimationIterationCountCount: u32, - pub mShapeOutside: StyleShapeOutside, -} -#[test] -fn bindgen_test_layout_nsStyleDisplay() { - assert_eq!(::std::mem::size_of::<nsStyleDisplay>() , 424usize); - assert_eq!(::std::mem::align_of::<nsStyleDisplay>() , 8usize); -} -#[repr(C)] #[derive(Debug)] pub struct nsStyleTable { pub mLayoutStrategy: u8, @@ -6548,7 +10394,7 @@ fn bindgen_test_layout_nsStyleTableBorder() { assert_eq!(::std::mem::align_of::<nsStyleTableBorder>() , 4usize); } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleContentType { eStyleContentType_String = 1, eStyleContentType_Image = 10, @@ -6566,41 +10412,27 @@ pub enum nsStyleContentType { #[derive(Debug)] pub struct nsStyleContentData { pub mType: nsStyleContentType, - pub mContent: nsStyleContentData_nsStyleStruct_h_unnamed_27, + pub mContent: nsStyleContentData__bindgen_ty_bindgen_id_214180, pub mImageTracked: bool, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleContentData_nsStyleStruct_h_unnamed_27 { - pub mString: __BindgenUnionField<*mut ::std::os::raw::c_ushort>, +pub struct nsStyleContentData__bindgen_ty_bindgen_id_214180 { + pub mString: __BindgenUnionField<*mut u16>, pub mImage: __BindgenUnionField<*mut imgRequestProxy>, - pub mCounters: __BindgenUnionField<*mut Array>, - pub _bindgen_data_: u64, -} -impl nsStyleContentData_nsStyleStruct_h_unnamed_27 { - pub unsafe fn mString(&mut self) -> *mut *mut ::std::os::raw::c_ushort { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mCounters(&mut self) -> *mut *mut Array { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleContentData_nsStyleStruct_h_unnamed_27 { - fn clone(&self) -> Self { *self } + pub mCounters: __BindgenUnionField<*mut nsCSSValue_Array>, + pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleContentData_nsStyleStruct_h_unnamed_27() { - assert_eq!(::std::mem::size_of::<nsStyleContentData_nsStyleStruct_h_unnamed_27>() +fn bindgen_test_layout_nsStyleContentData__bindgen_ty_bindgen_id_214180() { + assert_eq!(::std::mem::size_of::<nsStyleContentData__bindgen_ty_bindgen_id_214180>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleContentData_nsStyleStruct_h_unnamed_27>() + assert_eq!(::std::mem::align_of::<nsStyleContentData__bindgen_ty_bindgen_id_214180>() , 8usize); } +impl Clone for nsStyleContentData__bindgen_ty_bindgen_id_214180 { + fn clone(&self) -> Self { *self } +} #[test] fn bindgen_test_layout_nsStyleContentData() { assert_eq!(::std::mem::size_of::<nsStyleContentData>() , 24usize); @@ -6645,6 +10477,7 @@ fn bindgen_test_layout_nsStyleUIReset() { assert_eq!(::std::mem::align_of::<nsStyleUIReset>() , 1usize); } #[repr(C)] +#[derive(Debug)] pub struct nsCursorImage { pub mHaveHotspot: bool, pub mHotspotX: f32, @@ -6701,17 +10534,17 @@ pub struct nsStyleColumn { pub mColumnRuleWidth: nscoord, pub mTwipsPerPixel: nscoord, } +extern "C" { + #[link_name = "_ZN13nsStyleColumn15kMaxColumnCountE"] + pub static nsStyleColumn_kMaxColumnCount: u32; +} #[test] fn bindgen_test_layout_nsStyleColumn() { assert_eq!(::std::mem::size_of::<nsStyleColumn>() , 56usize); assert_eq!(::std::mem::align_of::<nsStyleColumn>() , 8usize); } -extern "C" { - #[link_name = "_ZN13nsStyleColumn15kMaxColumnCountE"] - pub static nsStyleColumn_consts_kMaxColumnCount: ::std::os::raw::c_uint; -} #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleSVGPaintType { eStyleSVGPaintType_None = 1, eStyleSVGPaintType_Color = 2, @@ -6719,47 +10552,30 @@ pub enum nsStyleSVGPaintType { eStyleSVGPaintType_ContextFill = 4, eStyleSVGPaintType_ContextStroke = 5, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleSVGOpacitySource { - eStyleSVGOpacitySource_Normal = 0, - eStyleSVGOpacitySource_ContextFillOpacity = 1, - eStyleSVGOpacitySource_ContextStrokeOpacity = 2, -} #[repr(C)] #[derive(Debug)] pub struct nsStyleSVGPaint { - pub mPaint: nsStyleSVGPaint_nsStyleStruct_h_unnamed_28, + pub mPaint: nsStyleSVGPaint__bindgen_ty_bindgen_id_214579, pub mType: nsStyleSVGPaintType, pub mFallbackColor: nscolor, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 { +pub struct nsStyleSVGPaint__bindgen_ty_bindgen_id_214579 { pub mColor: __BindgenUnionField<nscolor>, pub mPaintServer: __BindgenUnionField<*mut FragmentOrURL>, - pub _bindgen_data_: u64, -} -impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 { - pub unsafe fn mColor(&mut self) -> *mut nscolor { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPaintServer(&mut self) -> *mut *mut FragmentOrURL { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 { - fn clone(&self) -> Self { *self } + pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleSVGPaint_nsStyleStruct_h_unnamed_28() { - assert_eq!(::std::mem::size_of::<nsStyleSVGPaint_nsStyleStruct_h_unnamed_28>() +fn bindgen_test_layout_nsStyleSVGPaint__bindgen_ty_bindgen_id_214579() { + assert_eq!(::std::mem::size_of::<nsStyleSVGPaint__bindgen_ty_bindgen_id_214579>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleSVGPaint_nsStyleStruct_h_unnamed_28>() + assert_eq!(::std::mem::align_of::<nsStyleSVGPaint__bindgen_ty_bindgen_id_214579>() , 8usize); } +impl Clone for nsStyleSVGPaint__bindgen_ty_bindgen_id_214579 { + fn clone(&self) -> Self { *self } +} #[test] fn bindgen_test_layout_nsStyleSVGPaint() { assert_eq!(::std::mem::size_of::<nsStyleSVGPaint>() , 16usize); @@ -6791,8 +10607,8 @@ pub struct nsStyleSVG { pub mContextFlags: u8, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleSVG_nsStyleStruct_h_unnamed_29 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsStyleSVG__bindgen_ty_bindgen_id_214756 { FILL_OPACITY_SOURCE_MASK = 3, STROKE_OPACITY_SOURCE_MASK = 12, STROKE_DASHARRAY_CONTEXT = 16, @@ -6811,41 +10627,32 @@ fn bindgen_test_layout_nsStyleSVG() { pub struct nsStyleFilter { pub mType: i32, pub mFilterParameter: nsStyleCoord, - pub nsStyleFilter_nsStyleStruct_h_unnamed_30: nsStyleFilter_nsStyleStruct_h_unnamed_30, + pub __bindgen_anon_1: nsStyleFilter__bindgen_ty_bindgen_id_214822, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleFilter_nsStyleStruct_h_unnamed_30 { +pub struct nsStyleFilter__bindgen_ty_bindgen_id_214822 { pub mURL: __BindgenUnionField<*mut FragmentOrURL>, pub mDropShadow: __BindgenUnionField<*mut nsCSSShadowArray>, - pub _bindgen_data_: u64, -} -impl nsStyleFilter_nsStyleStruct_h_unnamed_30 { - pub unsafe fn mURL(&mut self) -> *mut *mut FragmentOrURL { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mDropShadow(&mut self) -> *mut *mut nsCSSShadowArray { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_30 { - fn clone(&self) -> Self { *self } + pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleFilter_nsStyleStruct_h_unnamed_30() { - assert_eq!(::std::mem::size_of::<nsStyleFilter_nsStyleStruct_h_unnamed_30>() +fn bindgen_test_layout_nsStyleFilter__bindgen_ty_bindgen_id_214822() { + assert_eq!(::std::mem::size_of::<nsStyleFilter__bindgen_ty_bindgen_id_214822>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleFilter_nsStyleStruct_h_unnamed_30>() + assert_eq!(::std::mem::align_of::<nsStyleFilter__bindgen_ty_bindgen_id_214822>() , 8usize); } +impl Clone for nsStyleFilter__bindgen_ty_bindgen_id_214822 { + fn clone(&self) -> Self { *self } +} #[test] fn bindgen_test_layout_nsStyleFilter() { assert_eq!(::std::mem::size_of::<nsStyleFilter>() , 32usize); assert_eq!(::std::mem::align_of::<nsStyleFilter>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleSVGReset { pub mMask: nsStyleImageLayers, pub mClipPath: StyleClipPath, @@ -6864,6 +10671,7 @@ fn bindgen_test_layout_nsStyleSVGReset() { assert_eq!(::std::mem::align_of::<nsStyleSVGReset>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleVariables { pub mVariables: CSSVariableValues, } @@ -6888,19 +10696,77 @@ fn bindgen_test_layout_nsStyleEffects() { assert_eq!(::std::mem::align_of::<nsStyleEffects>() , 8usize); } /** - * <div rustbindgen="true" replaces="nsSize"> + * <div rustbindgen="true" replaces="nsMargin"> */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsSize { +pub struct nsMargin { + pub top: nscoord, + pub right: nscoord, + pub bottom: nscoord, + pub left: nscoord, +} +#[test] +fn bindgen_test_layout_nsMargin() { + assert_eq!(::std::mem::size_of::<nsMargin>() , 16usize); + assert_eq!(::std::mem::align_of::<nsMargin>() , 4usize); +} +impl Clone for nsMargin { + fn clone(&self) -> Self { *self } +} +/** + * <div rustbindgen="true" replaces="nsRect"> + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsRect { + pub x: nscoord, + pub y: nscoord, pub width: nscoord, pub height: nscoord, } -impl ::std::clone::Clone for nsSize { +#[test] +fn bindgen_test_layout_nsRect() { + assert_eq!(::std::mem::size_of::<nsRect>() , 16usize); + assert_eq!(::std::mem::align_of::<nsRect>() , 4usize); +} +impl Clone for nsRect { fn clone(&self) -> Self { *self } } +/** + * <div rustbindgen="true" replaces="nsSize"> + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsSize { + pub width: nscoord, + pub height: nscoord, +} #[test] fn bindgen_test_layout_nsSize() { assert_eq!(::std::mem::size_of::<nsSize>() , 8usize); assert_eq!(::std::mem::align_of::<nsSize>() , 4usize); } +impl Clone for nsSize { + fn clone(&self) -> Self { *self } +} +/** + * <div rustbindgen="true" replaces="UniquePtr"> + * + * TODO(Emilio): This is a workaround and we should be able to get rid of this + * one. + */ +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UniquePtr<T, Deleter> { + pub mPtr: *mut T, + pub _phantom_1: ::std::marker::PhantomData<Deleter>, +} +/** + * <div rustbindgen replaces="nsTArray"></div> + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsTArray<T> { + pub mBuffer: *mut T, +} diff --git a/ports/geckolib/gecko_bindings/structs_release.rs b/ports/geckolib/gecko_bindings/structs_release.rs index abbe9d32375..933032081be 100644 --- a/ports/geckolib/gecko_bindings/structs_release.rs +++ b/ports/geckolib/gecko_bindings/structs_release.rs @@ -1,6 +1,6 @@ /* automatically generated by rust-bindgen */ -#[derive(Copy, Debug)] +#[derive(Debug)] #[repr(C)] pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); impl <T> __BindgenUnionField<T> { @@ -19,6 +19,7 @@ impl <T> ::std::clone::Clone for __BindgenUnionField<T> { #[inline] fn clone(&self) -> Self { Self::new() } } +impl <T> ::std::marker::Copy for __BindgenUnionField<T> { } pub const NS_THEME_NONE: ::std::os::raw::c_uint = 0; pub const NS_THEME_BUTTON: ::std::os::raw::c_uint = 1; pub const NS_THEME_RADIO: ::std::os::raw::c_uint = 2; @@ -142,63 +143,9 @@ pub const NS_THEME_MAC_DISCLOSURE_BUTTON_OPEN: ::std::os::raw::c_uint = 245; pub const NS_THEME_MAC_DISCLOSURE_BUTTON_CLOSED: ::std::os::raw::c_uint = 246; pub const NS_THEME_GTK_INFO_BAR: ::std::os::raw::c_uint = 247; pub const NS_THEME_MAC_SOURCE_LIST: ::std::os::raw::c_uint = 248; -pub const NS_ERROR_MODULE_XPCOM: ::std::os::raw::c_uint = 1; -pub const NS_ERROR_MODULE_BASE: ::std::os::raw::c_uint = 2; -pub const NS_ERROR_MODULE_GFX: ::std::os::raw::c_uint = 3; -pub const NS_ERROR_MODULE_WIDGET: ::std::os::raw::c_uint = 4; -pub const NS_ERROR_MODULE_CALENDAR: ::std::os::raw::c_uint = 5; -pub const NS_ERROR_MODULE_NETWORK: ::std::os::raw::c_uint = 6; -pub const NS_ERROR_MODULE_PLUGINS: ::std::os::raw::c_uint = 7; -pub const NS_ERROR_MODULE_LAYOUT: ::std::os::raw::c_uint = 8; -pub const NS_ERROR_MODULE_HTMLPARSER: ::std::os::raw::c_uint = 9; -pub const NS_ERROR_MODULE_RDF: ::std::os::raw::c_uint = 10; -pub const NS_ERROR_MODULE_UCONV: ::std::os::raw::c_uint = 11; -pub const NS_ERROR_MODULE_REG: ::std::os::raw::c_uint = 12; -pub const NS_ERROR_MODULE_FILES: ::std::os::raw::c_uint = 13; -pub const NS_ERROR_MODULE_DOM: ::std::os::raw::c_uint = 14; -pub const NS_ERROR_MODULE_IMGLIB: ::std::os::raw::c_uint = 15; -pub const NS_ERROR_MODULE_MAILNEWS: ::std::os::raw::c_uint = 16; -pub const NS_ERROR_MODULE_EDITOR: ::std::os::raw::c_uint = 17; -pub const NS_ERROR_MODULE_XPCONNECT: ::std::os::raw::c_uint = 18; -pub const NS_ERROR_MODULE_PROFILE: ::std::os::raw::c_uint = 19; -pub const NS_ERROR_MODULE_LDAP: ::std::os::raw::c_uint = 20; -pub const NS_ERROR_MODULE_SECURITY: ::std::os::raw::c_uint = 21; -pub const NS_ERROR_MODULE_DOM_XPATH: ::std::os::raw::c_uint = 22; -pub const NS_ERROR_MODULE_URILOADER: ::std::os::raw::c_uint = 24; -pub const NS_ERROR_MODULE_CONTENT: ::std::os::raw::c_uint = 25; -pub const NS_ERROR_MODULE_PYXPCOM: ::std::os::raw::c_uint = 26; -pub const NS_ERROR_MODULE_XSLT: ::std::os::raw::c_uint = 27; -pub const NS_ERROR_MODULE_IPC: ::std::os::raw::c_uint = 28; -pub const NS_ERROR_MODULE_SVG: ::std::os::raw::c_uint = 29; -pub const NS_ERROR_MODULE_STORAGE: ::std::os::raw::c_uint = 30; -pub const NS_ERROR_MODULE_SCHEMA: ::std::os::raw::c_uint = 31; -pub const NS_ERROR_MODULE_DOM_FILE: ::std::os::raw::c_uint = 32; -pub const NS_ERROR_MODULE_DOM_INDEXEDDB: ::std::os::raw::c_uint = 33; -pub const NS_ERROR_MODULE_DOM_FILEHANDLE: ::std::os::raw::c_uint = 34; -pub const NS_ERROR_MODULE_SIGNED_JAR: ::std::os::raw::c_uint = 35; -pub const NS_ERROR_MODULE_DOM_FILESYSTEM: ::std::os::raw::c_uint = 36; -pub const NS_ERROR_MODULE_DOM_BLUETOOTH: ::std::os::raw::c_uint = 37; -pub const NS_ERROR_MODULE_SIGNED_APP: ::std::os::raw::c_uint = 38; -pub const NS_ERROR_MODULE_DOM_ANIM: ::std::os::raw::c_uint = 39; -pub const NS_ERROR_MODULE_DOM_PUSH: ::std::os::raw::c_uint = 40; -pub const NS_ERROR_MODULE_DOM_MEDIA: ::std::os::raw::c_uint = 41; -pub const NS_ERROR_MODULE_GENERAL: ::std::os::raw::c_uint = 51; -pub const NS_ERROR_SEVERITY_SUCCESS: ::std::os::raw::c_uint = 0; -pub const NS_ERROR_SEVERITY_ERROR: ::std::os::raw::c_uint = 1; -pub const NS_ERROR_MODULE_BASE_OFFSET: ::std::os::raw::c_uint = 69; -pub const MOZ_STRING_WITH_OBSOLETE_API: ::std::os::raw::c_uint = 1; -pub const NSID_LENGTH: ::std::os::raw::c_uint = 39; -pub const NS_NUMBER_OF_FLAGS_IN_REFCNT: ::std::os::raw::c_uint = 2; -pub const NS_EVENT_STATE_HIGHEST_SERVO_BIT: ::std::os::raw::c_uint = 6; -pub const DOM_USER_DATA: ::std::os::raw::c_uint = 1; -pub const SMIL_MAPPED_ATTR_ANIMVAL: ::std::os::raw::c_uint = 2; -pub const TWIPS_PER_POINT_INT: ::std::os::raw::c_uint = 20; -pub const POINTS_PER_INCH_INT: ::std::os::raw::c_uint = 72; -pub const NS_ATTRNAME_NODEINFO_BIT: ::std::os::raw::c_uint = 1; -pub const NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM: ::std::os::raw::c_uint = 12; -pub const NS_ATTRVALUE_INTEGERTYPE_BITS: ::std::os::raw::c_uint = 4; -pub const NS_FONT_VARIANT_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_VARIANT_SMALL_CAPS: ::std::os::raw::c_uint = 1; +pub const NS_FONT_STYLE_NORMAL: ::std::os::raw::c_uint = 0; +pub const NS_FONT_STYLE_ITALIC: ::std::os::raw::c_uint = 1; +pub const NS_FONT_STYLE_OBLIQUE: ::std::os::raw::c_uint = 2; pub const NS_CORNER_TOP_LEFT_X: ::std::os::raw::c_uint = 0; pub const NS_CORNER_TOP_LEFT_Y: ::std::os::raw::c_uint = 1; pub const NS_CORNER_TOP_RIGHT_X: ::std::os::raw::c_uint = 2; @@ -451,31 +398,6 @@ pub const NS_STYLE_GRID_TRACK_BREADTH_MAX_CONTENT: ::std::os::raw::c_uint = 1; pub const NS_STYLE_GRID_TRACK_BREADTH_MIN_CONTENT: ::std::os::raw::c_uint = 2; pub const NS_STYLE_GRID_REPEAT_AUTO_FILL: ::std::os::raw::c_uint = 0; pub const NS_STYLE_GRID_REPEAT_AUTO_FIT: ::std::os::raw::c_uint = 1; -pub const NS_MATHML_DEFAULT_SCRIPT_MIN_SIZE_PT: ::std::os::raw::c_uint = 8; -pub const NS_MATHML_MATHVARIANT_NONE: ::std::os::raw::c_uint = 0; -pub const NS_MATHML_MATHVARIANT_NORMAL: ::std::os::raw::c_uint = 1; -pub const NS_MATHML_MATHVARIANT_BOLD: ::std::os::raw::c_uint = 2; -pub const NS_MATHML_MATHVARIANT_ITALIC: ::std::os::raw::c_uint = 3; -pub const NS_MATHML_MATHVARIANT_BOLD_ITALIC: ::std::os::raw::c_uint = 4; -pub const NS_MATHML_MATHVARIANT_SCRIPT: ::std::os::raw::c_uint = 5; -pub const NS_MATHML_MATHVARIANT_BOLD_SCRIPT: ::std::os::raw::c_uint = 6; -pub const NS_MATHML_MATHVARIANT_FRAKTUR: ::std::os::raw::c_uint = 7; -pub const NS_MATHML_MATHVARIANT_DOUBLE_STRUCK: ::std::os::raw::c_uint = 8; -pub const NS_MATHML_MATHVARIANT_BOLD_FRAKTUR: ::std::os::raw::c_uint = 9; -pub const NS_MATHML_MATHVARIANT_SANS_SERIF: ::std::os::raw::c_uint = 10; -pub const NS_MATHML_MATHVARIANT_BOLD_SANS_SERIF: ::std::os::raw::c_uint = 11; -pub const NS_MATHML_MATHVARIANT_SANS_SERIF_ITALIC: ::std::os::raw::c_uint = - 12; -pub const NS_MATHML_MATHVARIANT_SANS_SERIF_BOLD_ITALIC: ::std::os::raw::c_uint - = - 13; -pub const NS_MATHML_MATHVARIANT_MONOSPACE: ::std::os::raw::c_uint = 14; -pub const NS_MATHML_MATHVARIANT_INITIAL: ::std::os::raw::c_uint = 15; -pub const NS_MATHML_MATHVARIANT_TAILED: ::std::os::raw::c_uint = 16; -pub const NS_MATHML_MATHVARIANT_LOOPED: ::std::os::raw::c_uint = 17; -pub const NS_MATHML_MATHVARIANT_STRETCHED: ::std::os::raw::c_uint = 18; -pub const NS_MATHML_DISPLAYSTYLE_INLINE: ::std::os::raw::c_uint = 0; -pub const NS_MATHML_DISPLAYSTYLE_BLOCK: ::std::os::raw::c_uint = 1; pub const NS_STYLE_WIDTH_MAX_CONTENT: ::std::os::raw::c_uint = 0; pub const NS_STYLE_WIDTH_MIN_CONTENT: ::std::os::raw::c_uint = 1; pub const NS_STYLE_WIDTH_FIT_CONTENT: ::std::os::raw::c_uint = 2; @@ -847,44 +769,6 @@ pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; -pub const NS_FONT_STYLE_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_STYLE_ITALIC: ::std::os::raw::c_uint = 1; -pub const NS_FONT_STYLE_OBLIQUE: ::std::os::raw::c_uint = 2; -pub const NS_FONT_WEIGHT_NORMAL: ::std::os::raw::c_uint = 400; -pub const NS_FONT_WEIGHT_BOLD: ::std::os::raw::c_uint = 700; -pub const NS_FONT_WEIGHT_THIN: ::std::os::raw::c_uint = 100; -pub const NS_FONT_STRETCH_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_STRETCH_SEMI_EXPANDED: ::std::os::raw::c_uint = 1; -pub const NS_FONT_STRETCH_EXPANDED: ::std::os::raw::c_uint = 2; -pub const NS_FONT_STRETCH_EXTRA_EXPANDED: ::std::os::raw::c_uint = 3; -pub const NS_FONT_STRETCH_ULTRA_EXPANDED: ::std::os::raw::c_uint = 4; -pub const NS_FONT_SMOOTHING_AUTO: ::std::os::raw::c_uint = 0; -pub const NS_FONT_SMOOTHING_GRAYSCALE: ::std::os::raw::c_uint = 1; -pub const NS_FONT_KERNING_AUTO: ::std::os::raw::c_uint = 0; -pub const NS_FONT_KERNING_NONE: ::std::os::raw::c_uint = 1; -pub const NS_FONT_KERNING_NORMAL: ::std::os::raw::c_uint = 2; -pub const NS_FONT_SYNTHESIS_WEIGHT: ::std::os::raw::c_uint = 1; -pub const NS_FONT_SYNTHESIS_STYLE: ::std::os::raw::c_uint = 2; -pub const NS_FONT_DISPLAY_AUTO: ::std::os::raw::c_uint = 0; -pub const NS_FONT_DISPLAY_BLOCK: ::std::os::raw::c_uint = 1; -pub const NS_FONT_DISPLAY_SWAP: ::std::os::raw::c_uint = 2; -pub const NS_FONT_DISPLAY_FALLBACK: ::std::os::raw::c_uint = 3; -pub const NS_FONT_DISPLAY_OPTIONAL: ::std::os::raw::c_uint = 4; -pub const NS_FONT_VARIANT_CAPS_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_VARIANT_CAPS_SMALLCAPS: ::std::os::raw::c_uint = 1; -pub const NS_FONT_VARIANT_CAPS_ALLSMALL: ::std::os::raw::c_uint = 2; -pub const NS_FONT_VARIANT_CAPS_PETITECAPS: ::std::os::raw::c_uint = 3; -pub const NS_FONT_VARIANT_CAPS_ALLPETITE: ::std::os::raw::c_uint = 4; -pub const NS_FONT_VARIANT_CAPS_TITLING: ::std::os::raw::c_uint = 5; -pub const NS_FONT_VARIANT_CAPS_UNICASE: ::std::os::raw::c_uint = 6; -pub const NS_FONT_VARIANT_POSITION_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_VARIANT_POSITION_SUPER: ::std::os::raw::c_uint = 1; -pub const NS_FONT_VARIANT_POSITION_SUB: ::std::os::raw::c_uint = 2; -pub const NS_FONT_VARIANT_WIDTH_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_FONT_VARIANT_WIDTH_FULL: ::std::os::raw::c_uint = 1; -pub const NS_FONT_VARIANT_WIDTH_HALF: ::std::os::raw::c_uint = 2; -pub const NS_FONT_VARIANT_WIDTH_THIRD: ::std::os::raw::c_uint = 3; -pub const NS_FONT_VARIANT_WIDTH_QUARTER: ::std::os::raw::c_uint = 4; pub const NS_STYLE_INHERIT_MASK: ::std::os::raw::c_uint = 16777215; pub const NS_STYLE_HAS_TEXT_DECORATION_LINES: ::std::os::raw::c_uint = 16777216; @@ -906,20 +790,25 @@ pub const NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE: pub const NS_STYLE_IS_TEXT_COMBINED: ::std::os::raw::c_ulonglong = 34359738368; pub const NS_STYLE_CONTEXT_TYPE_SHIFT: ::std::os::raw::c_uint = 36; -pub const NS_RULE_NODE_IS_ANIMATION_RULE: ::std::os::raw::c_uint = 16777216; -pub const NS_RULE_NODE_USED_DIRECTLY: ::std::os::raw::c_uint = 67108864; -pub const NS_RULE_NODE_IS_IMPORTANT: ::std::os::raw::c_uint = 134217728; -pub const NS_RULE_NODE_LEVEL_MASK: ::std::os::raw::c_uint = 4026531840; -pub const NS_RULE_NODE_LEVEL_SHIFT: ::std::os::raw::c_uint = 28; -pub const NS_RULE_NODE_HAS_ANIMATION_DATA: ::std::os::raw::c_uint = - 2147483648; pub const BORDER_COLOR_FOREGROUND: ::std::os::raw::c_uint = 32; -pub const OUTLINE_COLOR_INITIAL: ::std::os::raw::c_uint = 128; pub const BORDER_COLOR_SPECIAL: ::std::os::raw::c_uint = 160; pub const BORDER_STYLE_MASK: ::std::os::raw::c_uint = 31; -pub const NS_SPACING_MARGIN: ::std::os::raw::c_uint = 0; -pub const NS_SPACING_PADDING: ::std::os::raw::c_uint = 1; -pub const NS_SPACING_BORDER: ::std::os::raw::c_uint = 2; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct fallible_t { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_fallible_t() { + assert_eq!(::std::mem::size_of::<fallible_t>() , 1usize); + assert_eq!(::std::mem::align_of::<fallible_t>() , 1usize); +} +impl Clone for fallible_t { + fn clone(&self) -> Self { *self } +} +/** Convenient aliases. */ +pub type TrueType = u8; +pub type FalseType = u8; /** * MozRefCountType is Mozilla's reference count type. * @@ -931,179 +820,184 @@ pub const NS_SPACING_BORDER: ::std::os::raw::c_uint = 2; * usable for both C and C++ code. */ pub type MozRefCountType = usize; -pub type MozExternalRefCountType = u32; -pub const NS_ERROR_NO_INTERFACE: nsresult = nsresult::NS_NOINTERFACE; -pub const NS_ERROR_INVALID_ARG: nsresult = nsresult::NS_ERROR_ILLEGAL_VALUE; -pub const NS_ERROR_INVALID_POINTER: nsresult = +pub const nsresult_NS_ERROR_NO_INTERFACE: nsresult = nsresult::NS_NOINTERFACE; +pub const nsresult_NS_ERROR_INVALID_ARG: nsresult = + nsresult::NS_ERROR_ILLEGAL_VALUE; +pub const nsresult_NS_ERROR_INVALID_POINTER: nsresult = nsresult::NS_ERROR_ILLEGAL_VALUE; -pub const NS_ERROR_NULL_POINTER: nsresult = nsresult::NS_ERROR_ILLEGAL_VALUE; -pub const NS_BINDING_SUCCEEDED: nsresult = nsresult::NS_OK; -pub const NS_NET_STATUS_RESOLVING_HOST: nsresult = +pub const nsresult_NS_ERROR_NULL_POINTER: nsresult = + nsresult::NS_ERROR_ILLEGAL_VALUE; +pub const nsresult_NS_BINDING_SUCCEEDED: nsresult = nsresult::NS_OK; +pub const nsresult_NS_NET_STATUS_RESOLVING_HOST: nsresult = nsresult::NS_BINDING_REDIRECTED; -pub const NS_NET_STATUS_RESOLVED_HOST: nsresult = +pub const nsresult_NS_NET_STATUS_RESOLVED_HOST: nsresult = nsresult::NS_ERROR_ALREADY_CONNECTED; -pub const NS_NET_STATUS_CONNECTED_TO: nsresult = +pub const nsresult_NS_NET_STATUS_CONNECTED_TO: nsresult = nsresult::NS_BINDING_RETARGETED; -pub const NS_NET_STATUS_WAITING_FOR: nsresult = +pub const nsresult_NS_NET_STATUS_WAITING_FOR: nsresult = nsresult::NS_ERROR_MALFORMED_URI; -pub const NS_STATE_PROPERTY_EXISTS: nsresult = nsresult::NS_OK; -pub const NS_ERROR_HTMLPARSER_CONTINUE: nsresult = nsresult::NS_OK; -pub const NS_RDF_ASSERTION_ACCEPTED: nsresult = nsresult::NS_OK; -pub const NS_EXACT_LENGTH: nsresult = nsresult::NS_OK_UDEC_EXACTLENGTH; -pub const NS_PARTIAL_MORE_INPUT: nsresult = nsresult::NS_OK_UDEC_MOREINPUT; -pub const NS_PARTIAL_MORE_OUTPUT: nsresult = nsresult::NS_OK_UDEC_MOREOUTPUT; -pub const NS_ERROR_ILLEGAL_INPUT: nsresult = +pub const nsresult_NS_STATE_PROPERTY_EXISTS: nsresult = nsresult::NS_OK; +pub const nsresult_NS_ERROR_HTMLPARSER_CONTINUE: nsresult = nsresult::NS_OK; +pub const nsresult_NS_RDF_ASSERTION_ACCEPTED: nsresult = nsresult::NS_OK; +pub const nsresult_NS_EXACT_LENGTH: nsresult = + nsresult::NS_OK_UDEC_EXACTLENGTH; +pub const nsresult_NS_PARTIAL_MORE_INPUT: nsresult = + nsresult::NS_OK_UDEC_MOREINPUT; +pub const nsresult_NS_PARTIAL_MORE_OUTPUT: nsresult = + nsresult::NS_OK_UDEC_MOREOUTPUT; +pub const nsresult_NS_ERROR_ILLEGAL_INPUT: nsresult = nsresult::NS_ERROR_UDEC_ILLEGALINPUT; -pub const NS_ERROR_XPATH_INVALID_ARG: nsresult = +pub const nsresult_NS_ERROR_XPATH_INVALID_ARG: nsresult = nsresult::NS_ERROR_ILLEGAL_VALUE; -pub const NS_SUCCESS_RESTART_APP: nsresult = nsresult::NS_SUCCESS_DONT_FIXUP; -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub const nsresult_NS_SUCCESS_RESTART_APP: nsresult = + nsresult::NS_SUCCESS_DONT_FIXUP; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsresult { NS_OK = 0, - NS_ERROR_BASE = -1041039360, - NS_ERROR_NOT_INITIALIZED = -1041039359, - NS_ERROR_ALREADY_INITIALIZED = -1041039358, - NS_ERROR_NOT_IMPLEMENTED = -2147467263, - NS_NOINTERFACE = -2147467262, - NS_ERROR_ABORT = -2147467260, - NS_ERROR_FAILURE = -2147467259, - NS_ERROR_UNEXPECTED = -2147418113, - NS_ERROR_OUT_OF_MEMORY = -2147024882, - NS_ERROR_ILLEGAL_VALUE = -2147024809, - NS_ERROR_NO_AGGREGATION = -2147221232, - NS_ERROR_NOT_AVAILABLE = -2147221231, - NS_ERROR_FACTORY_NOT_REGISTERED = -2147221164, - NS_ERROR_FACTORY_REGISTER_AGAIN = -2147221163, - NS_ERROR_FACTORY_NOT_LOADED = -2147221000, - NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT = -1041039103, - NS_ERROR_FACTORY_EXISTS = -1041039104, - NS_ERROR_CANNOT_CONVERT_DATA = -2142896127, - NS_ERROR_OBJECT_IS_IMMUTABLE = -2142896126, - NS_ERROR_LOSS_OF_SIGNIFICANT_DATA = -2142896125, - NS_ERROR_NOT_SAME_THREAD = -2142896124, - NS_ERROR_ILLEGAL_DURING_SHUTDOWN = -2142896098, - NS_ERROR_SERVICE_NOT_AVAILABLE = -2142896106, + NS_ERROR_BASE = 3253927936, + NS_ERROR_NOT_INITIALIZED = 3253927937, + NS_ERROR_ALREADY_INITIALIZED = 3253927938, + NS_ERROR_NOT_IMPLEMENTED = 2147500033, + NS_NOINTERFACE = 2147500034, + NS_ERROR_ABORT = 2147500036, + NS_ERROR_FAILURE = 2147500037, + NS_ERROR_UNEXPECTED = 2147549183, + NS_ERROR_OUT_OF_MEMORY = 2147942414, + NS_ERROR_ILLEGAL_VALUE = 2147942487, + NS_ERROR_NO_AGGREGATION = 2147746064, + NS_ERROR_NOT_AVAILABLE = 2147746065, + NS_ERROR_FACTORY_NOT_REGISTERED = 2147746132, + NS_ERROR_FACTORY_REGISTER_AGAIN = 2147746133, + NS_ERROR_FACTORY_NOT_LOADED = 2147746296, + NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT = 3253928193, + NS_ERROR_FACTORY_EXISTS = 3253928192, + NS_ERROR_CANNOT_CONVERT_DATA = 2152071169, + NS_ERROR_OBJECT_IS_IMMUTABLE = 2152071170, + NS_ERROR_LOSS_OF_SIGNIFICANT_DATA = 2152071171, + NS_ERROR_NOT_SAME_THREAD = 2152071172, + NS_ERROR_ILLEGAL_DURING_SHUTDOWN = 2152071198, + NS_ERROR_SERVICE_NOT_AVAILABLE = 2152071190, NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA = 4587521, NS_SUCCESS_INTERRUPTED_TRAVERSE = 4587522, NS_ERROR_SERVICE_NOT_FOUND = 4587542, NS_ERROR_SERVICE_IN_USE = 4587543, - NS_BASE_STREAM_CLOSED = -2142830590, - NS_BASE_STREAM_OSERROR = -2142830589, - NS_BASE_STREAM_ILLEGAL_ARGS = -2142830588, - NS_BASE_STREAM_NO_CONVERTER = -2142830587, - NS_BASE_STREAM_BAD_CONVERSION = -2142830586, - NS_BASE_STREAM_WOULD_BLOCK = -2142830585, - NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE = -2142765055, - NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND = -2142765054, - NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE = -2142765053, - NS_ERROR_GFX_PRINTER_STARTDOC = -2142765052, - NS_ERROR_GFX_PRINTER_ENDDOC = -2142765051, - NS_ERROR_GFX_PRINTER_STARTPAGE = -2142765050, - NS_ERROR_GFX_PRINTER_DOC_IS_BUSY = -2142765049, - NS_ERROR_GFX_CMAP_MALFORMED = -2142765005, + NS_BASE_STREAM_CLOSED = 2152136706, + NS_BASE_STREAM_OSERROR = 2152136707, + NS_BASE_STREAM_ILLEGAL_ARGS = 2152136708, + NS_BASE_STREAM_NO_CONVERTER = 2152136709, + NS_BASE_STREAM_BAD_CONVERSION = 2152136710, + NS_BASE_STREAM_WOULD_BLOCK = 2152136711, + NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE = 2152202241, + NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND = 2152202242, + NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE = 2152202243, + NS_ERROR_GFX_PRINTER_STARTDOC = 2152202244, + NS_ERROR_GFX_PRINTER_ENDDOC = 2152202245, + NS_ERROR_GFX_PRINTER_STARTPAGE = 2152202246, + NS_ERROR_GFX_PRINTER_DOC_IS_BUSY = 2152202247, + NS_ERROR_GFX_CMAP_MALFORMED = 2152202291, NS_SUCCESS_EVENT_CONSUMED = 4784129, NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY = 4784130, - NS_BINDING_FAILED = -2142568447, - NS_BINDING_ABORTED = -2142568446, - NS_BINDING_REDIRECTED = -2142568445, - NS_BINDING_RETARGETED = -2142568444, - NS_ERROR_MALFORMED_URI = -2142568438, - NS_ERROR_IN_PROGRESS = -2142568433, - NS_ERROR_NO_CONTENT = -2142568431, - NS_ERROR_UNKNOWN_PROTOCOL = -2142568430, - NS_ERROR_INVALID_CONTENT_ENCODING = -2142568421, - NS_ERROR_CORRUPTED_CONTENT = -2142568419, - NS_ERROR_INVALID_SIGNATURE = -2142568390, - NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY = -2142568414, - NS_ERROR_ALREADY_OPENED = -2142568375, - NS_ERROR_ALREADY_CONNECTED = -2142568437, - NS_ERROR_NOT_CONNECTED = -2142568436, - NS_ERROR_CONNECTION_REFUSED = -2142568435, - NS_ERROR_NET_TIMEOUT = -2142568434, - NS_ERROR_OFFLINE = -2142568432, - NS_ERROR_PORT_ACCESS_NOT_ALLOWED = -2142568429, - NS_ERROR_NET_RESET = -2142568428, - NS_ERROR_NET_INTERRUPT = -2142568377, - NS_ERROR_PROXY_CONNECTION_REFUSED = -2142568376, - NS_ERROR_NET_PARTIAL_TRANSFER = -2142568372, - NS_ERROR_NET_INADEQUATE_SECURITY = -2142568366, - NS_ERROR_NOT_RESUMABLE = -2142568423, - NS_ERROR_REDIRECT_LOOP = -2142568417, - NS_ERROR_ENTITY_CHANGED = -2142568416, - NS_ERROR_UNSAFE_CONTENT_TYPE = -2142568374, - NS_ERROR_REMOTE_XUL = -2142568373, - NS_ERROR_LOAD_SHOWED_ERRORPAGE = -2142568371, - NS_ERROR_FTP_LOGIN = -2142568427, - NS_ERROR_FTP_CWD = -2142568426, - NS_ERROR_FTP_PASV = -2142568425, - NS_ERROR_FTP_PWD = -2142568424, - NS_ERROR_FTP_LIST = -2142568420, - NS_ERROR_UNKNOWN_HOST = -2142568418, - NS_ERROR_DNS_LOOKUP_QUEUE_FULL = -2142568415, - NS_ERROR_UNKNOWN_PROXY_HOST = -2142568406, - NS_ERROR_UNKNOWN_SOCKET_TYPE = -2142568397, - NS_ERROR_SOCKET_CREATE_FAILED = -2142568396, - NS_ERROR_SOCKET_ADDRESS_NOT_SUPPORTED = -2142568395, - NS_ERROR_SOCKET_ADDRESS_IN_USE = -2142568394, - NS_ERROR_CACHE_KEY_NOT_FOUND = -2142568387, - NS_ERROR_CACHE_DATA_IS_STREAM = -2142568386, - NS_ERROR_CACHE_DATA_IS_NOT_STREAM = -2142568385, - NS_ERROR_CACHE_WAIT_FOR_VALIDATION = -2142568384, - NS_ERROR_CACHE_ENTRY_DOOMED = -2142568383, - NS_ERROR_CACHE_READ_ACCESS_DENIED = -2142568382, - NS_ERROR_CACHE_WRITE_ACCESS_DENIED = -2142568381, - NS_ERROR_CACHE_IN_USE = -2142568380, - NS_ERROR_DOCUMENT_NOT_CACHED = -2142568378, - NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS = -2142568368, - NS_ERROR_HOST_IS_IP_ADDRESS = -2142568367, + NS_BINDING_FAILED = 2152398849, + NS_BINDING_ABORTED = 2152398850, + NS_BINDING_REDIRECTED = 2152398851, + NS_BINDING_RETARGETED = 2152398852, + NS_ERROR_MALFORMED_URI = 2152398858, + NS_ERROR_IN_PROGRESS = 2152398863, + NS_ERROR_NO_CONTENT = 2152398865, + NS_ERROR_UNKNOWN_PROTOCOL = 2152398866, + NS_ERROR_INVALID_CONTENT_ENCODING = 2152398875, + NS_ERROR_CORRUPTED_CONTENT = 2152398877, + NS_ERROR_INVALID_SIGNATURE = 2152398906, + NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY = 2152398882, + NS_ERROR_ALREADY_OPENED = 2152398921, + NS_ERROR_ALREADY_CONNECTED = 2152398859, + NS_ERROR_NOT_CONNECTED = 2152398860, + NS_ERROR_CONNECTION_REFUSED = 2152398861, + NS_ERROR_NET_TIMEOUT = 2152398862, + NS_ERROR_OFFLINE = 2152398864, + NS_ERROR_PORT_ACCESS_NOT_ALLOWED = 2152398867, + NS_ERROR_NET_RESET = 2152398868, + NS_ERROR_NET_INTERRUPT = 2152398919, + NS_ERROR_PROXY_CONNECTION_REFUSED = 2152398920, + NS_ERROR_NET_PARTIAL_TRANSFER = 2152398924, + NS_ERROR_NET_INADEQUATE_SECURITY = 2152398930, + NS_ERROR_NOT_RESUMABLE = 2152398873, + NS_ERROR_REDIRECT_LOOP = 2152398879, + NS_ERROR_ENTITY_CHANGED = 2152398880, + NS_ERROR_UNSAFE_CONTENT_TYPE = 2152398922, + NS_ERROR_REMOTE_XUL = 2152398923, + NS_ERROR_LOAD_SHOWED_ERRORPAGE = 2152398925, + NS_ERROR_FTP_LOGIN = 2152398869, + NS_ERROR_FTP_CWD = 2152398870, + NS_ERROR_FTP_PASV = 2152398871, + NS_ERROR_FTP_PWD = 2152398872, + NS_ERROR_FTP_LIST = 2152398876, + NS_ERROR_UNKNOWN_HOST = 2152398878, + NS_ERROR_DNS_LOOKUP_QUEUE_FULL = 2152398881, + NS_ERROR_UNKNOWN_PROXY_HOST = 2152398890, + NS_ERROR_UNKNOWN_SOCKET_TYPE = 2152398899, + NS_ERROR_SOCKET_CREATE_FAILED = 2152398900, + NS_ERROR_SOCKET_ADDRESS_NOT_SUPPORTED = 2152398901, + NS_ERROR_SOCKET_ADDRESS_IN_USE = 2152398902, + NS_ERROR_CACHE_KEY_NOT_FOUND = 2152398909, + NS_ERROR_CACHE_DATA_IS_STREAM = 2152398910, + NS_ERROR_CACHE_DATA_IS_NOT_STREAM = 2152398911, + NS_ERROR_CACHE_WAIT_FOR_VALIDATION = 2152398912, + NS_ERROR_CACHE_ENTRY_DOOMED = 2152398913, + NS_ERROR_CACHE_READ_ACCESS_DENIED = 2152398914, + NS_ERROR_CACHE_WRITE_ACCESS_DENIED = 2152398915, + NS_ERROR_CACHE_IN_USE = 2152398916, + NS_ERROR_DOCUMENT_NOT_CACHED = 2152398918, + NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS = 2152398928, + NS_ERROR_HOST_IS_IP_ADDRESS = 2152398929, NS_SUCCESS_ADOPTED_DATA = 4915290, NS_NET_STATUS_BEGIN_FTP_TRANSACTION = 4915227, NS_NET_STATUS_END_FTP_TRANSACTION = 4915228, NS_SUCCESS_AUTH_FINISHED = 4915240, - NS_NET_STATUS_READING = -2142568440, - NS_NET_STATUS_WRITING = -2142568439, - NS_NET_STATUS_CONNECTING_TO = -2142568441, - NS_NET_STATUS_SENDING_TO = -2142568443, - NS_NET_STATUS_RECEIVING_FROM = -2142568442, - NS_ERROR_INTERCEPTION_FAILED = -2142568348, - NS_ERROR_PLUGINS_PLUGINSNOTCHANGED = -2142501912, - NS_ERROR_PLUGIN_DISABLED = -2142501911, - NS_ERROR_PLUGIN_BLOCKLISTED = -2142501910, - NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED = -2142501909, - NS_ERROR_PLUGIN_CLICKTOPLAY = -2142501908, + NS_NET_STATUS_READING = 2152398856, + NS_NET_STATUS_WRITING = 2152398857, + NS_NET_STATUS_CONNECTING_TO = 2152398855, + NS_NET_STATUS_SENDING_TO = 2152398853, + NS_NET_STATUS_RECEIVING_FROM = 2152398854, + NS_ERROR_INTERCEPTION_FAILED = 2152398948, + NS_ERROR_PLUGINS_PLUGINSNOTCHANGED = 2152465384, + NS_ERROR_PLUGIN_DISABLED = 2152465385, + NS_ERROR_PLUGIN_BLOCKLISTED = 2152465386, + NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED = 2152465387, + NS_ERROR_PLUGIN_CLICKTOPLAY = 2152465388, NS_PLUGIN_INIT_PENDING = 4981741, NS_TABLELAYOUT_CELL_NOT_FOUND = 5046272, NS_POSITION_BEFORE_TABLE = 5046275, NS_STATE_PROPERTY_NOT_THERE = 5046277, - NS_ERROR_HTMLPARSER_EOF = -2142370840, - NS_ERROR_HTMLPARSER_UNKNOWN = -2142370839, - NS_ERROR_HTMLPARSER_CANTPROPAGATE = -2142370838, - NS_ERROR_HTMLPARSER_CONTEXTMISMATCH = -2142370837, - NS_ERROR_HTMLPARSER_BADFILENAME = -2142370836, - NS_ERROR_HTMLPARSER_BADURL = -2142370835, - NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT = -2142370834, - NS_ERROR_HTMLPARSER_INTERRUPTED = -2142370833, - NS_ERROR_HTMLPARSER_BLOCK = -2142370832, - NS_ERROR_HTMLPARSER_BADTOKENIZER = -2142370831, - NS_ERROR_HTMLPARSER_BADATTRIBUTE = -2142370830, - NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = -2142370829, - NS_ERROR_HTMLPARSER_MISPLACEDTABLECONTENT = -2142370828, - NS_ERROR_HTMLPARSER_BADDTD = -2142370827, - NS_ERROR_HTMLPARSER_BADCONTEXT = -2142370826, - NS_ERROR_HTMLPARSER_STOPPARSING = -2142370825, - NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL = -2142370824, - NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP = -2142370823, - NS_ERROR_HTMLPARSER_FAKE_ENDTAG = -2142370822, - NS_ERROR_HTMLPARSER_INVALID_COMMENT = -2142370821, + NS_ERROR_HTMLPARSER_EOF = 2152596456, + NS_ERROR_HTMLPARSER_UNKNOWN = 2152596457, + NS_ERROR_HTMLPARSER_CANTPROPAGATE = 2152596458, + NS_ERROR_HTMLPARSER_CONTEXTMISMATCH = 2152596459, + NS_ERROR_HTMLPARSER_BADFILENAME = 2152596460, + NS_ERROR_HTMLPARSER_BADURL = 2152596461, + NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT = 2152596462, + NS_ERROR_HTMLPARSER_INTERRUPTED = 2152596463, + NS_ERROR_HTMLPARSER_BLOCK = 2152596464, + NS_ERROR_HTMLPARSER_BADTOKENIZER = 2152596465, + NS_ERROR_HTMLPARSER_BADATTRIBUTE = 2152596466, + NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = 2152596467, + NS_ERROR_HTMLPARSER_MISPLACEDTABLECONTENT = 2152596468, + NS_ERROR_HTMLPARSER_BADDTD = 2152596469, + NS_ERROR_HTMLPARSER_BADCONTEXT = 2152596470, + NS_ERROR_HTMLPARSER_STOPPARSING = 2152596471, + NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL = 2152596472, + NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP = 2152596473, + NS_ERROR_HTMLPARSER_FAKE_ENDTAG = 2152596474, + NS_ERROR_HTMLPARSER_INVALID_COMMENT = 2152596475, NS_HTMLTOKENS_NOT_AN_ENTITY = 5113808, NS_HTMLPARSER_VALID_META_CHARSET = 5114808, NS_RDF_CURSOR_EMPTY = 5177345, NS_RDF_NO_VALUE = 5177346, NS_RDF_ASSERTION_REJECTED = 5177347, NS_RDF_STOP_VISIT = 5177348, - NS_ERROR_UCONV_NOCONV = -2142240767, - NS_ERROR_UDEC_ILLEGALINPUT = -2142240754, + NS_ERROR_UCONV_NOCONV = 2152726529, + NS_ERROR_UDEC_ILLEGALINPUT = 2152726542, NS_SUCCESS_USING_FALLBACK_LOCALE = 5242882, NS_OK_UDEC_EXACTLENGTH = 5242891, NS_OK_UDEC_MOREINPUT = 5242892, @@ -1113,185 +1007,185 @@ pub enum nsresult { NS_OK_UENC_MOREOUTPUT = 5242914, NS_ERROR_UENC_NOMAPPING = 5242915, NS_OK_UENC_MOREINPUT = 5242916, - NS_ERROR_FILE_UNRECOGNIZED_PATH = -2142109695, - NS_ERROR_FILE_UNRESOLVABLE_SYMLINK = -2142109694, - NS_ERROR_FILE_EXECUTION_FAILED = -2142109693, - NS_ERROR_FILE_UNKNOWN_TYPE = -2142109692, - NS_ERROR_FILE_DESTINATION_NOT_DIR = -2142109691, - NS_ERROR_FILE_TARGET_DOES_NOT_EXIST = -2142109690, - NS_ERROR_FILE_COPY_OR_MOVE_FAILED = -2142109689, - NS_ERROR_FILE_ALREADY_EXISTS = -2142109688, - NS_ERROR_FILE_INVALID_PATH = -2142109687, - NS_ERROR_FILE_DISK_FULL = -2142109686, - NS_ERROR_FILE_CORRUPTED = -2142109685, - NS_ERROR_FILE_NOT_DIRECTORY = -2142109684, - NS_ERROR_FILE_IS_DIRECTORY = -2142109683, - NS_ERROR_FILE_IS_LOCKED = -2142109682, - NS_ERROR_FILE_TOO_BIG = -2142109681, - NS_ERROR_FILE_NO_DEVICE_SPACE = -2142109680, - NS_ERROR_FILE_NAME_TOO_LONG = -2142109679, - NS_ERROR_FILE_NOT_FOUND = -2142109678, - NS_ERROR_FILE_READ_ONLY = -2142109677, - NS_ERROR_FILE_DIR_NOT_EMPTY = -2142109676, - NS_ERROR_FILE_ACCESS_DENIED = -2142109675, + NS_ERROR_FILE_UNRECOGNIZED_PATH = 2152857601, + NS_ERROR_FILE_UNRESOLVABLE_SYMLINK = 2152857602, + NS_ERROR_FILE_EXECUTION_FAILED = 2152857603, + NS_ERROR_FILE_UNKNOWN_TYPE = 2152857604, + NS_ERROR_FILE_DESTINATION_NOT_DIR = 2152857605, + NS_ERROR_FILE_TARGET_DOES_NOT_EXIST = 2152857606, + NS_ERROR_FILE_COPY_OR_MOVE_FAILED = 2152857607, + NS_ERROR_FILE_ALREADY_EXISTS = 2152857608, + NS_ERROR_FILE_INVALID_PATH = 2152857609, + NS_ERROR_FILE_DISK_FULL = 2152857610, + NS_ERROR_FILE_CORRUPTED = 2152857611, + NS_ERROR_FILE_NOT_DIRECTORY = 2152857612, + NS_ERROR_FILE_IS_DIRECTORY = 2152857613, + NS_ERROR_FILE_IS_LOCKED = 2152857614, + NS_ERROR_FILE_TOO_BIG = 2152857615, + NS_ERROR_FILE_NO_DEVICE_SPACE = 2152857616, + NS_ERROR_FILE_NAME_TOO_LONG = 2152857617, + NS_ERROR_FILE_NOT_FOUND = 2152857618, + NS_ERROR_FILE_READ_ONLY = 2152857619, + NS_ERROR_FILE_DIR_NOT_EMPTY = 2152857620, + NS_ERROR_FILE_ACCESS_DENIED = 2152857621, NS_SUCCESS_FILE_DIRECTORY_EMPTY = 5373953, NS_SUCCESS_AGGREGATE_RESULT = 5373954, - NS_ERROR_DOM_INDEX_SIZE_ERR = -2142044159, - NS_ERROR_DOM_HIERARCHY_REQUEST_ERR = -2142044157, - NS_ERROR_DOM_WRONG_DOCUMENT_ERR = -2142044156, - NS_ERROR_DOM_INVALID_CHARACTER_ERR = -2142044155, - NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR = -2142044153, - NS_ERROR_DOM_NOT_FOUND_ERR = -2142044152, - NS_ERROR_DOM_NOT_SUPPORTED_ERR = -2142044151, - NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR = -2142044150, - NS_ERROR_DOM_INVALID_STATE_ERR = -2142044149, - NS_ERROR_DOM_SYNTAX_ERR = -2142044148, - NS_ERROR_DOM_INVALID_MODIFICATION_ERR = -2142044147, - NS_ERROR_DOM_NAMESPACE_ERR = -2142044146, - NS_ERROR_DOM_INVALID_ACCESS_ERR = -2142044145, - NS_ERROR_DOM_TYPE_MISMATCH_ERR = -2142044143, - NS_ERROR_DOM_SECURITY_ERR = -2142044142, - NS_ERROR_DOM_NETWORK_ERR = -2142044141, - NS_ERROR_DOM_ABORT_ERR = -2142044140, - NS_ERROR_DOM_URL_MISMATCH_ERR = -2142044139, - NS_ERROR_DOM_QUOTA_EXCEEDED_ERR = -2142044138, - NS_ERROR_DOM_TIMEOUT_ERR = -2142044137, - NS_ERROR_DOM_INVALID_NODE_TYPE_ERR = -2142044136, - NS_ERROR_DOM_DATA_CLONE_ERR = -2142044135, - NS_ERROR_TYPE_ERR = -2142044134, - NS_ERROR_RANGE_ERR = -2142044133, - NS_ERROR_DOM_ENCODING_NOT_SUPPORTED_ERR = -2142044132, - NS_ERROR_DOM_INVALID_POINTER_ERR = -2142044131, - NS_ERROR_DOM_UNKNOWN_ERR = -2142044130, - NS_ERROR_DOM_DATA_ERR = -2142044129, - NS_ERROR_DOM_OPERATION_ERR = -2142044128, - NS_ERROR_DOM_NOT_ALLOWED_ERR = -2142044127, - NS_ERROR_DOM_SECMAN_ERR = -2142043159, - NS_ERROR_DOM_WRONG_TYPE_ERR = -2142043158, - NS_ERROR_DOM_NOT_OBJECT_ERR = -2142043157, - NS_ERROR_DOM_NOT_XPC_OBJECT_ERR = -2142043156, - NS_ERROR_DOM_NOT_NUMBER_ERR = -2142043155, - NS_ERROR_DOM_NOT_BOOLEAN_ERR = -2142043154, - NS_ERROR_DOM_NOT_FUNCTION_ERR = -2142043153, - NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR = -2142043152, - NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN = -2142043151, - NS_ERROR_DOM_PROP_ACCESS_DENIED = -2142043150, - NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED = -2142043149, - NS_ERROR_DOM_BAD_URI = -2142043148, - NS_ERROR_DOM_RETVAL_UNDEFINED = -2142043147, - NS_ERROR_DOM_QUOTA_REACHED = -2142043146, - NS_ERROR_DOM_JS_EXCEPTION = -2142043145, - NS_ERROR_UNCATCHABLE_EXCEPTION = -2142043144, - NS_ERROR_DOM_DOMEXCEPTION = -2142043143, - NS_ERROR_DOM_EXCEPTION_ON_JSCONTEXT = -2142043142, + NS_ERROR_DOM_INDEX_SIZE_ERR = 2152923137, + NS_ERROR_DOM_HIERARCHY_REQUEST_ERR = 2152923139, + NS_ERROR_DOM_WRONG_DOCUMENT_ERR = 2152923140, + NS_ERROR_DOM_INVALID_CHARACTER_ERR = 2152923141, + NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR = 2152923143, + NS_ERROR_DOM_NOT_FOUND_ERR = 2152923144, + NS_ERROR_DOM_NOT_SUPPORTED_ERR = 2152923145, + NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR = 2152923146, + NS_ERROR_DOM_INVALID_STATE_ERR = 2152923147, + NS_ERROR_DOM_SYNTAX_ERR = 2152923148, + NS_ERROR_DOM_INVALID_MODIFICATION_ERR = 2152923149, + NS_ERROR_DOM_NAMESPACE_ERR = 2152923150, + NS_ERROR_DOM_INVALID_ACCESS_ERR = 2152923151, + NS_ERROR_DOM_TYPE_MISMATCH_ERR = 2152923153, + NS_ERROR_DOM_SECURITY_ERR = 2152923154, + NS_ERROR_DOM_NETWORK_ERR = 2152923155, + NS_ERROR_DOM_ABORT_ERR = 2152923156, + NS_ERROR_DOM_URL_MISMATCH_ERR = 2152923157, + NS_ERROR_DOM_QUOTA_EXCEEDED_ERR = 2152923158, + NS_ERROR_DOM_TIMEOUT_ERR = 2152923159, + NS_ERROR_DOM_INVALID_NODE_TYPE_ERR = 2152923160, + NS_ERROR_DOM_DATA_CLONE_ERR = 2152923161, + NS_ERROR_TYPE_ERR = 2152923162, + NS_ERROR_RANGE_ERR = 2152923163, + NS_ERROR_DOM_ENCODING_NOT_SUPPORTED_ERR = 2152923164, + NS_ERROR_DOM_INVALID_POINTER_ERR = 2152923165, + NS_ERROR_DOM_UNKNOWN_ERR = 2152923166, + NS_ERROR_DOM_DATA_ERR = 2152923167, + NS_ERROR_DOM_OPERATION_ERR = 2152923168, + NS_ERROR_DOM_NOT_ALLOWED_ERR = 2152923169, + NS_ERROR_DOM_SECMAN_ERR = 2152924137, + NS_ERROR_DOM_WRONG_TYPE_ERR = 2152924138, + NS_ERROR_DOM_NOT_OBJECT_ERR = 2152924139, + NS_ERROR_DOM_NOT_XPC_OBJECT_ERR = 2152924140, + NS_ERROR_DOM_NOT_NUMBER_ERR = 2152924141, + NS_ERROR_DOM_NOT_BOOLEAN_ERR = 2152924142, + NS_ERROR_DOM_NOT_FUNCTION_ERR = 2152924143, + NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR = 2152924144, + NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN = 2152924145, + NS_ERROR_DOM_PROP_ACCESS_DENIED = 2152924146, + NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED = 2152924147, + NS_ERROR_DOM_BAD_URI = 2152924148, + NS_ERROR_DOM_RETVAL_UNDEFINED = 2152924149, + NS_ERROR_DOM_QUOTA_REACHED = 2152924150, + NS_ERROR_DOM_JS_EXCEPTION = 2152924151, + NS_ERROR_UNCATCHABLE_EXCEPTION = 2152924152, + NS_ERROR_DOM_DOMEXCEPTION = 2152924153, + NS_ERROR_DOM_EXCEPTION_ON_JSCONTEXT = 2152924154, NS_SUCCESS_DOM_NO_OPERATION = 5439489, NS_SUCCESS_DOM_SCRIPT_EVALUATION_THREW = 5439490, NS_SUCCESS_DOM_SCRIPT_EVALUATION_THREW_UNCATCHABLE = 5439491, NS_IMAGELIB_SUCCESS_LOAD_FINISHED = 5505024, NS_IMAGELIB_CHANGING_OWNER = 5505025, - NS_IMAGELIB_ERROR_FAILURE = -2141978619, - NS_IMAGELIB_ERROR_NO_DECODER = -2141978618, - NS_IMAGELIB_ERROR_NOT_FINISHED = -2141978617, - NS_IMAGELIB_ERROR_NO_ENCODER = -2141978615, - NS_ERROR_EDITOR_NO_SELECTION = -2141847551, - NS_ERROR_EDITOR_NO_TEXTNODE = -2141847550, - NS_FOUND_TARGET = -2141847549, + NS_IMAGELIB_ERROR_FAILURE = 2152988677, + NS_IMAGELIB_ERROR_NO_DECODER = 2152988678, + NS_IMAGELIB_ERROR_NOT_FINISHED = 2152988679, + NS_IMAGELIB_ERROR_NO_ENCODER = 2152988681, + NS_ERROR_EDITOR_NO_SELECTION = 2153119745, + NS_ERROR_EDITOR_NO_TEXTNODE = 2153119746, + NS_FOUND_TARGET = 2153119747, NS_EDITOR_ELEMENT_NOT_FOUND = 5636097, - NS_ERROR_XPC_NOT_ENOUGH_ARGS = -2141782015, - NS_ERROR_XPC_NEED_OUT_OBJECT = -2141782014, - NS_ERROR_XPC_CANT_SET_OUT_VAL = -2141782013, - NS_ERROR_XPC_NATIVE_RETURNED_FAILURE = -2141782012, - NS_ERROR_XPC_CANT_GET_INTERFACE_INFO = -2141782011, - NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO = -2141782010, - NS_ERROR_XPC_CANT_GET_METHOD_INFO = -2141782009, - NS_ERROR_XPC_UNEXPECTED = -2141782008, - NS_ERROR_XPC_BAD_CONVERT_JS = -2141782007, - NS_ERROR_XPC_BAD_CONVERT_NATIVE = -2141782006, - NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF = -2141782005, - NS_ERROR_XPC_BAD_OP_ON_WN_PROTO = -2141782004, - NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN = -2141782003, - NS_ERROR_XPC_CANT_DEFINE_PROP_ON_WN = -2141782002, - NS_ERROR_XPC_CANT_WATCH_WN_STATIC = -2141782001, - NS_ERROR_XPC_CANT_EXPORT_WN_STATIC = -2141782000, - NS_ERROR_XPC_SCRIPTABLE_CALL_FAILED = -2141781999, - NS_ERROR_XPC_SCRIPTABLE_CTOR_FAILED = -2141781998, - NS_ERROR_XPC_CANT_CALL_WO_SCRIPTABLE = -2141781997, - NS_ERROR_XPC_CANT_CTOR_WO_SCRIPTABLE = -2141781996, - NS_ERROR_XPC_CI_RETURNED_FAILURE = -2141781995, - NS_ERROR_XPC_GS_RETURNED_FAILURE = -2141781994, - NS_ERROR_XPC_BAD_CID = -2141781993, - NS_ERROR_XPC_BAD_IID = -2141781992, - NS_ERROR_XPC_CANT_CREATE_WN = -2141781991, - NS_ERROR_XPC_JS_THREW_EXCEPTION = -2141781990, - NS_ERROR_XPC_JS_THREW_NATIVE_OBJECT = -2141781989, - NS_ERROR_XPC_JS_THREW_JS_OBJECT = -2141781988, - NS_ERROR_XPC_JS_THREW_NULL = -2141781987, - NS_ERROR_XPC_JS_THREW_STRING = -2141781986, - NS_ERROR_XPC_JS_THREW_NUMBER = -2141781985, - NS_ERROR_XPC_JAVASCRIPT_ERROR = -2141781984, - NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS = -2141781983, - NS_ERROR_XPC_CANT_CONVERT_PRIMITIVE_TO_ARRAY = -2141781982, - NS_ERROR_XPC_CANT_CONVERT_OBJECT_TO_ARRAY = -2141781981, - NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY = -2141781980, - NS_ERROR_XPC_CANT_GET_ARRAY_INFO = -2141781979, - NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING = -2141781978, - NS_ERROR_XPC_SECURITY_MANAGER_VETO = -2141781977, - NS_ERROR_XPC_INTERFACE_NOT_SCRIPTABLE = -2141781976, - NS_ERROR_XPC_INTERFACE_NOT_FROM_NSISUPPORTS = -2141781975, - NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT = -2141781974, - NS_ERROR_XPC_CANT_SET_READ_ONLY_CONSTANT = -2141781973, - NS_ERROR_XPC_CANT_SET_READ_ONLY_ATTRIBUTE = -2141781972, - NS_ERROR_XPC_CANT_SET_READ_ONLY_METHOD = -2141781971, - NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE = -2141781970, - NS_ERROR_XPC_CALL_TO_SCRIPTABLE_FAILED = -2141781969, - NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED = -2141781968, - NS_ERROR_XPC_BAD_ID_STRING = -2141781967, - NS_ERROR_XPC_BAD_INITIALIZER_NAME = -2141781966, - NS_ERROR_XPC_HAS_BEEN_SHUTDOWN = -2141781965, - NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN = -2141781964, - NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL = -2141781963, - NS_ERROR_XPC_CANT_PASS_CPOW_TO_NATIVE = -2141781962, - NS_ERROR_LAUNCHED_CHILD_PROCESS = -2141716280, - NS_ERROR_CSP_FORM_ACTION_VIOLATION = -2141585310, - NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION = -2141585309, - NS_ERROR_SRI_CORRUPT = -2141585208, - NS_ERROR_SRI_DISABLED = -2141585207, - NS_ERROR_SRI_NOT_ELIGIBLE = -2141585206, - NS_ERROR_CMS_VERIFY_NOT_SIGNED = -2141584384, - NS_ERROR_CMS_VERIFY_NO_CONTENT_INFO = -2141584383, - NS_ERROR_CMS_VERIFY_BAD_DIGEST = -2141584382, - NS_ERROR_CMS_VERIFY_NOCERT = -2141584380, - NS_ERROR_CMS_VERIFY_UNTRUSTED = -2141584379, - NS_ERROR_CMS_VERIFY_ERROR_UNVERIFIED = -2141584377, - NS_ERROR_CMS_VERIFY_ERROR_PROCESSING = -2141584376, - NS_ERROR_CMS_VERIFY_BAD_SIGNATURE = -2141584375, - NS_ERROR_CMS_VERIFY_DIGEST_MISMATCH = -2141584374, - NS_ERROR_CMS_VERIFY_UNKNOWN_ALGO = -2141584373, - NS_ERROR_CMS_VERIFY_UNSUPPORTED_ALGO = -2141584372, - NS_ERROR_CMS_VERIFY_MALFORMED_SIGNATURE = -2141584371, - NS_ERROR_CMS_VERIFY_HEADER_MISMATCH = -2141584370, - NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED = -2141584369, - NS_ERROR_CMS_VERIFY_CERT_WITHOUT_ADDRESS = -2141584368, - NS_ERROR_CMS_ENCRYPT_NO_BULK_ALG = -2141584352, - NS_ERROR_CMS_ENCRYPT_INCOMPLETE = -2141584351, - NS_ERROR_DOM_INVALID_EXPRESSION_ERR = -2141519821, - NS_ERROR_DOM_TYPE_ERR = -2141519820, - NS_ERROR_WONT_HANDLE_CONTENT = -2141388799, - NS_ERROR_MALWARE_URI = -2141388770, - NS_ERROR_PHISHING_URI = -2141388769, - NS_ERROR_TRACKING_URI = -2141388766, - NS_ERROR_UNWANTED_URI = -2141388765, - NS_ERROR_BLOCKED_URI = -2141388763, - NS_ERROR_SAVE_LINK_AS_TIMEOUT = -2141388768, - NS_ERROR_PARSED_DATA_CACHED = -2141388767, + NS_ERROR_XPC_NOT_ENOUGH_ARGS = 2153185281, + NS_ERROR_XPC_NEED_OUT_OBJECT = 2153185282, + NS_ERROR_XPC_CANT_SET_OUT_VAL = 2153185283, + NS_ERROR_XPC_NATIVE_RETURNED_FAILURE = 2153185284, + NS_ERROR_XPC_CANT_GET_INTERFACE_INFO = 2153185285, + NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO = 2153185286, + NS_ERROR_XPC_CANT_GET_METHOD_INFO = 2153185287, + NS_ERROR_XPC_UNEXPECTED = 2153185288, + NS_ERROR_XPC_BAD_CONVERT_JS = 2153185289, + NS_ERROR_XPC_BAD_CONVERT_NATIVE = 2153185290, + NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF = 2153185291, + NS_ERROR_XPC_BAD_OP_ON_WN_PROTO = 2153185292, + NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN = 2153185293, + NS_ERROR_XPC_CANT_DEFINE_PROP_ON_WN = 2153185294, + NS_ERROR_XPC_CANT_WATCH_WN_STATIC = 2153185295, + NS_ERROR_XPC_CANT_EXPORT_WN_STATIC = 2153185296, + NS_ERROR_XPC_SCRIPTABLE_CALL_FAILED = 2153185297, + NS_ERROR_XPC_SCRIPTABLE_CTOR_FAILED = 2153185298, + NS_ERROR_XPC_CANT_CALL_WO_SCRIPTABLE = 2153185299, + NS_ERROR_XPC_CANT_CTOR_WO_SCRIPTABLE = 2153185300, + NS_ERROR_XPC_CI_RETURNED_FAILURE = 2153185301, + NS_ERROR_XPC_GS_RETURNED_FAILURE = 2153185302, + NS_ERROR_XPC_BAD_CID = 2153185303, + NS_ERROR_XPC_BAD_IID = 2153185304, + NS_ERROR_XPC_CANT_CREATE_WN = 2153185305, + NS_ERROR_XPC_JS_THREW_EXCEPTION = 2153185306, + NS_ERROR_XPC_JS_THREW_NATIVE_OBJECT = 2153185307, + NS_ERROR_XPC_JS_THREW_JS_OBJECT = 2153185308, + NS_ERROR_XPC_JS_THREW_NULL = 2153185309, + NS_ERROR_XPC_JS_THREW_STRING = 2153185310, + NS_ERROR_XPC_JS_THREW_NUMBER = 2153185311, + NS_ERROR_XPC_JAVASCRIPT_ERROR = 2153185312, + NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS = 2153185313, + NS_ERROR_XPC_CANT_CONVERT_PRIMITIVE_TO_ARRAY = 2153185314, + NS_ERROR_XPC_CANT_CONVERT_OBJECT_TO_ARRAY = 2153185315, + NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY = 2153185316, + NS_ERROR_XPC_CANT_GET_ARRAY_INFO = 2153185317, + NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING = 2153185318, + NS_ERROR_XPC_SECURITY_MANAGER_VETO = 2153185319, + NS_ERROR_XPC_INTERFACE_NOT_SCRIPTABLE = 2153185320, + NS_ERROR_XPC_INTERFACE_NOT_FROM_NSISUPPORTS = 2153185321, + NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT = 2153185322, + NS_ERROR_XPC_CANT_SET_READ_ONLY_CONSTANT = 2153185323, + NS_ERROR_XPC_CANT_SET_READ_ONLY_ATTRIBUTE = 2153185324, + NS_ERROR_XPC_CANT_SET_READ_ONLY_METHOD = 2153185325, + NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE = 2153185326, + NS_ERROR_XPC_CALL_TO_SCRIPTABLE_FAILED = 2153185327, + NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED = 2153185328, + NS_ERROR_XPC_BAD_ID_STRING = 2153185329, + NS_ERROR_XPC_BAD_INITIALIZER_NAME = 2153185330, + NS_ERROR_XPC_HAS_BEEN_SHUTDOWN = 2153185331, + NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN = 2153185332, + NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL = 2153185333, + NS_ERROR_XPC_CANT_PASS_CPOW_TO_NATIVE = 2153185334, + NS_ERROR_LAUNCHED_CHILD_PROCESS = 2153251016, + NS_ERROR_CSP_FORM_ACTION_VIOLATION = 2153381986, + NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION = 2153381987, + NS_ERROR_SRI_CORRUPT = 2153382088, + NS_ERROR_SRI_DISABLED = 2153382089, + NS_ERROR_SRI_NOT_ELIGIBLE = 2153382090, + NS_ERROR_CMS_VERIFY_NOT_SIGNED = 2153382912, + NS_ERROR_CMS_VERIFY_NO_CONTENT_INFO = 2153382913, + NS_ERROR_CMS_VERIFY_BAD_DIGEST = 2153382914, + NS_ERROR_CMS_VERIFY_NOCERT = 2153382916, + NS_ERROR_CMS_VERIFY_UNTRUSTED = 2153382917, + NS_ERROR_CMS_VERIFY_ERROR_UNVERIFIED = 2153382919, + NS_ERROR_CMS_VERIFY_ERROR_PROCESSING = 2153382920, + NS_ERROR_CMS_VERIFY_BAD_SIGNATURE = 2153382921, + NS_ERROR_CMS_VERIFY_DIGEST_MISMATCH = 2153382922, + NS_ERROR_CMS_VERIFY_UNKNOWN_ALGO = 2153382923, + NS_ERROR_CMS_VERIFY_UNSUPPORTED_ALGO = 2153382924, + NS_ERROR_CMS_VERIFY_MALFORMED_SIGNATURE = 2153382925, + NS_ERROR_CMS_VERIFY_HEADER_MISMATCH = 2153382926, + NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED = 2153382927, + NS_ERROR_CMS_VERIFY_CERT_WITHOUT_ADDRESS = 2153382928, + NS_ERROR_CMS_ENCRYPT_NO_BULK_ALG = 2153382944, + NS_ERROR_CMS_ENCRYPT_INCOMPLETE = 2153382945, + NS_ERROR_DOM_INVALID_EXPRESSION_ERR = 2153447475, + NS_ERROR_DOM_TYPE_ERR = 2153447476, + NS_ERROR_WONT_HANDLE_CONTENT = 2153578497, + NS_ERROR_MALWARE_URI = 2153578526, + NS_ERROR_PHISHING_URI = 2153578527, + NS_ERROR_TRACKING_URI = 2153578530, + NS_ERROR_UNWANTED_URI = 2153578531, + NS_ERROR_BLOCKED_URI = 2153578533, + NS_ERROR_SAVE_LINK_AS_TIMEOUT = 2153578528, + NS_ERROR_PARSED_DATA_CACHED = 2153578529, NS_REFRESHURI_HEADER_FOUND = 6094850, - NS_ERROR_IMAGE_SRC_CHANGED = -2141323260, - NS_ERROR_IMAGE_BLOCKED = -2141323259, - NS_ERROR_CONTENT_BLOCKED = -2141323258, - NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = -2141323257, - NS_PROPTABLE_PROP_NOT_THERE = -2141323254, - NS_ERROR_XBL_BLOCKED = -2141323249, - NS_ERROR_CONTENT_CRASHED = -2141323248, + NS_ERROR_IMAGE_SRC_CHANGED = 2153644036, + NS_ERROR_IMAGE_BLOCKED = 2153644037, + NS_ERROR_CONTENT_BLOCKED = 2153644038, + NS_ERROR_CONTENT_BLOCKED_SHOW_ALT = 2153644039, + NS_PROPTABLE_PROP_NOT_THERE = 2153644042, + NS_ERROR_XBL_BLOCKED = 2153644047, + NS_ERROR_CONTENT_CRASHED = 2153644048, NS_HTML_STYLE_PROPERTY_NOT_THERE = 6160386, NS_CONTENT_BLOCKED = 6160392, NS_CONTENT_BLOCKED_SHOW_ALT = 6160393, @@ -1299,141 +1193,162 @@ pub enum nsresult { NS_FINDBROADCASTER_NOT_FOUND = 6160396, NS_FINDBROADCASTER_FOUND = 6160397, NS_FINDBROADCASTER_AWAIT_OVERLAYS = 6160398, - NS_ERROR_XSLT_PARSE_FAILURE = -2141192191, - NS_ERROR_XPATH_PARSE_FAILURE = -2141192190, - NS_ERROR_XSLT_ALREADY_SET = -2141192189, - NS_ERROR_XSLT_EXECUTION_FAILURE = -2141192188, - NS_ERROR_XPATH_UNKNOWN_FUNCTION = -2141192187, - NS_ERROR_XSLT_BAD_RECURSION = -2141192186, - NS_ERROR_XSLT_BAD_VALUE = -2141192185, - NS_ERROR_XSLT_NODESET_EXPECTED = -2141192184, - NS_ERROR_XSLT_ABORTED = -2141192183, - NS_ERROR_XSLT_NETWORK_ERROR = -2141192182, - NS_ERROR_XSLT_WRONG_MIME_TYPE = -2141192181, - NS_ERROR_XSLT_LOAD_RECURSION = -2141192180, - NS_ERROR_XPATH_BAD_ARGUMENT_COUNT = -2141192179, - NS_ERROR_XPATH_BAD_EXTENSION_FUNCTION = -2141192178, - NS_ERROR_XPATH_PAREN_EXPECTED = -2141192177, - NS_ERROR_XPATH_INVALID_AXIS = -2141192176, - NS_ERROR_XPATH_NO_NODE_TYPE_TEST = -2141192175, - NS_ERROR_XPATH_BRACKET_EXPECTED = -2141192174, - NS_ERROR_XPATH_INVALID_VAR_NAME = -2141192173, - NS_ERROR_XPATH_UNEXPECTED_END = -2141192172, - NS_ERROR_XPATH_OPERATOR_EXPECTED = -2141192171, - NS_ERROR_XPATH_UNCLOSED_LITERAL = -2141192170, - NS_ERROR_XPATH_BAD_COLON = -2141192169, - NS_ERROR_XPATH_BAD_BANG = -2141192168, - NS_ERROR_XPATH_ILLEGAL_CHAR = -2141192167, - NS_ERROR_XPATH_BINARY_EXPECTED = -2141192166, - NS_ERROR_XSLT_LOAD_BLOCKED_ERROR = -2141192165, - NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED = -2141192164, - NS_ERROR_XPATH_UNBALANCED_CURLY_BRACE = -2141192163, - NS_ERROR_XSLT_BAD_NODE_NAME = -2141192162, - NS_ERROR_XSLT_VAR_ALREADY_SET = -2141192161, - NS_ERROR_XSLT_CALL_TO_KEY_NOT_ALLOWED = -2141192160, + NS_ERROR_XSLT_PARSE_FAILURE = 2153775105, + NS_ERROR_XPATH_PARSE_FAILURE = 2153775106, + NS_ERROR_XSLT_ALREADY_SET = 2153775107, + NS_ERROR_XSLT_EXECUTION_FAILURE = 2153775108, + NS_ERROR_XPATH_UNKNOWN_FUNCTION = 2153775109, + NS_ERROR_XSLT_BAD_RECURSION = 2153775110, + NS_ERROR_XSLT_BAD_VALUE = 2153775111, + NS_ERROR_XSLT_NODESET_EXPECTED = 2153775112, + NS_ERROR_XSLT_ABORTED = 2153775113, + NS_ERROR_XSLT_NETWORK_ERROR = 2153775114, + NS_ERROR_XSLT_WRONG_MIME_TYPE = 2153775115, + NS_ERROR_XSLT_LOAD_RECURSION = 2153775116, + NS_ERROR_XPATH_BAD_ARGUMENT_COUNT = 2153775117, + NS_ERROR_XPATH_BAD_EXTENSION_FUNCTION = 2153775118, + NS_ERROR_XPATH_PAREN_EXPECTED = 2153775119, + NS_ERROR_XPATH_INVALID_AXIS = 2153775120, + NS_ERROR_XPATH_NO_NODE_TYPE_TEST = 2153775121, + NS_ERROR_XPATH_BRACKET_EXPECTED = 2153775122, + NS_ERROR_XPATH_INVALID_VAR_NAME = 2153775123, + NS_ERROR_XPATH_UNEXPECTED_END = 2153775124, + NS_ERROR_XPATH_OPERATOR_EXPECTED = 2153775125, + NS_ERROR_XPATH_UNCLOSED_LITERAL = 2153775126, + NS_ERROR_XPATH_BAD_COLON = 2153775127, + NS_ERROR_XPATH_BAD_BANG = 2153775128, + NS_ERROR_XPATH_ILLEGAL_CHAR = 2153775129, + NS_ERROR_XPATH_BINARY_EXPECTED = 2153775130, + NS_ERROR_XSLT_LOAD_BLOCKED_ERROR = 2153775131, + NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED = 2153775132, + NS_ERROR_XPATH_UNBALANCED_CURLY_BRACE = 2153775133, + NS_ERROR_XSLT_BAD_NODE_NAME = 2153775134, + NS_ERROR_XSLT_VAR_ALREADY_SET = 2153775135, + NS_ERROR_XSLT_CALL_TO_KEY_NOT_ALLOWED = 2153775136, NS_XSLT_GET_NEW_HANDLER = 6291457, - NS_ERROR_TRANSPORT_INIT = -2141126655, - NS_ERROR_DUPLICATE_HANDLE = -2141126654, - NS_ERROR_BRIDGE_OPEN_PARENT = -2141126653, - NS_ERROR_BRIDGE_OPEN_CHILD = -2141126652, - NS_ERROR_DOM_SVG_WRONG_TYPE_ERR = -2141061120, - NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE = -2141061118, - NS_ERROR_STORAGE_BUSY = -2140995583, - NS_ERROR_STORAGE_IOERR = -2140995582, - NS_ERROR_STORAGE_CONSTRAINT = -2140995581, - NS_ERROR_DOM_FILE_NOT_FOUND_ERR = -2140864512, - NS_ERROR_DOM_FILE_NOT_READABLE_ERR = -2140864511, - NS_ERROR_DOM_FILE_ABORT_ERR = -2140864510, - NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR = -2140798975, - NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR = -2140798973, - NS_ERROR_DOM_INDEXEDDB_CONSTRAINT_ERR = -2140798972, - NS_ERROR_DOM_INDEXEDDB_DATA_ERR = -2140798971, - NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR = -2140798970, - NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR = -2140798969, - NS_ERROR_DOM_INDEXEDDB_ABORT_ERR = -2140798968, - NS_ERROR_DOM_INDEXEDDB_READ_ONLY_ERR = -2140798967, - NS_ERROR_DOM_INDEXEDDB_TIMEOUT_ERR = -2140798966, - NS_ERROR_DOM_INDEXEDDB_QUOTA_ERR = -2140798965, - NS_ERROR_DOM_INDEXEDDB_VERSION_ERR = -2140798964, - NS_ERROR_DOM_INDEXEDDB_RECOVERABLE_ERR = -2140797975, - NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR = -2140733439, - NS_ERROR_DOM_FILEHANDLE_NOT_ALLOWED_ERR = -2140733438, - NS_ERROR_DOM_FILEHANDLE_INACTIVE_ERR = -2140733437, - NS_ERROR_DOM_FILEHANDLE_ABORT_ERR = -2140733436, - NS_ERROR_DOM_FILEHANDLE_READ_ONLY_ERR = -2140733435, - NS_ERROR_DOM_FILEHANDLE_QUOTA_ERR = -2140733434, - NS_ERROR_SIGNED_JAR_NOT_SIGNED = -2140667903, - NS_ERROR_SIGNED_JAR_MODIFIED_ENTRY = -2140667902, - NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY = -2140667901, - NS_ERROR_SIGNED_JAR_ENTRY_MISSING = -2140667900, - NS_ERROR_SIGNED_JAR_WRONG_SIGNATURE = -2140667899, - NS_ERROR_SIGNED_JAR_ENTRY_TOO_LARGE = -2140667898, - NS_ERROR_SIGNED_JAR_ENTRY_INVALID = -2140667897, - NS_ERROR_SIGNED_JAR_MANIFEST_INVALID = -2140667896, - NS_ERROR_DOM_FILESYSTEM_INVALID_PATH_ERR = -2140602367, - NS_ERROR_DOM_FILESYSTEM_INVALID_MODIFICATION_ERR = -2140602366, - NS_ERROR_DOM_FILESYSTEM_NO_MODIFICATION_ALLOWED_ERR = -2140602365, - NS_ERROR_DOM_FILESYSTEM_PATH_EXISTS_ERR = -2140602364, - NS_ERROR_DOM_FILESYSTEM_TYPE_MISMATCH_ERR = -2140602363, - NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR = -2140602362, - NS_ERROR_DOM_BLUETOOTH_FAIL = -2140536831, - NS_ERROR_DOM_BLUETOOTH_NOT_READY = -2140536830, - NS_ERROR_DOM_BLUETOOTH_NOMEM = -2140536829, - NS_ERROR_DOM_BLUETOOTH_BUSY = -2140536828, - NS_ERROR_DOM_BLUETOOTH_DONE = -2140536827, - NS_ERROR_DOM_BLUETOOTH_UNSUPPORTED = -2140536826, - NS_ERROR_DOM_BLUETOOTH_PARM_INVALID = -2140536825, - NS_ERROR_DOM_BLUETOOTH_UNHANDLED = -2140536824, - NS_ERROR_DOM_BLUETOOTH_AUTH_FAILURE = -2140536823, - NS_ERROR_DOM_BLUETOOTH_RMT_DEV_DOWN = -2140536822, - NS_ERROR_DOM_BLUETOOTH_AUTH_REJECTED = -2140536821, - NS_ERROR_SIGNED_APP_MANIFEST_INVALID = -2140471295, - NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR = -2140405759, - NS_ERROR_DOM_PUSH_INVALID_REGISTRATION_ERR = -2140340223, - NS_ERROR_DOM_PUSH_DENIED_ERR = -2140340222, - NS_ERROR_DOM_PUSH_ABORT_ERR = -2140340221, - NS_ERROR_DOM_PUSH_SERVICE_UNREACHABLE = -2140340220, - NS_ERROR_DOM_PUSH_INVALID_KEY_ERR = -2140340219, - NS_ERROR_DOM_PUSH_MISMATCHED_KEY_ERR = -2140340218, - NS_ERROR_DOM_MEDIA_ABORT_ERR = -2140274687, - NS_ERROR_DOM_MEDIA_NOT_ALLOWED_ERR = -2140274686, - NS_ERROR_DOM_MEDIA_NOT_SUPPORTED_ERR = -2140274685, - NS_ERROR_DOWNLOAD_COMPLETE = -2139619327, - NS_ERROR_DOWNLOAD_NOT_PARTIAL = -2139619326, - NS_ERROR_UNORM_MOREOUTPUT = -2139619295, - NS_ERROR_DOCSHELL_REQUEST_REJECTED = -2139618327, - NS_ERROR_DOCUMENT_IS_PRINTMODE = -2139617327, + NS_ERROR_TRANSPORT_INIT = 2153840641, + NS_ERROR_DUPLICATE_HANDLE = 2153840642, + NS_ERROR_BRIDGE_OPEN_PARENT = 2153840643, + NS_ERROR_BRIDGE_OPEN_CHILD = 2153840644, + NS_ERROR_DOM_SVG_WRONG_TYPE_ERR = 2153906176, + NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE = 2153906178, + NS_ERROR_STORAGE_BUSY = 2153971713, + NS_ERROR_STORAGE_IOERR = 2153971714, + NS_ERROR_STORAGE_CONSTRAINT = 2153971715, + NS_ERROR_DOM_FILE_NOT_FOUND_ERR = 2154102784, + NS_ERROR_DOM_FILE_NOT_READABLE_ERR = 2154102785, + NS_ERROR_DOM_FILE_ABORT_ERR = 2154102786, + NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR = 2154168321, + NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR = 2154168323, + NS_ERROR_DOM_INDEXEDDB_CONSTRAINT_ERR = 2154168324, + NS_ERROR_DOM_INDEXEDDB_DATA_ERR = 2154168325, + NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR = 2154168326, + NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR = 2154168327, + NS_ERROR_DOM_INDEXEDDB_ABORT_ERR = 2154168328, + NS_ERROR_DOM_INDEXEDDB_READ_ONLY_ERR = 2154168329, + NS_ERROR_DOM_INDEXEDDB_TIMEOUT_ERR = 2154168330, + NS_ERROR_DOM_INDEXEDDB_QUOTA_ERR = 2154168331, + NS_ERROR_DOM_INDEXEDDB_VERSION_ERR = 2154168332, + NS_ERROR_DOM_INDEXEDDB_RECOVERABLE_ERR = 2154169321, + NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR = 2154233857, + NS_ERROR_DOM_FILEHANDLE_NOT_ALLOWED_ERR = 2154233858, + NS_ERROR_DOM_FILEHANDLE_INACTIVE_ERR = 2154233859, + NS_ERROR_DOM_FILEHANDLE_ABORT_ERR = 2154233860, + NS_ERROR_DOM_FILEHANDLE_READ_ONLY_ERR = 2154233861, + NS_ERROR_DOM_FILEHANDLE_QUOTA_ERR = 2154233862, + NS_ERROR_SIGNED_JAR_NOT_SIGNED = 2154299393, + NS_ERROR_SIGNED_JAR_MODIFIED_ENTRY = 2154299394, + NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY = 2154299395, + NS_ERROR_SIGNED_JAR_ENTRY_MISSING = 2154299396, + NS_ERROR_SIGNED_JAR_WRONG_SIGNATURE = 2154299397, + NS_ERROR_SIGNED_JAR_ENTRY_TOO_LARGE = 2154299398, + NS_ERROR_SIGNED_JAR_ENTRY_INVALID = 2154299399, + NS_ERROR_SIGNED_JAR_MANIFEST_INVALID = 2154299400, + NS_ERROR_DOM_FILESYSTEM_INVALID_PATH_ERR = 2154364929, + NS_ERROR_DOM_FILESYSTEM_INVALID_MODIFICATION_ERR = 2154364930, + NS_ERROR_DOM_FILESYSTEM_NO_MODIFICATION_ALLOWED_ERR = 2154364931, + NS_ERROR_DOM_FILESYSTEM_PATH_EXISTS_ERR = 2154364932, + NS_ERROR_DOM_FILESYSTEM_TYPE_MISMATCH_ERR = 2154364933, + NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR = 2154364934, + NS_ERROR_DOM_BLUETOOTH_FAIL = 2154430465, + NS_ERROR_DOM_BLUETOOTH_NOT_READY = 2154430466, + NS_ERROR_DOM_BLUETOOTH_NOMEM = 2154430467, + NS_ERROR_DOM_BLUETOOTH_BUSY = 2154430468, + NS_ERROR_DOM_BLUETOOTH_DONE = 2154430469, + NS_ERROR_DOM_BLUETOOTH_UNSUPPORTED = 2154430470, + NS_ERROR_DOM_BLUETOOTH_PARM_INVALID = 2154430471, + NS_ERROR_DOM_BLUETOOTH_UNHANDLED = 2154430472, + NS_ERROR_DOM_BLUETOOTH_AUTH_FAILURE = 2154430473, + NS_ERROR_DOM_BLUETOOTH_RMT_DEV_DOWN = 2154430474, + NS_ERROR_DOM_BLUETOOTH_AUTH_REJECTED = 2154430475, + NS_ERROR_SIGNED_APP_MANIFEST_INVALID = 2154496001, + NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR = 2154561537, + NS_ERROR_DOM_PUSH_INVALID_REGISTRATION_ERR = 2154627073, + NS_ERROR_DOM_PUSH_DENIED_ERR = 2154627074, + NS_ERROR_DOM_PUSH_ABORT_ERR = 2154627075, + NS_ERROR_DOM_PUSH_SERVICE_UNREACHABLE = 2154627076, + NS_ERROR_DOM_PUSH_INVALID_KEY_ERR = 2154627077, + NS_ERROR_DOM_PUSH_MISMATCHED_KEY_ERR = 2154627078, + NS_ERROR_DOM_MEDIA_ABORT_ERR = 2154692609, + NS_ERROR_DOM_MEDIA_NOT_ALLOWED_ERR = 2154692610, + NS_ERROR_DOM_MEDIA_NOT_SUPPORTED_ERR = 2154692611, + NS_ERROR_DOM_MEDIA_DECODE_ERR = 2154692612, + NS_ERROR_DOM_MEDIA_FATAL_ERR = 2154692613, + NS_ERROR_DOM_MEDIA_METADATA_ERR = 2154692614, + NS_ERROR_DOM_MEDIA_OVERFLOW_ERR = 2154692615, + NS_ERROR_DOM_MEDIA_END_OF_STREAM = 2154692616, + NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA = 2154692617, + NS_ERROR_DOM_MEDIA_CANCELED = 2154692618, + NS_ERROR_DOM_MEDIA_MEDIASINK_ERR = 2154692619, + NS_ERROR_DOM_MEDIA_DEMUXER_ERR = 2154692620, + NS_ERROR_DOM_MEDIA_CDM_ERR = 2154692621, + NS_ERROR_DOWNLOAD_COMPLETE = 2155347969, + NS_ERROR_DOWNLOAD_NOT_PARTIAL = 2155347970, + NS_ERROR_UNORM_MOREOUTPUT = 2155348001, + NS_ERROR_DOCSHELL_REQUEST_REJECTED = 2155348969, + NS_ERROR_DOCUMENT_IS_PRINTMODE = 2155349969, NS_SUCCESS_DONT_FIXUP = 7864321, NS_SUCCESS_RESTART_APP_NOT_SAME_PROFILE = 7864323, NS_SUCCESS_UNORM_NOTFOUND = 7864337, - NS_ERROR_NOT_IN_TREE = -2139619290, + NS_ERROR_NOT_IN_TREE = 2155348006, NS_OK_NO_NAME_CLAUSE_HANDLED = 7864354, } pub type nsrefcnt = MozRefCountType; #[repr(C)] -#[derive(Debug, Copy)] -pub struct HasPointerTypeHelper; -impl ::std::clone::Clone for HasPointerTypeHelper { - fn clone(&self) -> Self { *self } +#[derive(Debug, Copy, Clone)] +pub struct AlignedStorage2<T> { + pub u: AlignedStorage2_U<T>, + pub _phantom_0: ::std::marker::PhantomData<T>, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct PointerType<T, D> { - pub _phantom0: ::std::marker::PhantomData<T>, - pub _phantom1: ::std::marker::PhantomData<D>, +pub struct AlignedStorage2_U<T> { + pub mBytes: __BindgenUnionField<*mut ::std::os::raw::c_char>, + pub mDummy: __BindgenUnionField<u64>, + pub bindgen_union_field: u64, + pub _phantom_0: ::std::marker::PhantomData<T>, } /** - * <div rustbindgen="true" replaces="UniquePtr"> + * Pair is the logical concatenation of an instance of A with an instance B. + * Space is conserved when possible. Neither A nor B may be a final class. * - * TODO(Emilio): This is a workaround and we should be able to get rid of this - * one. + * It's typically clearer to have individual A and B member fields. Except if + * you want the space-conserving qualities of Pair, you're probably better off + * not using this! + * + * No guarantees are provided about the memory layout of A and B, the order of + * initialization or destruction of A and B, and so on. (This is approximately + * required to optimize space usage.) The first/second names are merely + * conceptual! */ #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct UniquePtr<T, Deleter> { - pub mPtr: *mut T, - pub _phantom0: ::std::marker::PhantomData<Deleter>, +pub struct Pair<A, B> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<A>, + pub _phantom_1: ::std::marker::PhantomData<B>, } +pub type Pair_Base = [u8; 0usize]; /** * A default deletion policy using plain old operator delete. * @@ -1450,81 +1365,255 @@ pub struct UniquePtr<T, Deleter> { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct DefaultDelete<T> { - pub _phantom0: ::std::marker::PhantomData<T>, + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct UniqueSelector<T> { - pub _phantom0: ::std::marker::PhantomData<T>, +#[derive(Debug, Copy)] +pub struct JSContext { + pub _address: u8, +} +impl Clone for JSContext { + fn clone(&self) -> Self { *self } } -/** - * typedefs for backwards compatibility - */ -pub type nsSubstring = nsAString_internal; -pub type nsCSubstring = nsACString_internal; -pub type nsAFlatString = nsString; -pub type nsASingleFragmentString = nsSubstring; -pub type nsAFlatCString = nsCString; -pub type nsASingleFragmentCString = nsCSubstring; -/** - * @see nsTAString - */ #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsReadingIterator<CharT> { - pub mStart: *const CharT, - pub mEnd: *const CharT, - pub mPosition: *const CharT, +#[derive(Debug, Copy)] +pub struct JSObject { + pub _address: u8, +} +impl Clone for JSObject { + fn clone(&self) -> Self { *self } } /** - * @see nsTAString + * JS::Value is the interface for a single JavaScript Engine value. A few + * general notes on JS::Value: + * + * - JS::Value has setX() and isX() members for X in + * + * { Int32, Double, String, Symbol, Boolean, Undefined, Null, Object, Magic } + * + * JS::Value also contains toX() for each of the non-singleton types. + * + * - Magic is a singleton type whose payload contains either a JSWhyMagic "reason" for + * the magic value or a uint32_t value. By providing JSWhyMagic values when + * creating and checking for magic values, it is possible to assert, at + * runtime, that only magic values with the expected reason flow through a + * particular value. For example, if cx->exception has a magic value, the + * reason must be JS_GENERATOR_CLOSING. + * + * - The JS::Value operations are preferred. The JSVAL_* operations remain for + * compatibility; they may be removed at some point. These operations mostly + * provide similar functionality. But there are a few key differences. One + * is that JS::Value gives null a separate type. + * Also, to help prevent mistakenly boxing a nullable JSObject* as an object, + * Value::setObject takes a JSObject&. (Conversely, Value::toObject returns a + * JSObject&.) A convenience member Value::setObjectOrNull is provided. + * + * - JSVAL_VOID is the same as the singleton value of the Undefined type. + * + * - Note that JS::Value is 8 bytes on 32 and 64-bit architectures. Thus, on + * 32-bit user code should avoid copying jsval/JS::Value as much as possible, + * preferring to pass by const Value&. */ #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsWritingIterator<CharT> { - pub mStart: *mut CharT, - pub mEnd: *mut CharT, - pub mPosition: *mut CharT, +#[derive(Debug, Copy)] +pub struct Value { + pub data: jsval_layout, +} +#[test] +fn bindgen_test_layout_Value() { + assert_eq!(::std::mem::size_of::<Value>() , 8usize); + assert_eq!(::std::mem::align_of::<Value>() , 8usize); +} +impl Clone for Value { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStringComparator { - pub _vftable: *const _vftable_nsStringComparator, +pub struct JSCompartment { + pub _address: u8, +} +impl Clone for JSCompartment { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct _vftable_nsStringComparator { - pub _bindgen_empty_ctype_warning_fix: u64, +#[derive(Debug)] +pub struct atomic<_Tp> { + pub _M_i: _Tp, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FreePolicy { + pub _address: u8, } -impl ::std::clone::Clone for nsStringComparator { +#[test] +fn bindgen_test_layout_FreePolicy() { + assert_eq!(::std::mem::size_of::<FreePolicy>() , 1usize); + assert_eq!(::std::mem::align_of::<FreePolicy>() , 1usize); +} +impl Clone for FreePolicy { fn clone(&self) -> Self { *self } } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum JSValueTag { + JSVAL_TAG_MAX_DOUBLE = 131056, + JSVAL_TAG_INT32 = 131057, + JSVAL_TAG_UNDEFINED = 131058, + JSVAL_TAG_STRING = 131061, + JSVAL_TAG_SYMBOL = 131062, + JSVAL_TAG_BOOLEAN = 131059, + JSVAL_TAG_MAGIC = 131060, + JSVAL_TAG_NULL = 131064, + JSVAL_TAG_OBJECT = 131068, + JSVAL_TAG_PRIVATE_GCTHING = 131063, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum JSWhyMagic { + JS_ELEMENTS_HOLE = 0, + JS_NO_ITER_VALUE = 1, + JS_GENERATOR_CLOSING = 2, + JS_NO_CONSTANT = 3, + JS_THIS_POISON = 4, + JS_ARG_POISON = 5, + JS_SERIALIZE_NO_NODE = 6, + JS_LAZY_ARGUMENTS = 7, + JS_OPTIMIZED_ARGUMENTS = 8, + JS_IS_CONSTRUCTING = 9, + JS_BLOCK_NEEDS_CLONE = 10, + JS_HASH_KEY_EMPTY = 11, + JS_ION_ERROR = 12, + JS_ION_BAILOUT = 13, + JS_OPTIMIZED_OUT = 14, + JS_UNINITIALIZED_LEXICAL = 15, + JS_GENERIC_MAGIC = 16, + JS_WHY_MAGIC_COUNT = 17, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct jsval_layout { + pub asBits: __BindgenUnionField<u64>, + pub debugView: __BindgenUnionField<jsval_layout__bindgen_ty_bindgen_id_60705>, + pub s: __BindgenUnionField<jsval_layout__bindgen_ty_bindgen_id_60712>, + pub asDouble: __BindgenUnionField<f64>, + pub asPtr: __BindgenUnionField<*mut ::std::os::raw::c_void>, + pub asWord: __BindgenUnionField<usize>, + pub asUIntPtr: __BindgenUnionField<usize>, + pub bindgen_union_field: u64, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct jsval_layout__bindgen_ty_bindgen_id_60705 { + pub _bitfield_1: u64, +} #[test] -fn bindgen_test_layout_nsStringComparator() { - assert_eq!(::std::mem::size_of::<nsStringComparator>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStringComparator>() , 8usize); +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_60705() { + assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_bindgen_id_60705>() + , 8usize); + assert_eq!(::std::mem::align_of::<jsval_layout__bindgen_ty_bindgen_id_60705>() + , 8usize); +} +impl Clone for jsval_layout__bindgen_ty_bindgen_id_60705 { + fn clone(&self) -> Self { *self } +} +impl jsval_layout__bindgen_ty_bindgen_id_60705 { + #[inline] + pub fn payload47(&self) -> u64 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (140737488355327usize as u64)) >> + 0u32) as u64) + } + } + #[inline] + pub fn set_payload47(&mut self, val: u64) { + self._bitfield_1 &= !(140737488355327usize as u64); + self._bitfield_1 |= + ((val as u64 as u64) << 0u32) & (140737488355327usize as u64); + } + #[inline] + pub fn tag(&self) -> JSValueTag { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (18446603336221196288usize as u64)) >> + 47u32) as u32) + } + } + #[inline] + pub fn set_tag(&mut self, val: JSValueTag) { + self._bitfield_1 &= !(18446603336221196288usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 47u32) & + (18446603336221196288usize as u64); + } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsDefaultStringComparator { - pub _base: nsStringComparator, +pub struct jsval_layout__bindgen_ty_bindgen_id_60712 { + pub payload: jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713, } #[repr(C)] -pub struct _vftable_nsDefaultStringComparator { - pub _base: _vftable_nsStringComparator, +#[derive(Debug, Copy)] +pub struct jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713 { + pub i32: __BindgenUnionField<i32>, + pub u32: __BindgenUnionField<u32>, + pub why: __BindgenUnionField<JSWhyMagic>, + 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::<jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713>() + , 4usize); + assert_eq!(::std::mem::align_of::<jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713>() + , 4usize); +} +impl Clone for + jsval_layout__bindgen_ty_bindgen_id_60712__bindgen_ty_bindgen_id_60713 { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_jsval_layout__bindgen_ty_bindgen_id_60712() { + assert_eq!(::std::mem::size_of::<jsval_layout__bindgen_ty_bindgen_id_60712>() + , 4usize); + assert_eq!(::std::mem::align_of::<jsval_layout__bindgen_ty_bindgen_id_60712>() + , 4usize); +} +impl Clone for jsval_layout__bindgen_ty_bindgen_id_60712 { + fn clone(&self) -> Self { *self } } -impl ::std::clone::Clone for nsDefaultStringComparator { +impl Clone for jsval_layout { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] pub struct nsAString_internal { - pub mData: *mut ::std::os::raw::c_ushort, - pub mLength: ::std::os::raw::c_uint, + pub mData: *mut nsAString_internal_char_type, + pub mLength: nsAString_internal_size_type, pub mFlags: u32, } +pub type nsAString_internal_fallible_t = fallible_t; +pub type nsAString_internal_char_type = u16; +pub type nsAString_internal_char_traits = u8; +pub type nsAString_internal_incompatible_char_type = u8; +pub type nsAString_internal_self_type = nsAString_internal; +pub type nsAString_internal_abstract_string_type = + nsAString_internal_self_type; +pub type nsAString_internal_base_string_type = nsAString_internal_self_type; +pub type nsAString_internal_substring_type = nsAString_internal_self_type; +pub type nsAString_internal_substring_tuple_type = nsSubstringTuple; +pub type nsAString_internal_string_type = nsString; +pub type nsAString_internal_const_iterator = nsReadingIterator<u16>; +pub type nsAString_internal_iterator = nsWritingIterator<u16>; +pub type nsAString_internal_comparator_type = nsStringComparator; +pub type nsAString_internal_char_iterator = *mut nsAString_internal_char_type; +pub type nsAString_internal_const_char_iterator = + *const nsAString_internal_char_type; +pub type nsAString_internal_size_type = u32; +pub type nsAString_internal_index_type = u32; #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAString_internal_nsTSubstring_h_unnamed_1 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsAString_internal__bindgen_ty_bindgen_id_62550 { F_NONE = 0, F_TERMINATED = 1, F_VOIDED = 2, @@ -1541,43 +1630,99 @@ fn bindgen_test_layout_nsAString_internal() { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCStringComparator { - pub _vftable: *const _vftable_nsCStringComparator, +pub struct nsSubstringTuple { + pub mHead: *const nsSubstringTuple_self_type, + pub mFragA: *const nsSubstringTuple_base_string_type, + pub mFragB: *const nsSubstringTuple_base_string_type, +} +pub type nsSubstringTuple_char_type = u16; +pub type nsSubstringTuple_char_traits = nsCharTraits<u16>; +pub type nsSubstringTuple_self_type = nsSubstringTuple; +pub type nsSubstringTuple_substring_type = nsAString_internal; +pub type nsSubstringTuple_base_string_type = nsAString_internal; +pub type nsSubstringTuple_size_type = u32; +#[test] +fn bindgen_test_layout_nsSubstringTuple() { + assert_eq!(::std::mem::size_of::<nsSubstringTuple>() , 24usize); + assert_eq!(::std::mem::align_of::<nsSubstringTuple>() , 8usize); +} +impl Clone for nsSubstringTuple { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsString { + pub _base: nsAString_internal, } +pub type nsString_self_type = nsString; #[repr(C)] -pub struct _vftable_nsCStringComparator { - pub _bindgen_empty_ctype_warning_fix: u64, +#[derive(Debug, Copy)] +pub struct nsString_Segment { + pub mBegin: u32, + pub mLength: u32, } -impl ::std::clone::Clone for nsCStringComparator { +#[test] +fn bindgen_test_layout_nsString_Segment() { + assert_eq!(::std::mem::size_of::<nsString_Segment>() , 8usize); + assert_eq!(::std::mem::align_of::<nsString_Segment>() , 4usize); +} +impl Clone for nsString_Segment { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsCStringComparator() { - assert_eq!(::std::mem::size_of::<nsCStringComparator>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCStringComparator>() , 8usize); +fn bindgen_test_layout_nsString() { + assert_eq!(::std::mem::size_of::<nsString>() , 16usize); + assert_eq!(::std::mem::align_of::<nsString>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsDefaultCStringComparator { - pub _base: nsCStringComparator, +pub struct bindgen_vtable__bindgen_id_63160 { } #[repr(C)] -pub struct _vftable_nsDefaultCStringComparator { - pub _base: _vftable_nsCStringComparator, +#[derive(Debug, Copy)] +pub struct nsStringComparator { + pub vtable_: *const bindgen_vtable__bindgen_id_63160, } -impl ::std::clone::Clone for nsDefaultCStringComparator { +pub type nsStringComparator_char_type = u16; +#[test] +fn bindgen_test_layout_nsStringComparator() { + assert_eq!(::std::mem::size_of::<nsStringComparator>() , 8usize); + assert_eq!(::std::mem::align_of::<nsStringComparator>() , 8usize); +} +impl Clone for nsStringComparator { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] pub struct nsACString_internal { - pub mData: *mut ::std::os::raw::c_char, - pub mLength: ::std::os::raw::c_uint, + pub mData: *mut nsACString_internal_char_type, + pub mLength: nsACString_internal_size_type, pub mFlags: u32, } +pub type nsACString_internal_fallible_t = fallible_t; +pub type nsACString_internal_char_type = ::std::os::raw::c_char; +pub type nsACString_internal_char_traits = u8; +pub type nsACString_internal_incompatible_char_type = u16; +pub type nsACString_internal_self_type = nsACString_internal; +pub type nsACString_internal_abstract_string_type = + nsACString_internal_self_type; +pub type nsACString_internal_base_string_type = nsACString_internal_self_type; +pub type nsACString_internal_substring_type = nsACString_internal_self_type; +pub type nsACString_internal_substring_tuple_type = nsCSubstringTuple; +pub type nsACString_internal_string_type = nsCString; +pub type nsACString_internal_const_iterator = + nsReadingIterator<::std::os::raw::c_char>; +pub type nsACString_internal_iterator = + nsWritingIterator<::std::os::raw::c_char>; +pub type nsACString_internal_comparator_type = nsCStringComparator; +pub type nsACString_internal_char_iterator = + *mut nsACString_internal_char_type; +pub type nsACString_internal_const_char_iterator = + *const nsACString_internal_char_type; +pub type nsACString_internal_size_type = u32; +pub type nsACString_internal_index_type = u32; #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsACString_internal_nsTSubstring_h_unnamed_2 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsACString_internal__bindgen_ty_bindgen_id_64390 { F_NONE = 0, F_TERMINATED = 1, F_VOIDED = 2, @@ -1592,977 +1737,3217 @@ fn bindgen_test_layout_nsACString_internal() { assert_eq!(::std::mem::size_of::<nsACString_internal>() , 16usize); assert_eq!(::std::mem::align_of::<nsACString_internal>() , 8usize); } -/** - * ASCII case-insensitive comparator. (for Unicode case-insensitive - * comparision, see nsUnicharUtils.h) - */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCaseInsensitiveCStringComparator { - pub _base: nsCStringComparator, +pub struct nsCSubstringTuple { + pub mHead: *const nsCSubstringTuple_self_type, + pub mFragA: *const nsCSubstringTuple_base_string_type, + pub mFragB: *const nsCSubstringTuple_base_string_type, } -#[repr(C)] -pub struct _vftable_nsCaseInsensitiveCStringComparator { - pub _base: _vftable_nsCStringComparator, +pub type nsCSubstringTuple_char_type = ::std::os::raw::c_char; +pub type nsCSubstringTuple_char_traits = nsCharTraits<::std::os::raw::c_char>; +pub type nsCSubstringTuple_self_type = nsCSubstringTuple; +pub type nsCSubstringTuple_substring_type = nsACString_internal; +pub type nsCSubstringTuple_base_string_type = nsACString_internal; +pub type nsCSubstringTuple_size_type = u32; +#[test] +fn bindgen_test_layout_nsCSubstringTuple() { + assert_eq!(::std::mem::size_of::<nsCSubstringTuple>() , 24usize); + assert_eq!(::std::mem::align_of::<nsCSubstringTuple>() , 8usize); } -impl ::std::clone::Clone for nsCaseInsensitiveCStringComparator { +impl Clone for nsCSubstringTuple { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsCaseInsensitiveCStringArrayComparator; -impl ::std::clone::Clone for nsCaseInsensitiveCStringArrayComparator { - fn clone(&self) -> Self { *self } +#[derive(Debug)] +pub struct nsCString { + pub _base: nsACString_internal, } +pub type nsCString_self_type = nsCString; #[repr(C)] #[derive(Debug, Copy)] -pub struct nsSubstringTuple { - pub mHead: *const nsSubstringTuple, - pub mFragA: *const nsAString_internal, - pub mFragB: *const nsAString_internal, +pub struct nsCString_Segment { + pub mBegin: u32, + pub mLength: u32, +} +#[test] +fn bindgen_test_layout_nsCString_Segment() { + assert_eq!(::std::mem::size_of::<nsCString_Segment>() , 8usize); + assert_eq!(::std::mem::align_of::<nsCString_Segment>() , 4usize); } -impl ::std::clone::Clone for nsSubstringTuple { +impl Clone for nsCString_Segment { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsSubstringTuple() { - assert_eq!(::std::mem::size_of::<nsSubstringTuple>() , 24usize); - assert_eq!(::std::mem::align_of::<nsSubstringTuple>() , 8usize); +fn bindgen_test_layout_nsCString() { + assert_eq!(::std::mem::size_of::<nsCString>() , 16usize); + assert_eq!(::std::mem::align_of::<nsCString>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsCSubstringTuple { - pub mHead: *const nsCSubstringTuple, - pub mFragA: *const nsACString_internal, - pub mFragB: *const nsACString_internal, +pub struct bindgen_vtable__bindgen_id_64942 { } -impl ::std::clone::Clone for nsCSubstringTuple { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsCStringComparator { + pub vtable_: *const bindgen_vtable__bindgen_id_64942, } +pub type nsCStringComparator_char_type = ::std::os::raw::c_char; #[test] -fn bindgen_test_layout_nsCSubstringTuple() { - assert_eq!(::std::mem::size_of::<nsCSubstringTuple>() , 24usize); - assert_eq!(::std::mem::align_of::<nsCSubstringTuple>() , 8usize); +fn bindgen_test_layout_nsCStringComparator() { + assert_eq!(::std::mem::size_of::<nsCStringComparator>() , 8usize); + assert_eq!(::std::mem::align_of::<nsCStringComparator>() , 8usize); +} +impl Clone for nsCStringComparator { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsString { - pub _base: nsAString_internal, +pub struct bindgen_vtable__bindgen_id_65245 { } +/** + * Basic component object model interface. Objects which implement + * this interface support runtime interface discovery (QueryInterface) + * and a reference counted memory model (AddRef/Release). This is + * modelled after the win32 IUnknown API. + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsString_Segment { - pub mBegin: u32, - pub mLength: u32, +pub struct nsISupports { + pub vtable_: *const bindgen_vtable__bindgen_id_65245, } -impl ::std::clone::Clone for nsString_Segment { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsISupports_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsString_Segment() { - assert_eq!(::std::mem::size_of::<nsString_Segment>() , 8usize); - assert_eq!(::std::mem::align_of::<nsString_Segment>() , 4usize); +fn bindgen_test_layout_nsISupports() { + assert_eq!(::std::mem::size_of::<nsISupports>() , 8usize); + assert_eq!(::std::mem::align_of::<nsISupports>() , 8usize); } -#[test] -fn bindgen_test_layout_nsString() { - assert_eq!(::std::mem::size_of::<nsString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsString>() , 8usize); +impl Clone for nsISupports { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsFixedString { - pub _base: nsString, - pub mFixedCapacity: ::std::os::raw::c_uint, - pub mFixedBuf: *mut ::std::os::raw::c_ushort, +pub struct bindgen_vtable__bindgen_id_65528 { +} +/** + * Participant implementation classes + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsCycleCollectionParticipant { + pub vtable_: *const bindgen_vtable__bindgen_id_65528, + pub mMightSkip: bool, } #[test] -fn bindgen_test_layout_nsFixedString() { - assert_eq!(::std::mem::size_of::<nsFixedString>() , 32usize); - assert_eq!(::std::mem::align_of::<nsFixedString>() , 8usize); +fn bindgen_test_layout_nsCycleCollectionParticipant() { + assert_eq!(::std::mem::size_of::<nsCycleCollectionParticipant>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsCycleCollectionParticipant>() , + 8usize); +} +impl Clone for nsCycleCollectionParticipant { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct nsAutoString { - pub _base: nsFixedString, - pub mStorage: [::std::os::raw::c_ushort; 64usize], +#[derive(Debug, Copy)] +pub struct nsCycleCollectingAutoRefCnt { + pub mRefCntAndFlags: usize, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAutoString_nsTString_h_unnamed_3 { kDefaultStorageSize = 64, } #[test] -fn bindgen_test_layout_nsAutoString() { - assert_eq!(::std::mem::size_of::<nsAutoString>() , 160usize); - assert_eq!(::std::mem::align_of::<nsAutoString>() , 8usize); +fn bindgen_test_layout_nsCycleCollectingAutoRefCnt() { + assert_eq!(::std::mem::size_of::<nsCycleCollectingAutoRefCnt>() , 8usize); + assert_eq!(::std::mem::align_of::<nsCycleCollectingAutoRefCnt>() , + 8usize); } +impl Clone for nsCycleCollectingAutoRefCnt { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsCharTraits<CharT> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<CharT>, +} +/** + * @see nsTAString + */ #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct Dont_Instantiate_nsTArray_of<A> { - pub _phantom0: ::std::marker::PhantomData<A>, +pub struct nsReadingIterator<CharT> { + pub mStart: *mut CharT, + pub mEnd: *mut CharT, + pub mPosition: *mut CharT, } +pub type nsReadingIterator_self_type<CharT> = nsReadingIterator<CharT>; +pub type nsReadingIterator_difference_type = isize; +pub type nsReadingIterator_value_type<CharT> = CharT; +pub type nsReadingIterator_pointer<CharT> = *mut CharT; +pub type nsReadingIterator_reference = [u8; 0usize]; +/** + * @see nsTAString + */ #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct Instead_Use_nsTArray_of<A> { - pub _phantom0: ::std::marker::PhantomData<A>, +pub struct nsWritingIterator<CharT> { + pub mStart: *mut CharT, + pub mEnd: *mut CharT, + pub mPosition: *mut CharT, } +pub type nsWritingIterator_self_type<CharT> = nsWritingIterator<CharT>; +pub type nsWritingIterator_difference_type = isize; +pub type nsWritingIterator_value_type<CharT> = CharT; +pub type nsWritingIterator_pointer<CharT> = *mut CharT; +pub type nsWritingIterator_reference = [u8; 0usize]; +pub type PRUint32 = ::std::os::raw::c_uint; +pub type PRUintn = ::std::os::raw::c_uint; +/************************************************************************ +** TYPES: PRSize +** DESCRIPTION: +** A type for representing the size of objects. +************************************************************************/ +pub type PRSize = usize; #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayElementTraits; -impl ::std::clone::Clone for nsTArrayElementTraits { +pub struct PLHashEntry { + pub next: *mut PLHashEntry, + pub keyHash: PLHashNumber, + pub key: *const ::std::os::raw::c_void, + pub value: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_PLHashEntry() { + assert_eq!(::std::mem::size_of::<PLHashEntry>() , 32usize); + assert_eq!(::std::mem::align_of::<PLHashEntry>() , 8usize); +} +impl Clone for PLHashEntry { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsXPIDLString { - pub _base: nsString, +#[derive(Debug, Copy)] +pub struct PLHashTable { + pub buckets: *mut *mut PLHashEntry, + pub nentries: PRUint32, + pub shift: PRUint32, + pub keyHash: PLHashFunction, + pub keyCompare: PLHashComparator, + pub valueCompare: PLHashComparator, + pub allocOps: *const PLHashAllocOps, + pub allocPriv: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_PLHashTable() { + assert_eq!(::std::mem::size_of::<PLHashTable>() , 56usize); + assert_eq!(::std::mem::align_of::<PLHashTable>() , 8usize); +} +impl Clone for PLHashTable { + fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsXPIDLString() { - assert_eq!(::std::mem::size_of::<nsXPIDLString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsXPIDLString>() , 8usize); +pub type PLHashNumber = PRUint32; +pub type PLHashFunction = + ::std::option::Option<unsafe extern "C" fn(key: + *const ::std::os::raw::c_void) + -> ::std::os::raw::c_uint>; +pub type PLHashComparator = + ::std::option::Option<unsafe extern "C" fn(v1: + *const ::std::os::raw::c_void, + v2: + *const ::std::os::raw::c_void) + -> ::std::os::raw::c_int>; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PLHashAllocOps { + pub allocTable: ::std::option::Option<unsafe extern "C" fn(pool: + *mut ::std::os::raw::c_void, + size: PRSize) + -> *mut ::std::os::raw::c_void>, + pub freeTable: ::std::option::Option<unsafe extern "C" fn(pool: + *mut ::std::os::raw::c_void, + item: + *mut ::std::os::raw::c_void)>, + pub allocEntry: ::std::option::Option<unsafe extern "C" fn(pool: + *mut ::std::os::raw::c_void, + key: + *const ::std::os::raw::c_void) + -> *mut PLHashEntry>, + pub freeEntry: ::std::option::Option<unsafe extern "C" fn(pool: + *mut ::std::os::raw::c_void, + he: + *mut PLHashEntry, + flag: PRUintn)>, +} +#[test] +fn bindgen_test_layout_PLHashAllocOps() { + assert_eq!(::std::mem::size_of::<PLHashAllocOps>() , 32usize); + assert_eq!(::std::mem::align_of::<PLHashAllocOps>() , 8usize); +} +impl Clone for PLHashAllocOps { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] -pub struct nsGetterCopies { - pub mString: *mut nsAString_internal, - pub mData: *mut ::std::os::raw::c_ushort, +pub struct OwningNonNull<T> { + pub mPtr: RefPtr<T>, } -#[test] -fn bindgen_test_layout_nsGetterCopies() { - assert_eq!(::std::mem::size_of::<nsGetterCopies>() , 16usize); - assert_eq!(::std::mem::align_of::<nsGetterCopies>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StaticRefPtr<T> { + pub mRawPtr: *mut T, } #[repr(C)] #[derive(Debug)] -pub struct nsAdoptingString { - pub _base: nsXPIDLString, +pub struct RefPtr<T> { + pub mRawPtr: *mut T, } -#[test] -fn bindgen_test_layout_nsAdoptingString() { - assert_eq!(::std::mem::size_of::<nsAdoptingString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAdoptingString>() , 8usize); +pub type RefPtr_element_type<T> = T; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct RefPtr_Proxy<T, R, Args> { + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<R>, + pub _phantom_2: ::std::marker::PhantomData<Args>, } +pub type RefPtr_Proxy_member_function = [u8; 0usize]; #[repr(C)] -#[derive(Debug)] -pub struct nsCString { - pub _base: nsACString_internal, +#[derive(Debug, Copy, Clone)] +pub struct RefPtr_ConstRemovingRefPtrTraits<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCString_Segment { - pub mBegin: u32, - pub mLength: u32, -} -impl ::std::clone::Clone for nsCString_Segment { - fn clone(&self) -> Self { *self } +pub struct nsAutoOwningThread { + pub mThread: *mut ::std::os::raw::c_void, } #[test] -fn bindgen_test_layout_nsCString_Segment() { - assert_eq!(::std::mem::size_of::<nsCString_Segment>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCString_Segment>() , 4usize); +fn bindgen_test_layout_nsAutoOwningThread() { + assert_eq!(::std::mem::size_of::<nsAutoOwningThread>() , 8usize); + assert_eq!(::std::mem::align_of::<nsAutoOwningThread>() , 8usize); } -#[test] -fn bindgen_test_layout_nsCString() { - assert_eq!(::std::mem::size_of::<nsCString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsCString>() , 8usize); +impl Clone for nsAutoOwningThread { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsFixedCString { - pub _base: nsCString, - pub mFixedCapacity: ::std::os::raw::c_uint, - pub mFixedBuf: *mut ::std::os::raw::c_char, +#[derive(Debug, Copy)] +pub struct nsAutoRefCnt { + pub mValue: nsrefcnt, +} +extern "C" { + #[link_name = "_ZN12nsAutoRefCnt12isThreadSafeE"] + pub static nsAutoRefCnt_isThreadSafe: bool; } #[test] -fn bindgen_test_layout_nsFixedCString() { - assert_eq!(::std::mem::size_of::<nsFixedCString>() , 32usize); - assert_eq!(::std::mem::align_of::<nsFixedCString>() , 8usize); +fn bindgen_test_layout_nsAutoRefCnt() { + assert_eq!(::std::mem::size_of::<nsAutoRefCnt>() , 8usize); + assert_eq!(::std::mem::align_of::<nsAutoRefCnt>() , 8usize); +} +impl Clone for nsAutoRefCnt { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct nsAutoCString { - pub _base: nsFixedCString, - pub mStorage: [::std::os::raw::c_char; 64usize], +#[derive(Debug, Copy)] +pub struct ThreadSafeAutoRefCnt { + pub mValue: u64, +} +extern "C" { + #[link_name = "_ZN7mozilla20ThreadSafeAutoRefCnt12isThreadSafeE"] + pub static ThreadSafeAutoRefCnt_isThreadSafe: bool; } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAutoCString_nsTString_h_unnamed_4 { kDefaultStorageSize = 64, } #[test] -fn bindgen_test_layout_nsAutoCString() { - assert_eq!(::std::mem::size_of::<nsAutoCString>() , 96usize); - assert_eq!(::std::mem::align_of::<nsAutoCString>() , 8usize); +fn bindgen_test_layout_ThreadSafeAutoRefCnt() { + assert_eq!(::std::mem::size_of::<ThreadSafeAutoRefCnt>() , 8usize); + assert_eq!(::std::mem::align_of::<ThreadSafeAutoRefCnt>() , 8usize); } +impl Clone for ThreadSafeAutoRefCnt { + fn clone(&self) -> Self { *self } +} +pub type nscoord = i32; #[repr(C)] -#[derive(Debug)] -pub struct nsXPIDLCString { - pub _base: nsCString, +#[derive(Debug, Copy)] +pub struct nsTArrayHeader { + pub mLength: u32, + pub _bitfield_1: u32, +} +extern "C" { + #[link_name = "_ZN14nsTArrayHeader9sEmptyHdrE"] + pub static mut nsTArrayHeader_sEmptyHdr: nsTArrayHeader; } #[test] -fn bindgen_test_layout_nsXPIDLCString() { - assert_eq!(::std::mem::size_of::<nsXPIDLCString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsXPIDLCString>() , 8usize); +fn bindgen_test_layout_nsTArrayHeader() { + assert_eq!(::std::mem::size_of::<nsTArrayHeader>() , 8usize); + assert_eq!(::std::mem::align_of::<nsTArrayHeader>() , 4usize); } -#[repr(C)] -#[derive(Debug)] -pub struct nsCGetterCopies { - pub mString: *mut nsACString_internal, - pub mData: *mut ::std::os::raw::c_char, +impl Clone for nsTArrayHeader { + fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsCGetterCopies() { - assert_eq!(::std::mem::size_of::<nsCGetterCopies>() , 16usize); - assert_eq!(::std::mem::align_of::<nsCGetterCopies>() , 8usize); +impl nsTArrayHeader { + #[inline] + pub fn mCapacity(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483647usize as u32)) >> 0u32) as + u32) + } + } + #[inline] + pub fn set_mCapacity(&mut self, val: u32) { + self._bitfield_1 &= !(2147483647usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 0u32) & (2147483647usize as u32); + } + #[inline] + pub fn mIsAutoArray(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483648usize as u32)) >> 31u32) as + u32) + } + } + #[inline] + pub fn set_mIsAutoArray(&mut self, val: u32) { + self._bitfield_1 &= !(2147483648usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 31u32) & (2147483648usize as u32); + } } #[repr(C)] #[derive(Debug)] -pub struct nsAdoptingCString { - pub _base: nsXPIDLCString, -} -#[test] -fn bindgen_test_layout_nsAdoptingCString() { - assert_eq!(::std::mem::size_of::<nsAdoptingCString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAdoptingCString>() , 8usize); +pub struct nsCOMPtr<T> { + pub _base: nsCOMPtr_base, + pub _phantom_0: ::std::marker::PhantomData<T>, } +pub type nsCOMPtr_element_type<T> = T; /** - * A helper class that converts a UTF-16 string to ASCII in a lossy manner + * Factors implementation for all template versions of nsCOMPtr. + * + * Here's the way people normally do things like this: + * + * template<class T> class Foo { ... }; + * template<> class Foo<void*> { ... }; + * template<class T> class Foo<T*> : private Foo<void*> { ... }; */ #[repr(C)] -pub struct NS_LossyConvertUTF16toASCII { - pub _base: nsAutoCString, -} -#[test] -fn bindgen_test_layout_NS_LossyConvertUTF16toASCII() { - assert_eq!(::std::mem::size_of::<NS_LossyConvertUTF16toASCII>() , - 96usize); - assert_eq!(::std::mem::align_of::<NS_LossyConvertUTF16toASCII>() , - 8usize); +#[derive(Debug)] +pub struct nsCOMPtr_base { + pub mRawPtr: *mut nsISupports, } #[repr(C)] -pub struct NS_ConvertASCIItoUTF16 { - pub _base: nsAutoString, +#[derive(Debug)] +pub struct ErrorResult { + pub _base: TErrorResult<AssertAndSuppressCleanupPolicy>, } +pub type ErrorResult_BaseErrorResult = + TErrorResult<AssertAndSuppressCleanupPolicy>; #[test] -fn bindgen_test_layout_NS_ConvertASCIItoUTF16() { - assert_eq!(::std::mem::size_of::<NS_ConvertASCIItoUTF16>() , 160usize); - assert_eq!(::std::mem::align_of::<NS_ConvertASCIItoUTF16>() , 8usize); +fn bindgen_test_layout_ErrorResult() { + assert_eq!(::std::mem::size_of::<ErrorResult>() , 16usize); + assert_eq!(::std::mem::align_of::<ErrorResult>() , 8usize); } /** - * A helper class that converts a UTF-16 string to UTF-8 + * Templated implementation class for various ErrorResult-like things. The + * instantiations differ only in terms of their cleanup policies (used in the + * destructor), which they can specify via the template argument. Note that + * this means it's safe to reinterpret_cast between the instantiations unless + * you plan to invoke the destructor through such a cast pointer. + * + * A cleanup policy consists of two booleans: whether to assert that we've been + * reported or suppressed, and whether to then go ahead and suppress the + * exception. */ #[repr(C)] -pub struct NS_ConvertUTF16toUTF8 { - pub _base: nsAutoCString, -} -#[test] -fn bindgen_test_layout_NS_ConvertUTF16toUTF8() { - assert_eq!(::std::mem::size_of::<NS_ConvertUTF16toUTF8>() , 96usize); - assert_eq!(::std::mem::align_of::<NS_ConvertUTF16toUTF8>() , 8usize); +#[derive(Debug)] +pub struct TErrorResult<CleanupPolicy> { + pub mResult: nsresult, + pub __bindgen_anon_1: TErrorResult__bindgen_ty_bindgen_id_70167<CleanupPolicy>, + pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>, } #[repr(C)] -pub struct NS_ConvertUTF8toUTF16 { - pub _base: nsAutoString, +#[derive(Debug, Copy, Clone)] +pub struct TErrorResult_Message<CleanupPolicy> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>, } -#[test] -fn bindgen_test_layout_NS_ConvertUTF8toUTF16() { - assert_eq!(::std::mem::size_of::<NS_ConvertUTF8toUTF16>() , 160usize); - assert_eq!(::std::mem::align_of::<NS_ConvertUTF8toUTF16>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TErrorResult_DOMExceptionInfo<CleanupPolicy> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>, } -pub type nsVoidableString = nsAutoString; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct RefPtrTraits<U> { - pub _phantom0: ::std::marker::PhantomData<U>, +pub struct TErrorResult__bindgen_ty_bindgen_id_70167<CleanupPolicy> { + pub mMessage: __BindgenUnionField<*mut TErrorResult_Message<CleanupPolicy>>, + pub mJSException: __BindgenUnionField<Value>, + pub mDOMExceptionInfo: __BindgenUnionField<*mut TErrorResult_DOMExceptionInfo<CleanupPolicy>>, + pub bindgen_union_field: u64, + pub _phantom_0: ::std::marker::PhantomData<CleanupPolicy>, } #[repr(C)] -#[derive(Debug)] -pub struct RefPtr<T> { - pub mRawPtr: *mut T, +#[derive(Debug, Copy)] +pub struct AssertAndSuppressCleanupPolicy { + pub _address: u8, +} +extern "C" { + #[link_name = + "_ZN7mozilla14binding_danger30AssertAndSuppressCleanupPolicy13assertHandledE"] + pub static AssertAndSuppressCleanupPolicy_assertHandled: bool; +} +extern "C" { + #[link_name = + "_ZN7mozilla14binding_danger30AssertAndSuppressCleanupPolicy8suppressE"] + pub static AssertAndSuppressCleanupPolicy_suppress: bool; +} +#[test] +fn bindgen_test_layout_AssertAndSuppressCleanupPolicy() { + assert_eq!(::std::mem::size_of::<AssertAndSuppressCleanupPolicy>() , + 1usize); + assert_eq!(::std::mem::align_of::<AssertAndSuppressCleanupPolicy>() , + 1usize); +} +impl Clone for AssertAndSuppressCleanupPolicy { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] -pub struct RefPtr_Proxy<T, R, Args> { +pub struct nsAutoPtr<T> { pub mRawPtr: *mut T, - pub _phantom0: ::std::marker::PhantomData<R>, - pub _phantom1: ::std::marker::PhantomData<Args>, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct RefPtr_ConstRemovingRefPtrTraits<T, U> { - pub _phantom0: ::std::marker::PhantomData<T>, - pub _phantom1: ::std::marker::PhantomData<U>, +pub struct nsAutoPtr_Ptr<T> { + pub mPtr: *mut T, } +pub type nsAutoPtr_element_type<T> = T; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct RefPtrGetterAddRefs<T> { - pub mTargetSmartPtr: *mut RefPtr<T>, +pub struct nsAutoPtr_Proxy<T, R, Args> { + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<R>, + pub _phantom_2: ::std::marker::PhantomData<Args>, } +pub type nsAutoPtr_Proxy_member_function = [u8; 0usize]; /** - * A "unique identifier". This is modeled after OSF DCE UUIDs. + * This structure precedes the string buffers "we" allocate. It may be the + * case that nsTAString::mData does not point to one of these special + * buffers. The mFlags member variable distinguishes the buffer type. + * + * When this header is in use, it enables reference counting, and capacity + * tracking. NOTE: A string buffer can be modified only if its reference + * count is 1. */ #[repr(C)] -#[derive(Debug)] -pub struct nsID { - pub m0: u32, - pub m1: u16, - pub m2: u16, - pub m3: [u8; 8usize], +#[derive(Debug, Copy)] +pub struct nsStringBuffer { + pub mRefCount: u32, + pub mStorageSize: u32, } #[test] -fn bindgen_test_layout_nsID() { - assert_eq!(::std::mem::size_of::<nsID>() , 16usize); - assert_eq!(::std::mem::align_of::<nsID>() , 4usize); +fn bindgen_test_layout_nsStringBuffer() { + assert_eq!(::std::mem::size_of::<nsStringBuffer>() , 8usize); + assert_eq!(::std::mem::align_of::<nsStringBuffer>() , 4usize); +} +impl Clone for nsStringBuffer { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIAtom { + pub _base: nsISupports, + pub _bitfield_1: u32, + pub mHash: u32, + /** + * WARNING! There is an invisible constraint on |mString|: the chars it + * points to must belong to an nsStringBuffer. This is so that the + * nsStringBuffer::FromData() calls above are valid. + */ + pub mString: *mut u16, } -/** - * A stack helper class to convert a nsID to a string. Useful - * for printing nsIDs. For example: - * nsID aID = ...; - * printf("%s", nsIDToCString(aID).get()); - */ #[repr(C)] -#[derive(Copy)] -pub struct nsIDToCString { - pub mStringBytes: [::std::os::raw::c_char; 39usize], +#[derive(Debug, Copy, Clone)] +pub struct nsIAtom_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } -impl ::std::clone::Clone for nsIDToCString { +#[test] +fn bindgen_test_layout_nsIAtom() { + assert_eq!(::std::mem::size_of::<nsIAtom>() , 24usize); + assert_eq!(::std::mem::align_of::<nsIAtom>() , 8usize); +} +impl Clone for nsIAtom { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsIDToCString() { - assert_eq!(::std::mem::size_of::<nsIDToCString>() , 39usize); - assert_eq!(::std::mem::align_of::<nsIDToCString>() , 1usize); +impl nsIAtom { + #[inline] + pub fn mLength(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483647usize as u32)) >> 0u32) as + u32) + } + } + #[inline] + pub fn set_mLength(&mut self, val: u32) { + self._bitfield_1 &= !(2147483647usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 0u32) & (2147483647usize as u32); + } + #[inline] + pub fn mIsStatic(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483648usize as u32)) >> 31u32) as + u32) + } + } + #[inline] + pub fn set_mIsStatic(&mut self, val: u32) { + self._bitfield_1 &= !(2147483648usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 31u32) & (2147483648usize as u32); + } } -pub type nsCID = nsID; -/** - * An "interface id" which can be used to uniquely identify a given - * interface. - */ -pub type nsIID = nsID; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct COMTypeInfo<T, U> { - pub _phantom0: ::std::marker::PhantomData<T>, - pub _phantom1: ::std::marker::PhantomData<U>, +pub struct bindgen_vtable__bindgen_id_70938 { } /** - * Basic component object model interface. Objects which implement - * this interface support runtime interface discovery (QueryInterface) - * and a reference counted memory model (AddRef/Release). This is - * modelled after the win32 IUnknown API. + * Class to store the wrapper for an object. This can only be used with objects + * that only have one non-security wrapper at a time (for an XPCWrappedNative + * this is usually ensured by setting an explicit parent in the PreCreate hook + * for the class). + * + * An instance of nsWrapperCache can be gotten from an object that implements + * a wrapper cache by calling QueryInterface on it. Note that this breaks XPCOM + * rules a bit (this object doesn't derive from nsISupports). + * + * The cache can store objects other than wrappers. We allow wrappers to use a + * separate JSObject to store their state (mostly expandos). If the wrapper is + * collected and we want to preserve this state we actually store the state + * object in the cache. + * + * The cache can store 2 types of objects: + * + * If WRAPPER_IS_NOT_DOM_BINDING is set (IsDOMBinding() returns false): + * - the JSObject of an XPCWrappedNative wrapper + * + * If WRAPPER_IS_NOT_DOM_BINDING is not set (IsDOMBinding() returns true): + * - a DOM binding object (regular JS object or proxy) + * + * The finalizer for the wrapper clears the cache. + * + * A compacting GC can move the wrapper object. Pointers to moved objects are + * usually found and updated by tracing the heap, however non-preserved wrappers + * are weak references and are not traced, so another approach is + * necessary. Instead a class hook (objectMovedOp) is provided that is called + * when an object is moved and is responsible for ensuring pointers are + * updated. It does this by calling UpdateWrapper() on the wrapper + * cache. SetWrapper() asserts that the hook is implemented for any wrapper set. + * + * A number of the methods are implemented in nsWrapperCacheInlines.h because we + * have to include some JS headers that don't play nicely with the rest of the + * codebase. Include nsWrapperCacheInlines.h if you need to call those methods. */ #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsISupports { - pub _vftable: *const _vftable_nsISupports, +#[derive(Debug)] +pub struct nsWrapperCache { + pub vtable_: *const bindgen_vtable__bindgen_id_70938, + pub mWrapper: *mut JSObject, + pub mFlags: nsWrapperCache_FlagsType, } #[repr(C)] -pub struct _vftable_nsISupports { - pub _bindgen_empty_ctype_warning_fix: u64, +#[derive(Debug, Copy, Clone)] +pub struct nsWrapperCache_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } -impl ::std::clone::Clone for nsISupports { - fn clone(&self) -> Self { *self } +pub type nsWrapperCache_FlagsType = u32; +#[repr(u32)] +/** + * If this bit is set then we're preserving the wrapper, which in effect ties + * the lifetime of the JS object stored in the cache to the lifetime of the + * native object. We rely on the cycle collector to break the cycle that this + * causes between the native object and the JS object, so it is important that + * any native object that supports preserving of its wrapper + * traces/traverses/unlinks the cached JS object (see + * NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER, + * NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS and + * NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER). + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsWrapperCache__bindgen_ty_bindgen_id_71134 { + WRAPPER_BIT_PRESERVED = 1, } #[test] -fn bindgen_test_layout_nsISupports() { - assert_eq!(::std::mem::size_of::<nsISupports>() , 8usize); - assert_eq!(::std::mem::align_of::<nsISupports>() , 8usize); +fn bindgen_test_layout_nsWrapperCache() { + assert_eq!(::std::mem::size_of::<nsWrapperCache>() , 24usize); + assert_eq!(::std::mem::align_of::<nsWrapperCache>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsAutoOwningThread { - pub mThread: *mut ::std::os::raw::c_void, +pub struct AllOwningUnionBase { + pub _address: u8, } -impl ::std::clone::Clone for nsAutoOwningThread { +#[test] +fn bindgen_test_layout_AllOwningUnionBase() { + assert_eq!(::std::mem::size_of::<AllOwningUnionBase>() , 1usize); + assert_eq!(::std::mem::align_of::<AllOwningUnionBase>() , 1usize); +} +impl Clone for AllOwningUnionBase { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug)] +pub struct GlobalObject { + pub mGlobalJSObject: [u64; 3usize], + pub mCx: *mut JSContext, + pub mGlobalObject: *mut nsISupports, +} #[test] -fn bindgen_test_layout_nsAutoOwningThread() { - assert_eq!(::std::mem::size_of::<nsAutoOwningThread>() , 8usize); - assert_eq!(::std::mem::align_of::<nsAutoOwningThread>() , 8usize); +fn bindgen_test_layout_GlobalObject() { + assert_eq!(::std::mem::size_of::<GlobalObject>() , 40usize); + assert_eq!(::std::mem::align_of::<GlobalObject>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCycleCollectingAutoRefCnt { - pub mRefCntAndFlags: usize, -} -impl ::std::clone::Clone for nsCycleCollectingAutoRefCnt { - fn clone(&self) -> Self { *self } +pub struct nsScriptObjectTracer { + pub _base: nsCycleCollectionParticipant, } #[test] -fn bindgen_test_layout_nsCycleCollectingAutoRefCnt() { - assert_eq!(::std::mem::size_of::<nsCycleCollectingAutoRefCnt>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCycleCollectingAutoRefCnt>() , - 8usize); +fn bindgen_test_layout_nsScriptObjectTracer() { + assert_eq!(::std::mem::size_of::<nsScriptObjectTracer>() , 16usize); + assert_eq!(::std::mem::align_of::<nsScriptObjectTracer>() , 8usize); +} +impl Clone for nsScriptObjectTracer { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsAutoRefCnt { - pub mValue: nsrefcnt, +pub struct nsXPCOMCycleCollectionParticipant { + pub _base: nsScriptObjectTracer, } -impl ::std::clone::Clone for nsAutoRefCnt { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsXPCOMCycleCollectionParticipant_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsAutoRefCnt() { - assert_eq!(::std::mem::size_of::<nsAutoRefCnt>() , 8usize); - assert_eq!(::std::mem::align_of::<nsAutoRefCnt>() , 8usize); +fn bindgen_test_layout_nsXPCOMCycleCollectionParticipant() { + assert_eq!(::std::mem::size_of::<nsXPCOMCycleCollectionParticipant>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsXPCOMCycleCollectionParticipant>() , + 8usize); } -extern "C" { - #[link_name = "_ZN12nsAutoRefCnt12isThreadSafeE"] - pub static nsAutoRefCnt_consts_isThreadSafe: bool; +impl Clone for nsXPCOMCycleCollectionParticipant { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct ThreadSafeAutoRefCnt { - pub mValue: u64, -} -#[test] -fn bindgen_test_layout_ThreadSafeAutoRefCnt() { - assert_eq!(::std::mem::size_of::<ThreadSafeAutoRefCnt>() , 8usize); - assert_eq!(::std::mem::align_of::<ThreadSafeAutoRefCnt>() , 8usize); +#[derive(Debug, Copy, Clone)] +pub struct pair<_T1, _T2> { + pub first: _T1, + pub second: _T2, } -extern "C" { - #[link_name = "_ZN7mozilla20ThreadSafeAutoRefCnt12isThreadSafeE"] - pub static ThreadSafeAutoRefCnt_consts_isThreadSafe: bool; +pub type pair_first_type<_T1> = _T1; +pub type pair_second_type<_T2> = _T2; +#[repr(C)] +pub struct bindgen_vtable__bindgen_id_87955 { } /** - * There are two ways of implementing QueryInterface, and we use both: + * A class of objects that return source code on demand. * - * Table-driven QueryInterface uses a static table of IID->offset mappings - * and a shared helper function. Using it tends to reduce codesize and improve - * runtime performance (due to processor cache hits). - * - * Macro-driven QueryInterface generates a QueryInterface function directly - * using common macros. This is necessary if special QueryInterface features - * are being used (such as tearoffs and conditional interfaces). - * - * These methods can be combined into a table-driven function call followed - * by custom code for tearoffs and conditionals. + * 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_87955, +} +#[test] +fn bindgen_test_layout_SourceHook() { + assert_eq!(::std::mem::size_of::<SourceHook>() , 8usize); + assert_eq!(::std::mem::align_of::<SourceHook>() , 8usize); +} +#[repr(C)] #[derive(Debug, Copy)] -pub struct QITableEntry { - pub iid: *const nsIID, - pub offset: i32, +pub struct nsIPrincipal { + pub _base: nsISerializable, } -impl ::std::clone::Clone for QITableEntry { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIPrincipal_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPrincipal__bindgen_ty_bindgen_id_93396 { + APP_STATUS_NOT_INSTALLED = 0, + APP_STATUS_INSTALLED = 1, + APP_STATUS_PRIVILEGED = 2, + APP_STATUS_CERTIFIED = 3, } #[test] -fn bindgen_test_layout_QITableEntry() { - assert_eq!(::std::mem::size_of::<QITableEntry>() , 16usize); - assert_eq!(::std::mem::align_of::<QITableEntry>() , 8usize); +fn bindgen_test_layout_nsIPrincipal() { + assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize); +} +impl Clone for nsIPrincipal { + fn clone(&self) -> Self { *self } } -pub enum TileClient { } -pub enum SerializedStructuredCloneBuffer { } -pub enum StructuredCloneData { } -pub enum ClonedMessageData { } -pub enum MessagePortMessage { } -pub enum StructuredCloneReadInfo { } -pub enum SerializedStructuredCloneReadInfo { } -pub enum ObjectStoreCursorResponse { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayFallibleResult { - pub mResult: bool, +pub struct nsISerializable { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsISerializable_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } -impl ::std::clone::Clone for nsTArrayFallibleResult { +#[test] +fn bindgen_test_layout_nsISerializable() { + assert_eq!(::std::mem::size_of::<nsISerializable>() , 8usize); + assert_eq!(::std::mem::align_of::<nsISerializable>() , 8usize); +} +impl Clone for nsISerializable { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug)] +pub struct nsIGlobalObject { + pub _base: nsISupports, + pub mHostObjectURIs: nsTArray<nsCString>, + pub mIsDying: bool, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIGlobalObject_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} #[test] -fn bindgen_test_layout_nsTArrayFallibleResult() { - assert_eq!(::std::mem::size_of::<nsTArrayFallibleResult>() , 1usize); - assert_eq!(::std::mem::align_of::<nsTArrayFallibleResult>() , 1usize); +fn bindgen_test_layout_nsIGlobalObject() { + assert_eq!(::std::mem::size_of::<nsIGlobalObject>() , 24usize); + assert_eq!(::std::mem::align_of::<nsIGlobalObject>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayInfallibleResult; -impl ::std::clone::Clone for nsTArrayInfallibleResult { - fn clone(&self) -> Self { *self } +pub struct nsIURI { + pub _base: nsISupports, } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsTArrayFallibleAllocatorBase; -impl ::std::clone::Clone for nsTArrayFallibleAllocatorBase { +#[derive(Debug, Copy, Clone)] +pub struct nsIURI_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIURI() { + assert_eq!(::std::mem::size_of::<nsIURI>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIURI>() , 8usize); +} +impl Clone for nsIURI { fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsTArrayInfallibleAllocatorBase; -impl ::std::clone::Clone for nsTArrayInfallibleAllocatorBase { - fn clone(&self) -> Self { *self } +#[derive(Debug)] +pub struct nsPIDOMWindowInner { + pub _base: [u64; 27usize], } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsTArrayFallibleAllocator { - pub _base: nsTArrayFallibleAllocatorBase, +#[derive(Debug, Copy, Clone)] +pub struct nsPIDOMWindowInner_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } -impl ::std::clone::Clone for nsTArrayFallibleAllocator { - fn clone(&self) -> Self { *self } +#[test] +fn bindgen_test_layout_nsPIDOMWindowInner() { + assert_eq!(::std::mem::size_of::<nsPIDOMWindowInner>() , 216usize); + assert_eq!(::std::mem::align_of::<nsPIDOMWindowInner>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsIDocument { + pub _base: nsINode, + pub mDeprecationWarnedAbout: u64, + pub mDocWarningWarnedAbout: u64, + pub mSelectorCache: [u64; 15usize], + pub mReferrer: nsCString, + pub mLastModified: nsString, + pub mDocumentURI: nsCOMPtr<nsIURI>, + pub mOriginalURI: nsCOMPtr<nsIURI>, + pub mChromeXHRDocURI: nsCOMPtr<nsIURI>, + pub mDocumentBaseURI: nsCOMPtr<nsIURI>, + pub mChromeXHRDocBaseURI: nsCOMPtr<nsIURI>, + pub mDocumentLoadGroup: nsWeakPtr, + pub mReferrerPolicySet: bool, + pub mReferrerPolicy: nsIDocument_ReferrerPolicyEnum, + pub mBlockAllMixedContent: bool, + pub mBlockAllMixedContentPreloads: bool, + pub mUpgradeInsecureRequests: bool, + pub mUpgradeInsecurePreloads: bool, + pub mDocumentContainer: u64, + pub mCharacterSet: nsCString, + pub mCharacterSetSource: i32, + pub mParentDocument: *mut nsIDocument, + pub mCachedRootElement: *mut Element, + pub mNodeInfoManager: *mut nsNodeInfoManager, + pub mCSSLoader: RefPtr<Loader>, + pub mStyleImageLoader: RefPtr<ImageLoader>, + pub mAttrStyleSheet: RefPtr<nsHTMLStyleSheet>, + pub mStyleAttrStyleSheet: RefPtr<nsHTMLCSSStyleSheet>, + pub mSVGAttrAnimationRuleProcessor: RefPtr<SVGAttrAnimationRuleProcessor>, + pub mActivityObservers: nsAutoPtr<()>, + pub mLinksToUpdate: [u64; 5usize], + pub mAnimationController: RefPtr<nsSMILAnimationController>, + pub mPropertyTable: nsPropertyTable, + pub mExtraPropertyTables: nsTArray<nsAutoPtr<nsPropertyTable>>, + pub mChildrenCollection: nsCOMPtr<nsIHTMLCollection>, + pub mFontFaceSet: RefPtr<FontFaceSet>, + pub mCompatMode: nsCompatibility, + pub mReadyState: nsIDocument_ReadyState, + pub mVisibilityState: VisibilityState, + pub mStyleBackendType: StyleBackendType, + pub _bitfield_1: u64, + pub mType: nsIDocument_Type, + pub mDefaultElementType: u8, + pub mAllowXULXBL: nsIDocument_Tri, + pub mScriptGlobalObject: nsCOMPtr<nsIScriptGlobalObject>, + pub mOriginalDocument: nsCOMPtr<nsIDocument>, + pub mBidiOptions: u32, + pub mSandboxFlags: u32, + pub mContentLanguage: nsCString, + pub mChannel: nsCOMPtr<nsIChannel>, + pub mContentType: nsCString, + pub mId: nsString, + pub mSecurityInfo: nsCOMPtr<nsISupports>, + pub mFailedChannel: nsCOMPtr<nsIChannel>, + pub mPartID: u32, + pub mMarkedCCGeneration: u32, + pub mPresShell: *mut nsIPresShell, + pub mSubtreeModifiedTargets: nsCOMArray<nsINode>, + pub mSubtreeModifiedDepth: u32, + pub mDisplayDocument: nsCOMPtr<nsIDocument>, + pub mEventsSuppressed: u32, + pub mAnimationsPaused: u32, + /** + * The number number of external scripts (ones with the src attribute) that + * have this document as their owner and that are being evaluated right now. + */ + pub mExternalScriptsBeingEvaluated: u32, + /** + * The current frame request callback handle + */ + pub mFrameRequestCallbackCounter: i32, + pub mStaticCloneCount: u32, + pub mBlockedTrackingNodes: nsTArray<nsCOMPtr<nsIWeakReference>>, + pub mWindow: *mut nsPIDOMWindowInner, + pub mCachedEncoder: nsCOMPtr<nsIDocumentEncoder>, + pub mFrameRequestCallbacks: nsTArray<nsIDocument_FrameRequest>, + pub mBFCacheEntry: *mut nsIBFCacheEntry, + pub mBaseTarget: nsString, + pub mStateObjectContainer: nsCOMPtr<nsIStructuredCloneContainer>, + pub mStateObjectCached: nsCOMPtr<nsIVariant>, + pub mInSyncOperationCount: u32, + pub mXPathEvaluator: RefPtr<XPathEvaluator>, + pub mAnonymousContents: nsTArray<RefPtr<AnonymousContent>>, + pub mBlockDOMContentLoaded: u32, + pub _bitfield_2: u8, + pub mDOMMediaQueryLists: PRCList, + pub mUseCounters: [u64; 2usize], + pub mChildDocumentUseCounters: [u64; 2usize], + pub mNotifiedPageForUseCounter: [u64; 2usize], + pub mUserHasInteracted: bool, +} +pub type nsIDocument_GlobalObject = GlobalObject; +pub type nsIDocument_ReferrerPolicyEnum = ReferrerPolicy; +pub type nsIDocument_Element = Element; +pub type nsIDocument_FullscreenRequest = FullscreenRequest; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIDocument_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +/** + * This gets fired when the element that an id refers to changes. + * This fires at difficult times. It is generally not safe to do anything + * which could modify the DOM in any way. Use + * nsContentUtils::AddScriptRunner. + * @return true to keep the callback in the callback set, false + * to remove it. + */ +pub type nsIDocument_IDTargetObserver = + ::std::option::Option<unsafe extern "C" fn(aOldElement: + *mut nsIDocument_Element, + aNewelement: + *mut nsIDocument_Element, + aData: + *mut ::std::os::raw::c_void) + -> bool>; +#[repr(C)] +#[derive(Debug)] +pub struct nsIDocument_SelectorCacheKey { + pub mKey: nsString, + pub mState: nsExpirationState, +} +#[test] +fn bindgen_test_layout_nsIDocument_SelectorCacheKey() { + assert_eq!(::std::mem::size_of::<nsIDocument_SelectorCacheKey>() , + 24usize); + assert_eq!(::std::mem::align_of::<nsIDocument_SelectorCacheKey>() , + 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayInfallibleAllocator { - pub _base: nsTArrayInfallibleAllocatorBase, +pub struct nsIDocument_SelectorCacheKeyDeleter { + pub _address: u8, } -impl ::std::clone::Clone for nsTArrayInfallibleAllocator { +impl Clone for nsIDocument_SelectorCacheKeyDeleter { fn clone(&self) -> Self { *self } } #[repr(C)] +#[derive(Debug)] +pub struct nsIDocument_SelectorCache { + pub _bindgen_opaque_blob: [u64; 15usize], +} +#[test] +fn bindgen_test_layout_nsIDocument_SelectorCache() { + assert_eq!(::std::mem::size_of::<nsIDocument_SelectorCache>() , 120usize); + assert_eq!(::std::mem::align_of::<nsIDocument_SelectorCache>() , 8usize); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_additionalSheetType { + eAgentSheet = 0, + eUserSheet = 1, + eAuthorSheet = 2, + AdditionalSheetTypeCount = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_ReadyState { + READYSTATE_UNINITIALIZED = 0, + READYSTATE_LOADING = 1, + READYSTATE_INTERACTIVE = 3, + READYSTATE_COMPLETE = 4, +} +/** + * Enumerate all subdocuments. + * The enumerator callback should return true to continue enumerating, or + * false to stop. This will never get passed a null aDocument. + */ +pub type nsIDocument_nsSubDocEnumFunc = + ::std::option::Option<unsafe extern "C" fn(aDocument: *mut nsIDocument, + aData: + *mut ::std::os::raw::c_void) + -> bool>; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_ElementsFromPointFlags { + IGNORE_ROOT_SCROLL_FRAME = 1, + FLUSH_LAYOUT = 2, + IS_ELEMENT_FROM_POINT = 4, +} +/** + * A class that represents an external resource load that has begun but + * doesn't have a document yet. Observers can be registered on this object, + * and will be notified after the document is created. Observers registered + * after the document has been created will NOT be notified. When observers + * are notified, the subject will be the newly-created document, the topic + * will be "external-resource-document-created", and the data will be null. + * If document creation fails for some reason, observers will still be + * notified, with a null document pointer. + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsIDocument_ExternalResourceLoad { + pub _base: nsISupports, + pub mObservers: [u64; 10usize], +} +#[test] +fn bindgen_test_layout_nsIDocument_ExternalResourceLoad() { + assert_eq!(::std::mem::size_of::<nsIDocument_ExternalResourceLoad>() , + 88usize); + assert_eq!(::std::mem::align_of::<nsIDocument_ExternalResourceLoad>() , + 8usize); +} +pub type nsIDocument_ActivityObserverEnumerator = + ::std::option::Option<unsafe extern "C" fn(arg1: *mut nsISupports, + arg2: + *mut ::std::os::raw::c_void)>; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_SuppressionType { eAnimationsOnly = 1, eEvents = 3, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_DocumentTheme { + Doc_Theme_Uninitialized = 0, + Doc_Theme_None = 1, + Doc_Theme_Neutral = 2, + Doc_Theme_Dark = 3, + Doc_Theme_Bright = 4, +} +pub type nsIDocument_FrameRequestCallbackList = + nsTArray<RefPtr<FrameRequestCallback>>; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument__bindgen_ty_bindgen_id_102082 { REQUEST_DISCARD = 1, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_DeprecatedOperations { + eGetAttributeNode = 0, + eSetAttributeNode = 1, + eGetAttributeNodeNS = 2, + eSetAttributeNodeNS = 3, + eRemoveAttributeNode = 4, + eCreateAttribute = 5, + eCreateAttributeNS = 6, + eNodeValue = 7, + eTextContent = 8, + eEnablePrivilege = 9, + eDOMExceptionCode = 10, + eNoExposedProps = 11, + eMutationEvent = 12, + eComponents = 13, + ePrefixedVisibilityAPI = 14, + eNodeIteratorDetach = 15, + eLenientThis = 16, + eGetPreventDefault = 17, + eGetSetUserData = 18, + eMozGetAsFile = 19, + eUseOfCaptureEvents = 20, + eUseOfReleaseEvents = 21, + eUseOfDOM3LoadMethod = 22, + eShowModalDialog = 23, + eWindow_Content = 24, + eSyncXMLHttpRequest = 25, + eDataContainerEvent = 26, + eWindow_Controllers = 27, + eImportXULIntoContent = 28, + ePannerNodeDoppler = 29, + eNavigatorGetUserMedia = 30, + eWebrtcDeprecatedPrefix = 31, + eRTCPeerConnectionGetStreams = 32, + eAppCache = 33, + ePrefixedImageSmoothingEnabled = 34, + ePrefixedFullscreenAPI = 35, + eLenientSetter = 36, + eFileLastModifiedDate = 37, + eDeprecatedOperationCount = 38, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_DocumentWarnings { + eIgnoringWillChangeOverBudget = 0, + ePreventDefaultFromPassiveListener = 1, + eDocumentWarningCount = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_ElementCallbackType { + eCreated = 0, + eAttached = 1, + eDetached = 2, + eAttributeChanged = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_Type { + eUnknown = 0, + eHTML = 1, + eXHTML = 2, + eGenericXML = 3, + eSVG = 4, + eXUL = 5, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDocument_Tri { eTriUnset = 0, eTriFalse = 1, eTriTrue = 2, } +#[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArrayHeader { - pub mLength: u32, - pub _bitfield_1: u32, +pub struct nsIDocument_FrameRequest { + pub _address: u8, } -impl nsTArrayHeader { +impl Clone for nsIDocument_FrameRequest { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_nsIDocument() { + assert_eq!(::std::mem::size_of::<nsIDocument>() , 896usize); + assert_eq!(::std::mem::align_of::<nsIDocument>() , 8usize); +} +impl nsIDocument { #[inline] - pub fn mCapacity(&self) -> u32 { - (self._bitfield_1 & (2147483647usize as u32)) >> 0usize + pub fn mBidiEnabled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u64)) >> + 0u32) as u8) + } } #[inline] - pub fn set_mCapacity(&mut self, val: u32) { - self._bitfield_1 &= !(2147483647usize as u32); + pub fn set_mBidiEnabled(&mut self, val: bool) { + self._bitfield_1 &= !(1usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 0u32) & (1usize as u64); + } + #[inline] + pub fn mMathMLEnabled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u64)) >> + 1u32) as u8) + } + } + #[inline] + pub fn set_mMathMLEnabled(&mut self, val: bool) { + self._bitfield_1 &= !(2usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 1u32) & (2usize as u64); + } + #[inline] + pub fn mIsInitialDocumentInWindow(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4usize as u64)) >> + 2u32) as u8) + } + } + #[inline] + pub fn set_mIsInitialDocumentInWindow(&mut self, val: bool) { + self._bitfield_1 &= !(4usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 2u32) & (4usize as u64); + } + #[inline] + pub fn mLoadedAsData(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8usize as u64)) >> + 3u32) as u8) + } + } + #[inline] + pub fn set_mLoadedAsData(&mut self, val: bool) { + self._bitfield_1 &= !(8usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 3u32) & (8usize as u64); + } + #[inline] + pub fn mLoadedAsInteractiveData(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16usize as u64)) >> + 4u32) as u8) + } + } + #[inline] + pub fn set_mLoadedAsInteractiveData(&mut self, val: bool) { + self._bitfield_1 &= !(16usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 4u32) & (16usize as u64); + } + #[inline] + pub fn mMayStartLayout(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32usize as u64)) >> + 5u32) as u8) + } + } + #[inline] + pub fn set_mMayStartLayout(&mut self, val: bool) { + self._bitfield_1 &= !(32usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 5u32) & (32usize as u64); + } + #[inline] + pub fn mHaveFiredTitleChange(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (64usize as u64)) >> + 6u32) as u8) + } + } + #[inline] + pub fn set_mHaveFiredTitleChange(&mut self, val: bool) { + self._bitfield_1 &= !(64usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 6u32) & (64usize as u64); + } + #[inline] + pub fn mIsShowing(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (128usize as u64)) >> + 7u32) as u8) + } + } + #[inline] + pub fn set_mIsShowing(&mut self, val: bool) { + self._bitfield_1 &= !(128usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 7u32) & (128usize as u64); + } + #[inline] + pub fn mVisible(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (256usize as u64)) >> + 8u32) as u8) + } + } + #[inline] + pub fn set_mVisible(&mut self, val: bool) { + self._bitfield_1 &= !(256usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 8u32) & (256usize as u64); + } + #[inline] + pub fn mRemovedFromDocShell(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (512usize as u64)) >> + 9u32) as u8) + } + } + #[inline] + pub fn set_mRemovedFromDocShell(&mut self, val: bool) { + self._bitfield_1 &= !(512usize as u64); + self._bitfield_1 |= ((val as u8 as u64) << 9u32) & (512usize as u64); + } + #[inline] + pub fn mAllowDNSPrefetch(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1024usize as u64)) >> + 10u32) as u8) + } + } + #[inline] + pub fn set_mAllowDNSPrefetch(&mut self, val: bool) { + self._bitfield_1 &= !(1024usize as u64); self._bitfield_1 |= - ((val as u32) << 0usize) & (2147483647usize as u32); + ((val as u8 as u64) << 10u32) & (1024usize as u64); } #[inline] - pub fn mIsAutoArray(&self) -> u32 { - (self._bitfield_1 & (2147483648usize as u32)) >> 31usize + pub fn mIsStaticDocument(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2048usize as u64)) >> + 11u32) as u8) + } } #[inline] - pub fn set_mIsAutoArray(&mut self, val: bool) { - self._bitfield_1 &= !(2147483648usize as u32); + pub fn set_mIsStaticDocument(&mut self, val: bool) { + self._bitfield_1 &= !(2048usize as u64); self._bitfield_1 |= - ((val as u32) << 31usize) & (2147483648usize as u32); + ((val as u8 as u64) << 11u32) & (2048usize as u64); } #[inline] - pub fn new_bitfield_1(mCapacity: u32, mIsAutoArray: bool) -> u32 { - 0 | ((mCapacity as u32) << 0u32) | ((mIsAutoArray as u32) << 31u32) + pub fn mCreatingStaticClone(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4096usize as u64)) >> + 12u32) as u8) + } + } + #[inline] + pub fn set_mCreatingStaticClone(&mut self, val: bool) { + self._bitfield_1 &= !(4096usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 12u32) & (4096usize as u64); + } + #[inline] + pub fn mInUnlinkOrDeletion(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8192usize as u64)) >> + 13u32) as u8) + } + } + #[inline] + pub fn set_mInUnlinkOrDeletion(&mut self, val: bool) { + self._bitfield_1 &= !(8192usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 13u32) & (8192usize as u64); + } + #[inline] + pub fn mHasHadScriptHandlingObject(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16384usize as u64)) >> + 14u32) as u8) + } + } + #[inline] + pub fn set_mHasHadScriptHandlingObject(&mut self, val: bool) { + self._bitfield_1 &= !(16384usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 14u32) & (16384usize as u64); + } + #[inline] + pub fn mIsBeingUsedAsImage(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32768usize as u64)) >> + 15u32) as u8) + } + } + #[inline] + pub fn set_mIsBeingUsedAsImage(&mut self, val: bool) { + self._bitfield_1 &= !(32768usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 15u32) & (32768usize as u64); + } + #[inline] + pub fn mIsSyntheticDocument(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (65536usize as u64)) >> + 16u32) as u8) + } + } + #[inline] + pub fn set_mIsSyntheticDocument(&mut self, val: bool) { + self._bitfield_1 &= !(65536usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 16u32) & (65536usize as u64); + } + #[inline] + pub fn mHasLinksToUpdate(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (131072usize as u64)) + >> 17u32) as u8) + } + } + #[inline] + pub fn set_mHasLinksToUpdate(&mut self, val: bool) { + self._bitfield_1 &= !(131072usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 17u32) & (131072usize as u64); + } + #[inline] + pub fn mNeedLayoutFlush(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (262144usize as u64)) + >> 18u32) as u8) + } + } + #[inline] + pub fn set_mNeedLayoutFlush(&mut self, val: bool) { + self._bitfield_1 &= !(262144usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 18u32) & (262144usize as u64); + } + #[inline] + pub fn mNeedStyleFlush(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (524288usize as u64)) + >> 19u32) as u8) + } + } + #[inline] + pub fn set_mNeedStyleFlush(&mut self, val: bool) { + self._bitfield_1 &= !(524288usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 19u32) & (524288usize as u64); + } + #[inline] + pub fn mMayHaveDOMMutationObservers(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1048576usize as u64)) + >> 20u32) as u8) + } + } + #[inline] + pub fn set_mMayHaveDOMMutationObservers(&mut self, val: bool) { + self._bitfield_1 &= !(1048576usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 20u32) & (1048576usize as u64); + } + #[inline] + pub fn mMayHaveAnimationObservers(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2097152usize as u64)) + >> 21u32) as u8) + } + } + #[inline] + pub fn set_mMayHaveAnimationObservers(&mut self, val: bool) { + self._bitfield_1 &= !(2097152usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 21u32) & (2097152usize as u64); + } + #[inline] + pub fn mHasMixedActiveContentLoaded(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4194304usize as u64)) + >> 22u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedActiveContentLoaded(&mut self, val: bool) { + self._bitfield_1 &= !(4194304usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 22u32) & (4194304usize as u64); + } + #[inline] + pub fn mHasMixedActiveContentBlocked(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8388608usize as u64)) + >> 23u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedActiveContentBlocked(&mut self, val: bool) { + self._bitfield_1 &= !(8388608usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 23u32) & (8388608usize as u64); + } + #[inline] + pub fn mHasMixedDisplayContentLoaded(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16777216usize as u64)) + >> 24u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedDisplayContentLoaded(&mut self, val: bool) { + self._bitfield_1 &= !(16777216usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 24u32) & (16777216usize as u64); + } + #[inline] + pub fn mHasMixedDisplayContentBlocked(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (33554432usize as u64)) + >> 25u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedDisplayContentBlocked(&mut self, val: bool) { + self._bitfield_1 &= !(33554432usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 25u32) & (33554432usize as u64); + } + #[inline] + pub fn mHasMixedContentObjectSubrequest(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (67108864usize as u64)) + >> 26u32) as u8) + } + } + #[inline] + pub fn set_mHasMixedContentObjectSubrequest(&mut self, val: bool) { + self._bitfield_1 &= !(67108864usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 26u32) & (67108864usize as u64); + } + #[inline] + pub fn mHasCSP(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (134217728usize as u64)) >> 27u32) as + u8) + } + } + #[inline] + pub fn set_mHasCSP(&mut self, val: bool) { + self._bitfield_1 &= !(134217728usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 27u32) & (134217728usize as u64); + } + #[inline] + pub fn mHasUnsafeEvalCSP(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (268435456usize as u64)) >> 28u32) as + u8) + } + } + #[inline] + pub fn set_mHasUnsafeEvalCSP(&mut self, val: bool) { + self._bitfield_1 &= !(268435456usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 28u32) & (268435456usize as u64); + } + #[inline] + pub fn mHasUnsafeInlineCSP(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (536870912usize as u64)) >> 29u32) as + u8) + } + } + #[inline] + pub fn set_mHasUnsafeInlineCSP(&mut self, val: bool) { + self._bitfield_1 &= !(536870912usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 29u32) & (536870912usize as u64); + } + #[inline] + pub fn mHasTrackingContentBlocked(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (1073741824usize as u64)) >> 30u32) as + u8) + } + } + #[inline] + pub fn set_mHasTrackingContentBlocked(&mut self, val: bool) { + self._bitfield_1 &= !(1073741824usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 30u32) & (1073741824usize as u64); + } + #[inline] + pub fn mHasTrackingContentLoaded(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483648usize as u64)) >> 31u32) as + u8) + } + } + #[inline] + pub fn set_mHasTrackingContentLoaded(&mut self, val: bool) { + self._bitfield_1 &= !(2147483648usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 31u32) & (2147483648usize as u64); + } + #[inline] + pub fn mBFCacheDisallowed(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4294967296usize as u64)) >> 32u32) as + u8) + } + } + #[inline] + pub fn set_mBFCacheDisallowed(&mut self, val: bool) { + self._bitfield_1 &= !(4294967296usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 32u32) & (4294967296usize as u64); + } + #[inline] + pub fn mHasHadDefaultView(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (8589934592usize as u64)) >> 33u32) as + u8) + } + } + #[inline] + pub fn set_mHasHadDefaultView(&mut self, val: bool) { + self._bitfield_1 &= !(8589934592usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 33u32) & (8589934592usize as u64); + } + #[inline] + pub fn mStyleSheetChangeEventsEnabled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (17179869184usize as u64)) >> 34u32) + as u8) + } + } + #[inline] + pub fn set_mStyleSheetChangeEventsEnabled(&mut self, val: bool) { + self._bitfield_1 &= !(17179869184usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 34u32) & (17179869184usize as u64); + } + #[inline] + pub fn mIsSrcdocDocument(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (34359738368usize as u64)) >> 35u32) + as u8) + } + } + #[inline] + pub fn set_mIsSrcdocDocument(&mut self, val: bool) { + self._bitfield_1 &= !(34359738368usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 35u32) & (34359738368usize as u64); + } + #[inline] + pub fn mDidDocumentOpen(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (68719476736usize as u64)) >> 36u32) + as u8) + } + } + #[inline] + pub fn set_mDidDocumentOpen(&mut self, val: bool) { + self._bitfield_1 &= !(68719476736usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 36u32) & (68719476736usize as u64); + } + #[inline] + pub fn mHasDisplayDocument(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (137438953472usize as u64)) >> 37u32) + as u8) + } + } + #[inline] + pub fn set_mHasDisplayDocument(&mut self, val: bool) { + self._bitfield_1 &= !(137438953472usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 37u32) & (137438953472usize as u64); + } + #[inline] + pub fn mFontFaceSetDirty(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (274877906944usize as u64)) >> 38u32) + as u8) + } + } + #[inline] + pub fn set_mFontFaceSetDirty(&mut self, val: bool) { + self._bitfield_1 &= !(274877906944usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 38u32) & (274877906944usize as u64); + } + #[inline] + pub fn mGetUserFontSetCalled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (549755813888usize as u64)) >> 39u32) + as u8) + } + } + #[inline] + pub fn set_mGetUserFontSetCalled(&mut self, val: bool) { + self._bitfield_1 &= !(549755813888usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 39u32) & (549755813888usize as u64); + } + #[inline] + pub fn mPostedFlushUserFontSet(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (1099511627776usize as u64)) >> 40u32) + as u8) + } + } + #[inline] + pub fn set_mPostedFlushUserFontSet(&mut self, val: bool) { + self._bitfield_1 &= !(1099511627776usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 40u32) & (1099511627776usize as u64); + } + #[inline] + pub fn mEverInForeground(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2199023255552usize as u64)) >> 41u32) + as u8) + } + } + #[inline] + pub fn set_mEverInForeground(&mut self, val: bool) { + self._bitfield_1 &= !(2199023255552usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 41u32) & (2199023255552usize as u64); + } + #[inline] + pub fn mMayHavePluginFramesForPrinting(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4398046511104usize as u64)) >> 42u32) + as u8) + } + } + #[inline] + pub fn set_mMayHavePluginFramesForPrinting(&mut self, val: bool) { + self._bitfield_1 &= !(4398046511104usize as u64); + self._bitfield_1 |= + ((val as u8 as u64) << 42u32) & (4398046511104usize as u64); + } + #[inline] + pub fn mDidFireDOMContentLoaded(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_2 & (1usize as u8)) >> + 0u32) as u8) + } + } + #[inline] + pub fn set_mDidFireDOMContentLoaded(&mut self, val: bool) { + self._bitfield_2 &= !(1usize as u8); + self._bitfield_2 |= ((val as u8 as u8) << 0u32) & (1usize as u8); + } + #[inline] + pub fn mHasScrollLinkedEffect(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_2 & (2usize as u8)) >> + 1u32) as u8) + } + } + #[inline] + pub fn set_mHasScrollLinkedEffect(&mut self, val: bool) { + self._bitfield_2 &= !(2usize as u8); + self._bitfield_2 |= ((val as u8 as u8) << 1u32) & (2usize as u8); } } -impl ::std::clone::Clone for nsTArrayHeader { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_nsTArrayHeader() { - assert_eq!(::std::mem::size_of::<nsTArrayHeader>() , 8usize); - assert_eq!(::std::mem::align_of::<nsTArrayHeader>() , 4usize); -} -extern "C" { - #[link_name = "_ZN14nsTArrayHeader9sEmptyHdrE"] - pub static mut nsTArrayHeader_consts_sEmptyHdr: nsTArrayHeader; -} +/** + * An internal interface that abstracts some DOMNode-related parts that both + * nsIContent and nsIDocument share. An instance of this interface has a list + * of nsIContent children and provides access to them. + */ #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsTArray_SafeElementAtHelper<E, Derived> { - pub _phantom0: ::std::marker::PhantomData<E>, - pub _phantom1: ::std::marker::PhantomData<Derived>, -} +#[derive(Debug)] +pub struct nsINode { + pub _base: EventTarget, + pub mNodeInfo: RefPtr<NodeInfo>, + pub mParent: *mut nsINode, + pub mBoolFlags: u32, + pub mNextSibling: *mut nsIContent, + pub mPreviousSibling: *mut nsIContent, + pub mFirstChild: *mut nsIContent, + pub __bindgen_anon_1: nsINode__bindgen_ty_bindgen_id_98796, + pub mSlots: *mut nsINode_nsSlots, + pub mServoNodeData: UniquePtr<ServoNodeData, + DefaultDelete<ServoNodeData>>, +} +pub type nsINode_BoxQuadOptions = BoxQuadOptions; +pub type nsINode_ConvertCoordinateOptions = ConvertCoordinateOptions; +pub type nsINode_DOMPoint = DOMPoint; +pub type nsINode_DOMPointInit = DOMPointInit; +pub type nsINode_DOMQuad = DOMQuad; +pub type nsINode_DOMRectReadOnly = DOMRectReadOnly; +pub type nsINode_OwningNodeOrString = OwningNodeOrString; +pub type nsINode_TextOrElementOrDocument = TextOrElementOrDocument; +pub type nsINode_ErrorResult = ErrorResult; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsTArray_SafeElementAtSmartPtrHelper<E, Derived> { - pub _phantom0: ::std::marker::PhantomData<E>, - pub _phantom1: ::std::marker::PhantomData<Derived>, +pub struct nsINode_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +/** + * Bit-flags to pass (or'ed together) to IsNodeOfType() + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsINode__bindgen_ty_bindgen_id_94940 { + eCONTENT = 1, + eDOCUMENT = 2, + eATTRIBUTE = 4, + eTEXT = 8, + ePROCESSING_INSTRUCTION = 16, + eCOMMENT = 32, + eHTML_FORM_CONTROL = 64, + eDOCUMENT_FRAGMENT = 128, + eDATA_NODE = 256, + eMEDIA = 512, + eANIMATION = 1024, + eFILTER = 2048, } #[repr(C)] -#[derive(Debug)] -pub struct nsTArray_base<Alloc, Copy> { - pub mHdr: *mut nsTArrayHeader, - pub _phantom0: ::std::marker::PhantomData<Alloc>, - pub _phantom1: ::std::marker::PhantomData<Copy>, +pub struct bindgen_vtable__bindgen_id_95709 { } #[repr(C)] #[derive(Debug)] -pub struct nsTArray_base_IsAutoArrayRestorer<Alloc, Copy> { - pub mArray: *mut nsTArray_base<Alloc, Copy>, - pub mElemAlign: usize, - pub mIsAuto: bool, - pub _phantom0: ::std::marker::PhantomData<Copy>, +pub struct nsINode_nsSlots { + pub vtable_: *const bindgen_vtable__bindgen_id_95709, + /** + * A list of mutation observers + */ + pub mMutationObservers: [u64; 2usize], + /** + * An object implementing nsIDOMNodeList for this content (childNodes) + * @see nsIDOMNodeList + * @see nsGenericHTMLElement::GetChildNodes + */ + pub mChildNodes: RefPtr<nsChildContentList>, + /** + * Weak reference to this node. This is cleared by the destructor of + * nsNodeWeakReference. + */ + pub mWeakReference: *mut nsNodeWeakReference, + /** + * Number of descendant nodes in the uncomposed document that have been + * explicitly set as editable. + */ + pub mEditableDescendantCount: u32, } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsDefaultComparator<A, B> { - pub _phantom0: ::std::marker::PhantomData<A>, - pub _phantom1: ::std::marker::PhantomData<B>, +#[test] +fn bindgen_test_layout_nsINode_nsSlots() { + assert_eq!(::std::mem::size_of::<nsINode_nsSlots>() , 48usize); + assert_eq!(::std::mem::align_of::<nsINode_nsSlots>() , 8usize); +} +#[repr(u32)] +/** + * Boolean flags + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsINode_BooleanFlag { + NodeHasRenderingObservers = 0, + IsInDocument = 1, + ParentIsContent = 2, + NodeIsElement = 3, + ElementHasID = 4, + ElementMayHaveStyle = 5, + ElementHasName = 6, + ElementMayHaveContentEditableAttr = 7, + NodeIsCommonAncestorForRangeInSelection = 8, + NodeIsDescendantOfCommonAncestorForRangeInSelection = 9, + NodeIsCCMarkedRoot = 10, + NodeIsCCBlackTree = 11, + NodeIsPurpleRoot = 12, + NodeHasExplicitBaseURI = 13, + ElementHasLockedStyleStates = 14, + ElementHasPointerLock = 15, + NodeMayHaveDOMMutationObserver = 16, + NodeIsContent = 17, + ElementHasAnimations = 18, + NodeHasValidDirAttribute = 19, + NodeHasFixedDir = 20, + NodeHasDirAutoSet = 21, + NodeHasTextNodeDirectionalityMap = 22, + NodeHasDirAuto = 23, + NodeAncestorHasDirAuto = 24, + ElementIsInStyleScope = 25, + ElementIsScopedStyleRoot = 26, + NodeHandlingClick = 27, + NodeHasRelevantHoverRules = 28, + ElementHasWeirdParserInsertionMode = 29, + ParserHasNotified = 30, + MayBeApzAware = 31, + BooleanFlagCount = 32, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTArray_CopyWithMemutils; -impl ::std::clone::Clone for nsTArray_CopyWithMemutils { +pub struct nsINode__bindgen_ty_bindgen_id_98796 { + 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::<nsINode__bindgen_ty_bindgen_id_98796>() , + 8usize); + assert_eq!(::std::mem::align_of::<nsINode__bindgen_ty_bindgen_id_98796>() + , 8usize); +} +impl Clone for nsINode__bindgen_ty_bindgen_id_98796 { fn clone(&self) -> Self { *self } } -extern "C" { - #[link_name = "_ZN25nsTArray_CopyWithMemutils12allowReallocE"] - pub static nsTArray_CopyWithMemutils_consts_allowRealloc: bool; +#[test] +fn bindgen_test_layout_nsINode() { + assert_eq!(::std::mem::size_of::<nsINode>() , 104usize); + assert_eq!(::std::mem::align_of::<nsINode>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsTArray_CopyWithConstructors<ElemType> { - pub _phantom0: ::std::marker::PhantomData<ElemType>, +#[derive(Debug)] +pub struct EventTarget { + pub _base: nsIDOMEventTarget, + pub _base_1: nsWrapperCache, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsTArray_CopyChooser<E> { - pub _phantom0: ::std::marker::PhantomData<E>, +pub struct EventTarget_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nsTArray_TypedBase<E, Derived> { - pub _base: nsTArray_SafeElementAtHelper<E, Derived>, - pub _phantom0: ::std::marker::PhantomData<Derived>, +#[test] +fn bindgen_test_layout_EventTarget() { + assert_eq!(::std::mem::size_of::<EventTarget>() , 32usize); + assert_eq!(::std::mem::align_of::<EventTarget>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ItemComparatorEq<Item, Comparator> { - pub mItem: *const Item, - pub mComp: *const Comparator, +#[derive(Debug, Copy)] +pub struct nsIDOMEventTarget { + pub _base: nsISupports, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct ItemComparatorFirstElementGT<Item, Comparator> { - pub mItem: *const Item, - pub mComp: *const Comparator, +pub struct nsIDOMEventTarget_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIDOMEventTarget() { + assert_eq!(::std::mem::size_of::<nsIDOMEventTarget>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMEventTarget>() , 8usize); +} +impl Clone for nsIDOMEventTarget { + fn clone(&self) -> Self { *self } } /** - * <div rustbindgen replaces="nsTArray"></div> + * Smart pointer class that can hold a pointer to either an nsStyleSet + * or a ServoStyleSet. */ #[repr(C)] -#[derive(Debug)] -pub struct nsTArray<T> { - pub mBuffer: *mut T, +#[derive(Debug, Copy)] +pub struct StyleSetHandle { + pub mPtr: StyleSetHandle_Ptr, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCOMPtr_helper { - pub _vftable: *const _vftable_nsCOMPtr_helper, +pub struct StyleSetHandle_Ptr { + pub mValue: usize, } -#[repr(C)] -pub struct _vftable_nsCOMPtr_helper { - pub _bindgen_empty_ctype_warning_fix: u64, +#[test] +fn bindgen_test_layout_StyleSetHandle_Ptr() { + assert_eq!(::std::mem::size_of::<StyleSetHandle_Ptr>() , 8usize); + assert_eq!(::std::mem::align_of::<StyleSetHandle_Ptr>() , 8usize); } -impl ::std::clone::Clone for nsCOMPtr_helper { +impl Clone for StyleSetHandle_Ptr { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsCOMPtr_helper() { - assert_eq!(::std::mem::size_of::<nsCOMPtr_helper>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCOMPtr_helper>() , 8usize); +fn bindgen_test_layout_StyleSetHandle() { + assert_eq!(::std::mem::size_of::<StyleSetHandle>() , 8usize); + assert_eq!(::std::mem::align_of::<StyleSetHandle>() , 8usize); +} +impl Clone for StyleSetHandle { + fn clone(&self) -> Self { *self } +} +#[repr(i32)] +/** + * Enumeration that represents one of the two supported style system backends. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum StyleBackendType { Gecko = 1, Servo = 2, } +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum SheetType { + Agent = 0, + User = 1, + PresHint = 2, + SVGAttrAnimation = 3, + Doc = 4, + ScopedDoc = 5, + StyleAttr = 6, + Override = 7, + Animation = 8, + Transition = 9, + Count = 10, + Unknown = 255, } +/** + * Smart pointer class that can hold a pointer to either a CSSStyleSheet + * or a ServoStyleSheet. + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsQueryInterface { - pub mRawPtr: *mut nsISupports, +pub struct StyleSheetHandle { + pub mPtr: StyleSheetHandle_Ptr, } -impl ::std::clone::Clone for nsQueryInterface { +pub type StyleSheetHandle_RefPtr = HandleRefPtr<StyleSheetHandle>; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct StyleSheetHandle_Ptr { + pub mValue: usize, +} +#[test] +fn bindgen_test_layout_StyleSheetHandle_Ptr() { + assert_eq!(::std::mem::size_of::<StyleSheetHandle_Ptr>() , 8usize); + assert_eq!(::std::mem::align_of::<StyleSheetHandle_Ptr>() , 8usize); +} +impl Clone for StyleSheetHandle_Ptr { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsQueryInterface() { - assert_eq!(::std::mem::size_of::<nsQueryInterface>() , 8usize); - assert_eq!(::std::mem::align_of::<nsQueryInterface>() , 8usize); +fn bindgen_test_layout_StyleSheetHandle() { + assert_eq!(::std::mem::size_of::<StyleSheetHandle>() , 8usize); + assert_eq!(::std::mem::align_of::<StyleSheetHandle>() , 8usize); +} +impl Clone for StyleSheetHandle { + fn clone(&self) -> Self { *self } +} +pub const ReferrerPolicy_RP_Default: ReferrerPolicy = + ReferrerPolicy::RP_No_Referrer_When_Downgrade; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum ReferrerPolicy { + RP_No_Referrer = 1, + RP_Origin = 2, + RP_No_Referrer_When_Downgrade = 0, + RP_Origin_When_Crossorigin = 3, + RP_Unsafe_URL = 4, + RP_Unset = 4294967295, } +/** + * EventStates is the class used to represent the event states of nsIContent + * instances. These states are calculated by IntrinsicState() and + * ContentStatesChanged() has to be called when one of them changes thus + * informing the layout/style engine of the change. + * Event states are associated with pseudo-classes. + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsQueryInterfaceWithError { - pub mRawPtr: *mut nsISupports, - pub mErrorPtr: *mut nsresult, +pub struct EventStates { + pub mStates: EventStates_InternalType, } -impl ::std::clone::Clone for nsQueryInterfaceWithError { +pub type EventStates_InternalType = u64; +pub type EventStates_ServoType = u8; +#[test] +fn bindgen_test_layout_EventStates() { + assert_eq!(::std::mem::size_of::<EventStates>() , 8usize); + assert_eq!(::std::mem::align_of::<EventStates>() , 8usize); +} +impl Clone for EventStates { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsQueryInterfaceWithError() { - assert_eq!(::std::mem::size_of::<nsQueryInterfaceWithError>() , 16usize); - assert_eq!(::std::mem::align_of::<nsQueryInterfaceWithError>() , 8usize); +#[repr(u32)] +/** + * |nsRestyleHint| is a bitfield for the result of + * |HasStateDependentStyle| and |HasAttributeDependentStyle|. When no + * restyling is necessary, use |nsRestyleHint(0)|. + * + * Without eRestyle_Force or eRestyle_ForceDescendants, the restyling process + * can stop processing at a frame when it detects no style changes and it is + * known that the styles of the subtree beneath it will not change, leaving + * the old style context on the frame. eRestyle_Force can be used to skip this + * optimization on a frame, and to force its new style context to be used. + * + * Similarly, eRestyle_ForceDescendants will cause the frame and all of its + * descendants to be traversed and for the new style contexts that are created + * to be set on the frames. + * + * NOTE: When adding new restyle hints, please also add them to + * RestyleManager::RestyleHintToString. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsRestyleHint { + eRestyle_Self = 1, + eRestyle_SomeDescendants = 2, + eRestyle_Subtree = 4, + eRestyle_LaterSiblings = 8, + eRestyle_CSSTransitions = 16, + eRestyle_CSSAnimations = 32, + eRestyle_SVGAttrAnimations = 64, + eRestyle_StyleAttribute = 128, + eRestyle_StyleAttribute_Animations = 256, + eRestyle_Force = 512, + eRestyle_ForceDescendants = 1024, + eRestyle_AllHintsWithAnimations = 368, } -//////////////////////////////////////////////////////////////////////////// #[repr(C)] #[derive(Debug, Copy)] -pub struct nsGetServiceByCID { - pub mCID: *const nsCID, +pub struct nsIObserver { + pub _base: nsISupports, } -impl ::std::clone::Clone for nsGetServiceByCID { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIObserver_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsGetServiceByCID() { - assert_eq!(::std::mem::size_of::<nsGetServiceByCID>() , 8usize); - assert_eq!(::std::mem::align_of::<nsGetServiceByCID>() , 8usize); +fn bindgen_test_layout_nsIObserver() { + assert_eq!(::std::mem::size_of::<nsIObserver>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIObserver>() , 8usize); +} +impl Clone for nsIObserver { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsCompatibility { + eCompatibility_FullStandards = 1, + eCompatibility_AlmostStandards = 2, + eCompatibility_NavQuirks = 3, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum VisibilityState { + Hidden = 0, + Visible = 1, + Prerender = 2, + EndGuard_ = 3, +} +/** + * The global object which keeps a script context for each supported script + * language. This often used to store per-window global state. + * This is a heavyweight interface implemented only by DOM globals, and + * it might go away some time in the future. + */ #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsGetServiceByCIDWithError { - pub mCID: *const nsCID, - pub mErrorPtr: *mut nsresult, +#[derive(Debug)] +pub struct nsIScriptGlobalObject { + pub _base: nsIGlobalObject, } -impl ::std::clone::Clone for nsGetServiceByCIDWithError { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIScriptGlobalObject_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsGetServiceByCIDWithError() { - assert_eq!(::std::mem::size_of::<nsGetServiceByCIDWithError>() , 16usize); - assert_eq!(::std::mem::align_of::<nsGetServiceByCIDWithError>() , 8usize); +fn bindgen_test_layout_nsIScriptGlobalObject() { + assert_eq!(::std::mem::size_of::<nsIScriptGlobalObject>() , 24usize); + assert_eq!(::std::mem::align_of::<nsIScriptGlobalObject>() , 8usize); } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsGetServiceByContractID { - pub mContractID: *const ::std::os::raw::c_char, +pub struct ShortcutKeyCandidate { + pub _address: u8, } -impl ::std::clone::Clone for nsGetServiceByContractID { +impl Clone for ShortcutKeyCandidate { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIVariant { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIVariant_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} #[test] -fn bindgen_test_layout_nsGetServiceByContractID() { - assert_eq!(::std::mem::size_of::<nsGetServiceByContractID>() , 8usize); - assert_eq!(::std::mem::align_of::<nsGetServiceByContractID>() , 8usize); +fn bindgen_test_layout_nsIVariant() { + assert_eq!(::std::mem::size_of::<nsIVariant>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIVariant>() , 8usize); +} +impl Clone for nsIVariant { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsGetServiceByContractIDWithError { - pub mContractID: *const ::std::os::raw::c_char, - pub mErrorPtr: *mut nsresult, +pub struct nsIRunnable { + pub _base: nsISupports, } -impl ::std::clone::Clone for nsGetServiceByContractIDWithError { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIRunnable_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsGetServiceByContractIDWithError() { - assert_eq!(::std::mem::size_of::<nsGetServiceByContractIDWithError>() , - 16usize); - assert_eq!(::std::mem::align_of::<nsGetServiceByContractIDWithError>() , - 8usize); +fn bindgen_test_layout_nsIRunnable() { + assert_eq!(::std::mem::size_of::<nsIRunnable>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIRunnable>() , 8usize); +} +impl Clone for nsIRunnable { + fn clone(&self) -> Self { *self } } -/** - * Factors implementation for all template versions of nsCOMPtr. - * - * Here's the way people normally do things like this: - * - * template<class T> class Foo { ... }; - * template<> class Foo<void*> { ... }; - * template<class T> class Foo<T*> : private Foo<void*> { ... }; - */ #[repr(C)] #[derive(Debug)] -pub struct nsCOMPtr_base { - pub mRawPtr: *mut nsISupports, +pub struct Runnable { + pub _base: nsIRunnable, + pub mRefCnt: ThreadSafeAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, } +pub type Runnable_HasThreadSafeRefCnt = TrueType; #[test] -fn bindgen_test_layout_nsCOMPtr_base() { - assert_eq!(::std::mem::size_of::<nsCOMPtr_base>() , 8usize); - assert_eq!(::std::mem::align_of::<nsCOMPtr_base>() , 8usize); +fn bindgen_test_layout_Runnable() { + assert_eq!(::std::mem::size_of::<Runnable>() , 24usize); + assert_eq!(::std::mem::align_of::<Runnable>() , 8usize); } #[repr(C)] -#[derive(Debug)] -pub struct nsCOMPtr<T> { - pub _base: nsCOMPtr_base, - pub _phantom0: ::std::marker::PhantomData<T>, +#[derive(Debug, Copy)] +pub struct nsIDOMAttr { + pub _base: nsIDOMNode, } -/** - * This class is designed to be used for anonymous temporary objects in the - * argument list of calls that return COM interface pointers, e.g., - * - * nsCOMPtr<IFoo> fooP; - * ...->QueryInterface(iid, getter_AddRefs(fooP)) - * - * DO NOT USE THIS TYPE DIRECTLY IN YOUR CODE. Use |getter_AddRefs()| instead. - * - * When initialized with a |nsCOMPtr|, as in the example above, it returns - * a |void**|, a |T**|, or an |nsISupports**| as needed, that the outer call - * (|QueryInterface| in this case) can fill in. - * - * This type should be a nested class inside |nsCOMPtr<T>|. - */ #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsGetterAddRefs<T> { - pub mTargetSmartPtr: *mut nsCOMPtr<T>, +pub struct nsIDOMAttr_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIDOMAttr() { + assert_eq!(::std::mem::size_of::<nsIDOMAttr>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMAttr>() , 8usize); +} +impl Clone for nsIDOMAttr { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsAutoPtr<T> { - pub mRawPtr: *mut T, +#[derive(Debug, Copy)] +pub struct nsIDOMNode { + pub _base: nsISupports, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsAutoPtr_Ptr<T> { - pub mPtr: *mut T, +pub struct nsIDOMNode_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIDOMNode__bindgen_ty_bindgen_id_107063 { + ELEMENT_NODE = 1, + ATTRIBUTE_NODE = 2, + TEXT_NODE = 3, + CDATA_SECTION_NODE = 4, + ENTITY_REFERENCE_NODE = 5, + ENTITY_NODE = 6, + PROCESSING_INSTRUCTION_NODE = 7, + COMMENT_NODE = 8, + DOCUMENT_NODE = 9, + DOCUMENT_TYPE_NODE = 10, + DOCUMENT_FRAGMENT_NODE = 11, + NOTATION_NODE = 12, +} +#[test] +fn bindgen_test_layout_nsIDOMNode() { + assert_eq!(::std::mem::size_of::<nsIDOMNode>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMNode>() , 8usize); +} +impl Clone for nsIDOMNode { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug)] -pub struct nsAutoPtr_Proxy<T, R, Args> { - pub mRawPtr: *mut T, - pub _phantom0: ::std::marker::PhantomData<R>, - pub _phantom1: ::std::marker::PhantomData<Args>, +#[derive(Debug, Copy)] +pub struct nsIDOMHTMLCollection { + pub _base: nsISupports, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct nsAutoPtrGetterTransfers<T> { - pub mTargetSmartPtr: *mut nsAutoPtr<T>, +pub struct nsIDOMHTMLCollection_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIDOMHTMLCollection() { + assert_eq!(::std::mem::size_of::<nsIDOMHTMLCollection>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMHTMLCollection>() , 8usize); +} +impl Clone for nsIDOMHTMLCollection { + fn clone(&self) -> Self { *self } } -/** - * This structure precedes the string buffers "we" allocate. It may be the - * case that nsTAString::mData does not point to one of these special - * buffers. The mFlags member variable distinguishes the buffer type. - * - * When this header is in use, it enables reference counting, and capacity - * tracking. NOTE: A string buffer can be modified only if its reference - * count is 1. - */ #[repr(C)] -#[derive(Debug)] -pub struct nsStringBuffer { - pub mRefCount: u32, - pub mStorageSize: u32, +#[derive(Debug, Copy)] +pub struct nsIControllers { + pub _address: u8, } -#[test] -fn bindgen_test_layout_nsStringBuffer() { - assert_eq!(::std::mem::size_of::<nsStringBuffer>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStringBuffer>() , 4usize); +impl Clone for nsIControllers { + fn clone(&self) -> Self { *self } } #[repr(C)] +#[derive(Debug)] +pub struct nsPresContext { + pub _base: nsIObserver, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mType: nsPresContext_nsPresContextType, + pub mShell: *mut nsIPresShell, + pub mDocument: nsCOMPtr<nsIDocument>, + pub mDeviceContext: RefPtr<nsDeviceContext>, + pub mEventManager: RefPtr<EventStateManager>, + pub mRefreshDriver: RefPtr<nsRefreshDriver>, + pub mEffectCompositor: RefPtr<EffectCompositor>, + pub mTransitionManager: RefPtr<nsTransitionManager>, + pub mAnimationManager: RefPtr<nsAnimationManager>, + pub mRestyleManager: RestyleManagerHandle_RefPtr, + pub mCounterStyleManager: RefPtr<CounterStyleManager>, + pub mMedium: *mut nsIAtom, + pub mMediaEmulated: nsCOMPtr<nsIAtom>, + pub mLinkHandler: *mut nsILinkHandler, + pub mLanguage: nsCOMPtr<nsIAtom>, + pub mInflationDisabledForShrinkWrap: bool, + pub mContainer: u64, + pub mBaseMinFontSize: i32, + pub mTextZoom: f32, + pub mFullZoom: f32, + pub mOverrideDPPX: f32, + pub mLastFontInflationScreenSize: [u64; 2usize], + pub mCurAppUnitsPerDevPixel: i32, + pub mAutoQualityMinFontSizePixelsPref: i32, + pub mTheme: nsCOMPtr<nsITheme>, + pub mLangService: nsCOMPtr<nsILanguageAtomService>, + pub mPrintSettings: nsCOMPtr<nsIPrintSettings>, + pub mPrefChangedTimer: nsCOMPtr<nsITimer>, + pub mPropertyTable: nsPresContext_FramePropertyTable, + pub mInvalidateRequestsSinceLastPaint: nsInvalidateRequestList, + pub mUndeliveredInvalidateRequestsBeforeLastPaint: nsInvalidateRequestList, + pub mTextPerf: nsAutoPtr<gfxTextPerfMetrics>, + pub mMissingFonts: nsAutoPtr<gfxMissingFontRecorder>, + pub mVisibleArea: nsRect, + pub mPageSize: nsSize, + pub mPageScale: f32, + pub mPPScale: f32, + pub mDefaultColor: nscolor, + pub mBackgroundColor: nscolor, + pub mLinkColor: nscolor, + pub mActiveLinkColor: nscolor, + pub mVisitedLinkColor: nscolor, + pub mFocusBackgroundColor: nscolor, + pub mFocusTextColor: nscolor, + pub mBodyTextColor: nscolor, + pub mViewportStyleScrollbar: nsPresContext_ScrollbarStyles, + pub mFocusRingWidth: u8, + pub mExistThrottledUpdates: bool, + pub mImageAnimationMode: u16, + pub mImageAnimationModePref: u16, + pub mLangGroupFontPrefs: nsPresContext_LangGroupFontPrefs, + pub mBorderWidthTable: [nscoord; 3usize], + pub mInterruptChecksToSkip: u32, + pub mElementsRestyled: u64, + pub mFramesConstructed: u64, + pub mFramesReflowed: u64, + pub mReflowStartTime: TimeStamp, + pub mLastStyleUpdateForAllAnimations: TimeStamp, + pub _bitfield_1: u64, +} +pub type nsPresContext_FramePropertyTable = FramePropertyTable; +pub type nsPresContext_LangGroupFontPrefs = LangGroupFontPrefs; +pub type nsPresContext_ScrollbarStyles = ScrollbarStyles; +pub type nsPresContext_StaticPresData = StaticPresData; +pub type nsPresContext_HasThreadSafeRefCnt = FalseType; +#[repr(C)] #[derive(Debug, Copy)] -pub struct nsIAtom { - pub _base: nsISupports, - pub _bitfield_1: u32, - pub mHash: u32, - /** - * WARNING! There is an invisible constraint on |mString|: the chars it - * points to must belong to an nsStringBuffer. This is so that the - * nsStringBuffer::FromData() calls above are valid. - */ - pub mString: *mut ::std::os::raw::c_ushort, +pub struct nsPresContext_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_nsPresContext_cycleCollection() { + assert_eq!(::std::mem::size_of::<nsPresContext_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsPresContext_cycleCollection>() , + 8usize); +} +impl Clone for nsPresContext_cycleCollection { + fn clone(&self) -> Self { *self } } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsPresContext_nsPresContextType { + eContext_Galley = 0, + eContext_PrintPreview = 1, + eContext_Print = 2, + eContext_PageLayout = 3, +} +/** + * A class that can be used to temporarily disable reflow interruption. + */ #[repr(C)] -pub struct _vftable_nsIAtom { - pub _base: _vftable_nsISupports, +#[derive(Debug)] +pub struct nsPresContext_InterruptPreventer { + pub mCtx: *mut nsPresContext, + pub mInterruptsEnabled: bool, + pub mHasPendingInterrupt: bool, } -impl nsIAtom { +#[test] +fn bindgen_test_layout_nsPresContext_InterruptPreventer() { + assert_eq!(::std::mem::size_of::<nsPresContext_InterruptPreventer>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsPresContext_InterruptPreventer>() , + 8usize); +} +extern "C" { + #[link_name = "_ZN13nsPresContext21_cycleCollectorGlobalE"] + pub static mut nsPresContext__cycleCollectorGlobal: + nsPresContext_cycleCollection; +} +#[test] +fn bindgen_test_layout_nsPresContext() { + assert_eq!(::std::mem::size_of::<nsPresContext>() , 1160usize); + assert_eq!(::std::mem::align_of::<nsPresContext>() , 8usize); +} +impl nsPresContext { #[inline] - pub fn mLength(&self) -> u32 { - (self._bitfield_1 & (2147483647usize as u32)) >> 0usize + pub fn mHasPendingInterrupt(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u64)) >> + 0u32) as u32) + } } #[inline] - pub fn set_mLength(&mut self, val: u32) { - self._bitfield_1 &= !(2147483647usize as u32); + pub fn set_mHasPendingInterrupt(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 0u32) & (1usize as u64); + } + #[inline] + pub fn mPendingInterruptFromTest(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u64)) >> + 1u32) as u32) + } + } + #[inline] + pub fn set_mPendingInterruptFromTest(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 1u32) & (2usize as u64); + } + #[inline] + pub fn mInterruptsEnabled(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4usize as u64)) >> + 2u32) as u32) + } + } + #[inline] + pub fn set_mInterruptsEnabled(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 2u32) & (4usize as u64); + } + #[inline] + pub fn mUseDocumentFonts(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8usize as u64)) >> + 3u32) as u32) + } + } + #[inline] + pub fn set_mUseDocumentFonts(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 3u32) & (8usize as u64); + } + #[inline] + pub fn mUseDocumentColors(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16usize as u64)) >> + 4u32) as u32) + } + } + #[inline] + pub fn set_mUseDocumentColors(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(16usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 4u32) & (16usize as u64); + } + #[inline] + pub fn mUnderlineLinks(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32usize as u64)) >> + 5u32) as u32) + } + } + #[inline] + pub fn set_mUnderlineLinks(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(32usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 5u32) & (32usize as u64); + } + #[inline] + pub fn mSendAfterPaintToContent(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (64usize as u64)) >> + 6u32) as u32) + } + } + #[inline] + pub fn set_mSendAfterPaintToContent(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(64usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 6u32) & (64usize as u64); + } + #[inline] + pub fn mUseFocusColors(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (128usize as u64)) >> + 7u32) as u32) + } + } + #[inline] + pub fn set_mUseFocusColors(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(128usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 7u32) & (128usize as u64); + } + #[inline] + pub fn mFocusRingOnAnything(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (256usize as u64)) >> + 8u32) as u32) + } + } + #[inline] + pub fn set_mFocusRingOnAnything(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(256usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 8u32) & (256usize as u64); + } + #[inline] + pub fn mFocusRingStyle(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (512usize as u64)) >> + 9u32) as u32) + } + } + #[inline] + pub fn set_mFocusRingStyle(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(512usize as u64); + self._bitfield_1 |= ((val as u32 as u64) << 9u32) & (512usize as u64); + } + #[inline] + pub fn mDrawImageBackground(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1024usize as u64)) >> + 10u32) as u32) + } + } + #[inline] + pub fn set_mDrawImageBackground(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1024usize as u64); self._bitfield_1 |= - ((val as u32) << 0usize) & (2147483647usize as u32); + ((val as u32 as u64) << 10u32) & (1024usize as u64); } #[inline] - pub fn mIsStatic(&self) -> u32 { - (self._bitfield_1 & (2147483648usize as u32)) >> 31usize + pub fn mDrawColorBackground(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2048usize as u64)) >> + 11u32) as u32) + } } #[inline] - pub fn set_mIsStatic(&mut self, val: bool) { - self._bitfield_1 &= !(2147483648usize as u32); + pub fn set_mDrawColorBackground(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2048usize as u64); self._bitfield_1 |= - ((val as u32) << 31usize) & (2147483648usize as u32); + ((val as u32 as u64) << 11u32) & (2048usize as u64); } #[inline] - pub fn new_bitfield_1(mLength: u32, mIsStatic: bool) -> u32 { - 0 | ((mLength as u32) << 0u32) | ((mIsStatic as u32) << 31u32) + pub fn mNeverAnimate(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4096usize as u64)) >> + 12u32) as u32) + } + } + #[inline] + pub fn set_mNeverAnimate(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4096usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 12u32) & (4096usize as u64); + } + #[inline] + pub fn mIsRenderingOnlySelection(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8192usize as u64)) >> + 13u32) as u32) + } + } + #[inline] + pub fn set_mIsRenderingOnlySelection(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8192usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 13u32) & (8192usize as u64); + } + #[inline] + pub fn mPaginated(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16384usize as u64)) >> + 14u32) as u32) + } + } + #[inline] + pub fn set_mPaginated(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(16384usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 14u32) & (16384usize as u64); + } + #[inline] + pub fn mCanPaginatedScroll(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32768usize as u64)) >> + 15u32) as u32) + } + } + #[inline] + pub fn set_mCanPaginatedScroll(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(32768usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 15u32) & (32768usize as u64); + } + #[inline] + pub fn mDoScaledTwips(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (65536usize as u64)) >> + 16u32) as u32) + } + } + #[inline] + pub fn set_mDoScaledTwips(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(65536usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 16u32) & (65536usize as u64); + } + #[inline] + pub fn mIsRootPaginatedDocument(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (131072usize as u64)) + >> 17u32) as u32) + } + } + #[inline] + pub fn set_mIsRootPaginatedDocument(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(131072usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 17u32) & (131072usize as u64); + } + #[inline] + pub fn mPrefBidiDirection(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (262144usize as u64)) + >> 18u32) as u32) + } + } + #[inline] + pub fn set_mPrefBidiDirection(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(262144usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 18u32) & (262144usize as u64); + } + #[inline] + pub fn mPrefScrollbarSide(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1572864usize as u64)) + >> 19u32) as u32) + } + } + #[inline] + pub fn set_mPrefScrollbarSide(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1572864usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 19u32) & (1572864usize as u64); + } + #[inline] + pub fn mPendingSysColorChanged(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2097152usize as u64)) + >> 21u32) as u32) + } + } + #[inline] + pub fn set_mPendingSysColorChanged(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2097152usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 21u32) & (2097152usize as u64); + } + #[inline] + pub fn mPendingThemeChanged(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4194304usize as u64)) + >> 22u32) as u32) + } + } + #[inline] + pub fn set_mPendingThemeChanged(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4194304usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 22u32) & (4194304usize as u64); + } + #[inline] + pub fn mPendingUIResolutionChanged(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8388608usize as u64)) + >> 23u32) as u32) + } + } + #[inline] + pub fn set_mPendingUIResolutionChanged(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8388608usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 23u32) & (8388608usize as u64); + } + #[inline] + pub fn mPendingMediaFeatureValuesChanged(&self) + -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16777216usize as u64)) + >> 24u32) as u32) + } + } + #[inline] + pub fn set_mPendingMediaFeatureValuesChanged(&mut self, + val: + ::std::os::raw::c_uint) { + self._bitfield_1 &= !(16777216usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 24u32) & (16777216usize as u64); + } + #[inline] + pub fn mPrefChangePendingNeedsReflow(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (33554432usize as u64)) + >> 25u32) as u32) + } + } + #[inline] + pub fn set_mPrefChangePendingNeedsReflow(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(33554432usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 25u32) & (33554432usize as u64); + } + #[inline] + pub fn mIsEmulatingMedia(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (67108864usize as u64)) + >> 26u32) as u32) + } + } + #[inline] + pub fn set_mIsEmulatingMedia(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(67108864usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 26u32) & (67108864usize as u64); + } + #[inline] + pub fn mAllInvalidated(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (134217728usize as u64)) >> 27u32) as + u32) + } + } + #[inline] + pub fn set_mAllInvalidated(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(134217728usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 27u32) & (134217728usize as u64); + } + #[inline] + pub fn mIsGlyph(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (268435456usize as u64)) >> 28u32) as + u32) + } + } + #[inline] + pub fn set_mIsGlyph(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(268435456usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 28u32) & (268435456usize as u64); + } + #[inline] + pub fn mUsesRootEMUnits(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (536870912usize as u64)) >> 29u32) as + u32) + } + } + #[inline] + pub fn set_mUsesRootEMUnits(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(536870912usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 29u32) & (536870912usize as u64); + } + #[inline] + pub fn mUsesExChUnits(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (1073741824usize as u64)) >> 30u32) as + u32) + } + } + #[inline] + pub fn set_mUsesExChUnits(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1073741824usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 30u32) & (1073741824usize as u64); + } + #[inline] + pub fn mUsesViewportUnits(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2147483648usize as u64)) >> 31u32) as + u32) + } + } + #[inline] + pub fn set_mUsesViewportUnits(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2147483648usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 31u32) & (2147483648usize as u64); + } + #[inline] + pub fn mPendingViewportChange(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4294967296usize as u64)) >> 32u32) as + u32) + } + } + #[inline] + pub fn set_mPendingViewportChange(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4294967296usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 32u32) & (4294967296usize as u64); + } + #[inline] + pub fn mCounterStylesDirty(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (8589934592usize as u64)) >> 33u32) as + u32) + } + } + #[inline] + pub fn set_mCounterStylesDirty(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8589934592usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 33u32) & (8589934592usize as u64); + } + #[inline] + pub fn mPostedFlushCounterStyles(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (17179869184usize as u64)) >> 34u32) + as u32) + } + } + #[inline] + pub fn set_mPostedFlushCounterStyles(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(17179869184usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 34u32) & (17179869184usize as u64); + } + #[inline] + pub fn mSuppressResizeReflow(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (34359738368usize as u64)) >> 35u32) + as u32) + } + } + #[inline] + pub fn set_mSuppressResizeReflow(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(34359738368usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 35u32) & (34359738368usize as u64); + } + #[inline] + pub fn mIsVisual(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (68719476736usize as u64)) >> 36u32) + as u32) + } + } + #[inline] + pub fn set_mIsVisual(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(68719476736usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 36u32) & (68719476736usize as u64); + } + #[inline] + pub fn mFireAfterPaintEvents(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (137438953472usize as u64)) >> 37u32) + as u32) + } + } + #[inline] + pub fn set_mFireAfterPaintEvents(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(137438953472usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 37u32) & (137438953472usize as u64); + } + #[inline] + pub fn mIsChrome(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (274877906944usize as u64)) >> 38u32) + as u32) + } + } + #[inline] + pub fn set_mIsChrome(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(274877906944usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 38u32) & (274877906944usize as u64); + } + #[inline] + pub fn mIsChromeOriginImage(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (549755813888usize as u64)) >> 39u32) + as u32) + } + } + #[inline] + pub fn set_mIsChromeOriginImage(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(549755813888usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 39u32) & (549755813888usize as u64); + } + #[inline] + pub fn mPaintFlashing(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (1099511627776usize as u64)) >> 40u32) + as u32) + } + } + #[inline] + pub fn set_mPaintFlashing(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(1099511627776usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 40u32) & (1099511627776usize as u64); + } + #[inline] + pub fn mPaintFlashingInitialized(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (2199023255552usize as u64)) >> 41u32) + as u32) + } + } + #[inline] + pub fn set_mPaintFlashingInitialized(&mut self, + val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(2199023255552usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 41u32) & (2199023255552usize as u64); + } + #[inline] + pub fn mHasWarnedAboutPositionedTableParts(&self) + -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4398046511104usize as u64)) >> 42u32) + as u32) + } + } + #[inline] + pub fn set_mHasWarnedAboutPositionedTableParts(&mut self, + val: + ::std::os::raw::c_uint) { + self._bitfield_1 &= !(4398046511104usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 42u32) & (4398046511104usize as u64); + } + #[inline] + pub fn mHasWarnedAboutTooLargeDashedOrDottedRadius(&self) + -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (8796093022208usize as u64)) >> 43u32) + as u32) + } + } + #[inline] + pub fn set_mHasWarnedAboutTooLargeDashedOrDottedRadius(&mut self, + val: + ::std::os::raw::c_uint) { + self._bitfield_1 &= !(8796093022208usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 43u32) & (8796093022208usize as u64); + } + #[inline] + pub fn mQuirkSheetAdded(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (17592186044416usize as u64)) >> + 44u32) as u32) + } + } + #[inline] + pub fn set_mQuirkSheetAdded(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(17592186044416usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 44u32) & (17592186044416usize as u64); + } + #[inline] + pub fn mNeedsPrefUpdate(&self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (35184372088832usize as u64)) >> + 45u32) as u32) + } + } + #[inline] + pub fn set_mNeedsPrefUpdate(&mut self, val: ::std::os::raw::c_uint) { + self._bitfield_1 &= !(35184372088832usize as u64); + self._bitfield_1 |= + ((val as u32 as u64) << 45u32) & (35184372088832usize as u64); } } -impl ::std::clone::Clone for nsIAtom { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_nsIAtom() { - assert_eq!(::std::mem::size_of::<nsIAtom>() , 24usize); - assert_eq!(::std::mem::align_of::<nsIAtom>() , 8usize); +/** + * Smart pointer class that can hold a pointer to either a RestyleManager + * or a ServoRestyleManager. + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct RestyleManagerHandle { + pub mPtr: RestyleManagerHandle_Ptr, } +pub type RestyleManagerHandle_RefPtr = HandleRefPtr<RestyleManagerHandle>; #[repr(C)] -#[derive(Debug)] -pub struct nsAtomString { - pub _base: nsString, +#[derive(Debug, Copy)] +pub struct RestyleManagerHandle_Ptr { + pub mValue: usize, } #[test] -fn bindgen_test_layout_nsAtomString() { - assert_eq!(::std::mem::size_of::<nsAtomString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAtomString>() , 8usize); +fn bindgen_test_layout_RestyleManagerHandle_Ptr() { + assert_eq!(::std::mem::size_of::<RestyleManagerHandle_Ptr>() , 8usize); + assert_eq!(::std::mem::align_of::<RestyleManagerHandle_Ptr>() , 8usize); } -#[repr(C)] -#[derive(Debug)] -pub struct nsAtomCString { - pub _base: nsCString, +impl Clone for RestyleManagerHandle_Ptr { + fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsAtomCString() { - assert_eq!(::std::mem::size_of::<nsAtomCString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAtomCString>() , 8usize); +fn bindgen_test_layout_RestyleManagerHandle() { + assert_eq!(::std::mem::size_of::<RestyleManagerHandle>() , 8usize); + assert_eq!(::std::mem::align_of::<RestyleManagerHandle>() , 8usize); } -#[repr(C)] -pub struct nsDependentAtomString { - pub _base: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct piecewise_construct_t; -impl ::std::clone::Clone for piecewise_construct_t { +impl Clone for RestyleManagerHandle { fn clone(&self) -> Self { *self } } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pair<_T1, _T2> { - pub first: _T1, - pub second: _T2, +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsChangeHint { + nsChangeHint_RepaintFrame = 1, + nsChangeHint_NeedReflow = 2, + nsChangeHint_ClearAncestorIntrinsics = 4, + nsChangeHint_ClearDescendantIntrinsics = 8, + nsChangeHint_NeedDirtyReflow = 16, + nsChangeHint_SyncFrameView = 32, + nsChangeHint_UpdateCursor = 64, + nsChangeHint_UpdateEffects = 128, + nsChangeHint_UpdateOpacityLayer = 256, + nsChangeHint_UpdateTransformLayer = 512, + nsChangeHint_ReconstructFrame = 1024, + nsChangeHint_UpdateOverflow = 2048, + nsChangeHint_UpdateSubtreeOverflow = 4096, + nsChangeHint_UpdatePostTransformOverflow = 8192, + nsChangeHint_UpdateParentOverflow = 16384, + nsChangeHint_ChildrenOnlyTransform = 32768, + nsChangeHint_RecomputePosition = 65536, + nsChangeHint_UpdateContainingBlock = 131072, + nsChangeHint_BorderStyleNoneChange = 262144, + nsChangeHint_UpdateTextPath = 524288, + nsChangeHint_SchedulePaint = 1048576, + nsChangeHint_NeutralChange = 2097152, + nsChangeHint_InvalidateRenderingObservers = 4194304, + nsChangeHint_ReflowChangesSizeOrPosition = 8388608, + nsChangeHint_UpdateComputedBSize = 16777216, + nsChangeHint_UpdateUsesOpacity = 33554432, + nsChangeHint_UpdateBackgroundPosition = 67108864, + nsChangeHint_AllHints = 134217727, +} +pub type nscolor = u32; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum Side { + eSideTop = 0, + eSideRight = 1, + eSideBottom = 2, + eSideLeft = 3, } -pub enum nsIContentSecurityPolicy { } -pub enum nsIDOMDocument { } #[repr(C)] -pub struct nsIPrincipal { - pub _bindgen_opaque_blob: u64, +#[derive(Debug)] +pub struct CallbackFunction { + pub _base: CallbackObject, } #[test] -fn bindgen_test_layout_nsIPrincipal() { - assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize); - assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize); +fn bindgen_test_layout_CallbackFunction() { + assert_eq!(::std::mem::size_of::<CallbackFunction>() , 56usize); + assert_eq!(::std::mem::align_of::<CallbackFunction>() , 8usize); } #[repr(C)] -#[derive(Debug, Copy)] -pub struct nsIExpandedPrincipal { +#[derive(Debug)] +pub struct CallbackObject { pub _base: nsISupports, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mCallback: u64, + pub mCreationStack: u64, + pub mIncumbentGlobal: nsCOMPtr<nsIGlobalObject>, + pub mIncumbentJSGlobal: u64, } #[repr(C)] -pub struct _vftable_nsIExpandedPrincipal { - pub _base: _vftable_nsISupports, -} -impl ::std::clone::Clone for nsIExpandedPrincipal { - fn clone(&self) -> Self { *self } +#[derive(Debug, Copy, Clone)] +pub struct CallbackObject_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } +pub type CallbackObject_HasThreadSafeRefCnt = FalseType; #[repr(C)] #[derive(Debug, Copy)] -pub struct nsIURI { - pub _base: nsISupports, +pub struct CallbackObject_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, } -#[repr(C)] -pub struct _vftable_nsIURI { - pub _base: _vftable_nsISupports, +#[test] +fn bindgen_test_layout_CallbackObject_cycleCollection() { + assert_eq!(::std::mem::size_of::<CallbackObject_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<CallbackObject_cycleCollection>() , + 8usize); } -impl ::std::clone::Clone for nsIURI { +impl Clone for CallbackObject_cycleCollection { fn clone(&self) -> Self { *self } } -pub type PLDHashNumber = u32; +#[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 PLDHashEntryHdr { - pub mKeyHash: PLDHashNumber, +pub struct CallbackObject_FastCallbackConstructor { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_CallbackObject_FastCallbackConstructor() { + assert_eq!(::std::mem::size_of::<CallbackObject_FastCallbackConstructor>() + , 1usize); + assert_eq!(::std::mem::align_of::<CallbackObject_FastCallbackConstructor>() + , 1usize); } -impl ::std::clone::Clone for PLDHashEntryHdr { +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::<CallbackObject_CallSetup>() , 368usize); + assert_eq!(::std::mem::align_of::<CallbackObject_CallSetup>() , 8usize); +} +extern "C" { + #[link_name = "_ZN7mozilla3dom14CallbackObject21_cycleCollectorGlobalE"] + pub static mut CallbackObject__cycleCollectorGlobal: + CallbackObject_cycleCollection; +} #[test] -fn bindgen_test_layout_PLDHashEntryHdr() { - assert_eq!(::std::mem::size_of::<PLDHashEntryHdr>() , 4usize); - assert_eq!(::std::mem::align_of::<PLDHashEntryHdr>() , 4usize); +fn bindgen_test_layout_CallbackObject() { + assert_eq!(::std::mem::size_of::<CallbackObject>() , 56usize); + assert_eq!(::std::mem::align_of::<CallbackObject>() , 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: [u64; 2usize], + pub mEntryStore: PLDHashTable_EntryStore, } #[repr(C)] +#[derive(Debug)] pub struct PLDHashTable_EntryStore { - pub _bindgen_opaque_blob: [u64; 2usize], + pub mEntryStore: *mut ::std::os::raw::c_char, + pub mGeneration: u32, } #[test] fn bindgen_test_layout_PLDHashTable_EntryStore() { @@ -2586,34 +4971,75 @@ fn bindgen_test_layout_PLDHashTable_Iterator() { assert_eq!(::std::mem::align_of::<PLDHashTable_Iterator>() , 8usize); } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } -#[test] -fn bindgen_test_layout_PLDHashTable() { - assert_eq!(::std::mem::size_of::<PLDHashTable>() , 40usize); - assert_eq!(::std::mem::align_of::<PLDHashTable>() , 8usize); -} extern "C" { #[link_name = "_ZN12PLDHashTable12kMaxCapacityE"] - pub static PLDHashTable_consts_kMaxCapacity: ::std::os::raw::c_uint; + pub static PLDHashTable_kMaxCapacity: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable12kMinCapacityE"] - pub static PLDHashTable_consts_kMinCapacity: ::std::os::raw::c_uint; + pub static PLDHashTable_kMinCapacity: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable17kMaxInitialLengthE"] - pub static PLDHashTable_consts_kMaxInitialLength: ::std::os::raw::c_uint; + pub static PLDHashTable_kMaxInitialLength: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable21kDefaultInitialLengthE"] - pub static PLDHashTable_consts_kDefaultInitialLength: - ::std::os::raw::c_uint; + pub static PLDHashTable_kDefaultInitialLength: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable9kHashBitsE"] - pub static PLDHashTable_consts_kHashBits: ::std::os::raw::c_uint; + pub static PLDHashTable_kHashBits: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable12kGoldenRatioE"] - pub static PLDHashTable_consts_kGoldenRatio: ::std::os::raw::c_uint; + pub static PLDHashTable_kGoldenRatio: u32; +} +extern "C" { #[link_name = "_ZN12PLDHashTable14kCollisionFlagE"] - pub static PLDHashTable_consts_kCollisionFlag: ::std::os::raw::c_uint; + pub static PLDHashTable_kCollisionFlag: PLDHashNumber; +} +#[test] +fn bindgen_test_layout_PLDHashTable() { + assert_eq!(::std::mem::size_of::<PLDHashTable>() , 40usize); + assert_eq!(::std::mem::align_of::<PLDHashTable>() , 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::<PLDHashTableOps>() , 40usize); + assert_eq!(::std::mem::align_of::<PLDHashTableOps>() , 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::<PLDHashEntryHdr>() , 4usize); + assert_eq!(::std::mem::align_of::<PLDHashEntryHdr>() , 4usize); +} +impl Clone for PLDHashEntryHdr { + fn clone(&self) -> Self { *self } } pub type PLDHashHashKey = ::std::option::Option<unsafe extern "C" fn(aKey: *const ::std::os::raw::c_void) - -> PLDHashNumber>; + -> ::std::os::raw::c_uint>; pub type PLDHashMatchEntry = ::std::option::Option<unsafe extern "C" fn(aEntry: *const PLDHashEntryHdr, aKey: @@ -2630,122 +5056,403 @@ pub type PLDHashInitEntry = ::std::option::Option<unsafe extern "C" fn(aEntry: *mut PLDHashEntryHdr, aKey: *const ::std::os::raw::c_void)>; +/** + * hashkey wrapper using T* KeyType + * + * @see nsTHashtable::EntryType for specification + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsPtrHashKey<T> { + pub _base: PLDHashEntryHdr, + pub mKey: *mut T, +} +pub type nsPtrHashKey_KeyType<T> = *mut T; +pub type nsPtrHashKey_KeyTypePointer<T> = *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. + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsIContent { + pub _base: nsINode, +} +pub type nsIContent_IMEState = IMEState; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIContent_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIContent__bindgen_ty_bindgen_id_112977 { + eAllChildren = 0, + eAllButXBL = 1, + eSkipPlaceholderContent = 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 + * of the first matching value. If there was no attribute at all, then + * we return ATTR_MISSING. If there was an attribute but it didn't + * match, we return ATTR_VALUE_NO_MATCH. A non-negative result always + * indicates a match. + * + * @param aNameSpaceID The namespace ID of the attribute. Must not + * be kNameSpaceID_Unknown. + * @param aName The name atom of the attribute. Must not be null. + * @param aValues a nullptr-terminated array of pointers to atom values to test + * against. + * @param aCaseSensitive Whether to do a case-sensitive compare on the values. + * @return ATTR_MISSING, ATTR_VALUE_NO_MATCH or the non-negative index + * indicating the first value of aValues that matched + */ +pub type nsIContent_AttrValuesArray = *const *mut nsIAtom; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIContent_ETabFocusType { + eTabFocus_formElementsMask = 2, + eTabFocus_linksMask = 4, + eTabFocus_any = 7, +} +extern "C" { + #[link_name = "_ZN10nsIContent14sTabFocusModelE"] + pub static mut nsIContent_sTabFocusModel: i32; +} +extern "C" { + #[link_name = "_ZN10nsIContent26sTabFocusModelAppliesToXULE"] + pub static mut nsIContent_sTabFocusModelAppliesToXUL: bool; +} +#[test] +fn bindgen_test_layout_nsIContent() { + assert_eq!(::std::mem::size_of::<nsIContent>() , 104usize); + assert_eq!(::std::mem::align_of::<nsIContent>() , 8usize); +} +/** + * Struct that stores info on an attribute. The name and value must either both + * be null or both be non-null. + * + * Note that, just as the pointers returned by GetAttrNameAt, the pointers that + * this struct hold are only valid until the element or its attributes are + * mutated (directly or via script). + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct PLDHashTableOps { - pub hashKey: PLDHashHashKey, - pub matchEntry: PLDHashMatchEntry, - pub moveEntry: PLDHashMoveEntry, - pub clearEntry: PLDHashClearEntry, - pub initEntry: PLDHashInitEntry, +pub struct BorrowedAttrInfo { + pub mName: *const nsAttrName, + pub mValue: *const nsAttrValue, +} +#[test] +fn bindgen_test_layout_BorrowedAttrInfo() { + assert_eq!(::std::mem::size_of::<BorrowedAttrInfo>() , 16usize); + assert_eq!(::std::mem::align_of::<BorrowedAttrInfo>() , 8usize); } -impl ::std::clone::Clone for PLDHashTableOps { +impl Clone for BorrowedAttrInfo { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_PLDHashTableOps() { - assert_eq!(::std::mem::size_of::<PLDHashTableOps>() , 40usize); - assert_eq!(::std::mem::align_of::<PLDHashTableOps>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsICSSDeclaration { + pub _address: u8, +} +impl Clone for nsICSSDeclaration { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct PLDHashEntryStub { - pub _base: PLDHashEntryHdr, - pub key: *const ::std::os::raw::c_void, +pub struct AudioContext { + pub _address: u8, +} +impl Clone for AudioContext { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct Element { + pub _base: FragmentOrElement, + pub mState: EventStates, } -impl ::std::clone::Clone for PLDHashEntryStub { +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Element_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Element_MappedAttributeEntry { + pub attribute: *mut *mut nsIAtom, +} +#[test] +fn bindgen_test_layout_Element_MappedAttributeEntry() { + assert_eq!(::std::mem::size_of::<Element_MappedAttributeEntry>() , + 8usize); + assert_eq!(::std::mem::align_of::<Element_MappedAttributeEntry>() , + 8usize); +} +impl Clone for Element_MappedAttributeEntry { fn clone(&self) -> Self { *self } } +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element18kFireMutationEventE"] + pub static Element_kFireMutationEvent: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element22kDontFireMutationEventE"] + pub static Element_kDontFireMutationEvent: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element24kNotifyDocumentObserversE"] + pub static Element_kNotifyDocumentObservers: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element28kDontNotifyDocumentObserversE"] + pub static Element_kDontNotifyDocumentObservers: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element17kCallAfterSetAttrE"] + pub static Element_kCallAfterSetAttr: bool; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom7Element21kDontCallAfterSetAttrE"] + pub static Element_kDontCallAfterSetAttr: bool; +} #[test] -fn bindgen_test_layout_PLDHashEntryStub() { - assert_eq!(::std::mem::size_of::<PLDHashEntryStub>() , 16usize); - assert_eq!(::std::mem::align_of::<PLDHashEntryStub>() , 8usize); +fn bindgen_test_layout_Element() { + assert_eq!(::std::mem::size_of::<Element>() , 136usize); + assert_eq!(::std::mem::align_of::<Element>() , 8usize); } -/** - * a base class for templated hashtables. - * - * Clients will rarely need to use this class directly. Check the derived - * classes first, to see if they will meet your needs. - * - * @param EntryType the templated entry-type class that is managed by the - * hashtable. <code>EntryType</code> must extend the following declaration, - * and <strong>must not declare any virtual functions or derive from classes - * with virtual functions.</strong> Any vtable pointer would break the - * PLDHashTable code. - *<pre> class EntryType : public PLDHashEntryHdr - * { - * public: or friend nsTHashtable<EntryType>; - * // KeyType is what we use when Get()ing or Put()ing this entry - * // this should either be a simple datatype (uint32_t, nsISupports*) or - * // a const reference (const nsAString&) - * typedef something KeyType; - * // KeyTypePointer is the pointer-version of KeyType, because - * // PLDHashTable.h requires keys to cast to <code>const void*</code> - * typedef const something* KeyTypePointer; - * - * EntryType(KeyTypePointer aKey); - * - * // A copy or C++11 Move constructor must be defined, even if - * // AllowMemMove() == true, otherwise you will cause link errors. - * EntryType(const EntryType& aEnt); // Either this... - * EntryType(EntryType&& aEnt); // ...or this - * - * // the destructor must be defined... or you will cause link errors! - * ~EntryType(); - * - * // KeyEquals(): does this entry match this key? - * bool KeyEquals(KeyTypePointer aKey) const; - * - * // KeyToPointer(): Convert KeyType to KeyTypePointer - * static KeyTypePointer KeyToPointer(KeyType aKey); - * - * // HashKey(): calculate the hash number - * static PLDHashNumber HashKey(KeyTypePointer aKey); - * - * // ALLOW_MEMMOVE can we move this class with memmove(), or do we have - * // to use the copy constructor? - * enum { ALLOW_MEMMOVE = true/false }; - * }</pre> - * - * @see nsInterfaceHashtable - * @see nsDataHashtable - * @see nsClassHashtable - * @author "Benjamin Smedberg <bsmedberg@covad.net>" - */ #[repr(C)] -pub struct nsTHashtable<EntryType> { - pub mTable: PLDHashTable, - pub _phantom0: ::std::marker::PhantomData<EntryType>, +#[derive(Debug)] +pub struct FragmentOrElement { + pub _base: nsIContent, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + /** + * Array containing all attributes and children for this element + */ + pub mAttrsAndChildren: nsAttrAndChildArray, +} +pub type FragmentOrElement_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FragmentOrElement_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_FragmentOrElement_cycleCollection() { + assert_eq!(::std::mem::size_of::<FragmentOrElement_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<FragmentOrElement_cycleCollection>() , + 8usize); +} +impl Clone for FragmentOrElement_cycleCollection { + fn clone(&self) -> Self { *self } } +/** + * There are a set of DOM- and scripting-specific instance variables + * that may only be instantiated when a content object is accessed + * through the DOM. Rather than burn actual slots in the content + * objects for each of these instance variables, we put them off + * in a side structure that's only allocated when the content is + * accessed through the DOM. + */ #[repr(C)] #[derive(Debug)] -pub struct nsTHashtable_Iterator<EntryType> { - pub _base: PLDHashTable_Iterator, - pub _phantom0: ::std::marker::PhantomData<EntryType>, +pub struct FragmentOrElement_nsDOMSlots { + pub _base: nsINode_nsSlots, + /** + * The .style attribute (an interface that forwards to the actual + * style rules) + * @see nsGenericHTMLElement::GetStyle + */ + pub mStyle: nsCOMPtr<nsICSSDeclaration>, + /** + * The .dataset attribute. + * @see nsGenericHTMLElement::GetDataset + */ + pub mDataset: *mut nsDOMStringMap, + /** + * The .undoManager property. + * @see nsGenericHTMLElement::GetUndoManager + */ + pub mUndoManager: RefPtr<UndoManager>, + /** + * SMIL Overridde style rules (for SMIL animation of CSS properties) + * @see nsIContent::GetSMILOverrideStyle + */ + pub mSMILOverrideStyle: nsCOMPtr<nsICSSDeclaration>, + /** + * Holds any SMIL override style declaration for this element. + */ + pub mSMILOverrideStyleDeclaration: RefPtr<Declaration>, + /** + * An object implementing nsIDOMMozNamedAttrMap for this content (attributes) + * @see FragmentOrElement::GetAttributes + */ + pub mAttributeMap: RefPtr<nsDOMAttributeMap>, + pub __bindgen_anon_1: FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307, + /** + * An object implementing the .children property for this element. + */ + pub mChildrenList: RefPtr<nsContentList>, + /** + * An object implementing the .classList property for this element. + */ + pub mClassList: RefPtr<nsDOMTokenList>, + /** + * ShadowRoot bound to the element. + */ + pub mShadowRoot: RefPtr<ShadowRoot>, + /** + * The root ShadowRoot of this element if it is in a shadow tree. + */ + pub mContainingShadow: RefPtr<ShadowRoot>, + /** + * An array of web component insertion points to which this element + * is distributed. + */ + pub mDestInsertionPoints: nsTArray<*mut nsIContent>, + /** + * XBL binding installed on the element. + */ + pub mXBLBinding: RefPtr<nsXBLBinding>, + /** + * XBL binding installed on the lement. + */ + pub mXBLInsertionParent: nsCOMPtr<nsIContent>, + /** + * Web components custom element data. + */ + pub mCustomElementData: RefPtr<CustomElementData>, } #[repr(C)] #[derive(Debug, Copy)] -pub struct VoidPtrHashKey { - pub _base: [u64; 2usize], +pub struct FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307 { + /** + * The nearest enclosing content node with a binding that created us. + * @see FragmentOrElement::GetBindingParent + */ + pub mBindingParent: __BindgenUnionField<*mut nsIContent>, + /** + * The controllers of the XUL Element. + */ + pub mControllers: __BindgenUnionField<*mut nsIControllers>, + pub bindgen_union_field: u64, +} +#[test] +fn bindgen_test_layout_FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307() { + assert_eq!(::std::mem::size_of::<FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307>() + , 8usize); + assert_eq!(::std::mem::align_of::<FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307>() + , 8usize); } -impl ::std::clone::Clone for VoidPtrHashKey { +impl Clone for FragmentOrElement_nsDOMSlots__bindgen_ty_bindgen_id_114307 { fn clone(&self) -> Self { *self } } +#[test] +fn bindgen_test_layout_FragmentOrElement_nsDOMSlots() { + assert_eq!(::std::mem::size_of::<FragmentOrElement_nsDOMSlots>() , + 168usize); + assert_eq!(::std::mem::align_of::<FragmentOrElement_nsDOMSlots>() , + 8usize); +} +extern "C" { + #[link_name = + "_ZN7mozilla3dom17FragmentOrElement21_cycleCollectorGlobalE"] + pub static mut FragmentOrElement__cycleCollectorGlobal: + FragmentOrElement_cycleCollection; +} +#[test] +fn bindgen_test_layout_FragmentOrElement() { + assert_eq!(::std::mem::size_of::<FragmentOrElement>() , 128usize); + assert_eq!(::std::mem::align_of::<FragmentOrElement>() , 8usize); +} #[repr(C)] -pub struct nsDataHashtable; -pub type nsLoadFlags = u32; +#[derive(Debug, Copy)] +pub struct nsIWeakReference { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIWeakReference_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIWeakReference() { + assert_eq!(::std::mem::size_of::<nsIWeakReference>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIWeakReference>() , 8usize); +} +impl Clone for nsIWeakReference { + fn clone(&self) -> Self { *self } +} +pub type nsWeakPtr = nsCOMPtr<nsIWeakReference>; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PrefSetting { + pub _address: u8, +} +impl Clone for PrefSetting { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIChannel { + pub _base: nsIRequest, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIChannel_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIChannel__bindgen_ty_bindgen_id_129733 { + LOAD_DOCUMENT_URI = 65536, + LOAD_RETARGETED_DOCUMENT_URI = 131072, + LOAD_REPLACE = 262144, + LOAD_INITIAL_DOCUMENT_URI = 524288, + LOAD_TARGETED = 1048576, + LOAD_CALL_CONTENT_SNIFFERS = 2097152, + LOAD_CLASSIFY_URI = 4194304, + LOAD_MEDIA_SNIFFER_OVERRIDES_CONTENT_TYPE = 8388608, + LOAD_EXPLICIT_CREDENTIALS = 16777216, + LOAD_BYPASS_SERVICE_WORKER = 33554432, +} +#[test] +fn bindgen_test_layout_nsIChannel() { + assert_eq!(::std::mem::size_of::<nsIChannel>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIChannel>() , 8usize); +} +impl Clone for nsIChannel { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsIRequest { pub _base: nsISupports, } #[repr(C)] -pub struct _vftable_nsIRequest { - pub _base: _vftable_nsISupports, +#[derive(Debug, Copy, Clone)] +pub struct nsIRequest_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsIRequest_nsIRequest_h_unnamed_7 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIRequest__bindgen_ty_bindgen_id_129571 { LOAD_REQUESTMASK = 65535, LOAD_NORMAL = 0, LOAD_BACKGROUND = 1, @@ -2760,29 +5467,91 @@ pub enum nsIRequest_nsIRequest_h_unnamed_7 { LOAD_ANONYMOUS = 16384, LOAD_FRESH_CONNECTION = 32768, } -impl ::std::clone::Clone for nsIRequest { +#[test] +fn bindgen_test_layout_nsIRequest() { + assert_eq!(::std::mem::size_of::<nsIRequest>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIRequest>() , 8usize); +} +impl Clone for nsIRequest { fn clone(&self) -> Self { *self } } -/** - * EventStates is the class used to represent the event states of nsIContent - * instances. These states are calculated by IntrinsicState() and - * ContentStatesChanged() has to be called when one of them changes thus - * informing the layout/style engine of the change. - * Event states are associated with pseudo-classes. - */ +pub type nsLoadFlags = u32; #[repr(C)] #[derive(Debug, Copy)] -pub struct EventStates { - pub mStates: ::std::os::raw::c_ulonglong, +pub struct nsILoadGroup { + pub _base: nsIRequest, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsILoadGroup_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsILoadGroup() { + assert_eq!(::std::mem::size_of::<nsILoadGroup>() , 8usize); + assert_eq!(::std::mem::align_of::<nsILoadGroup>() , 8usize); +} +impl Clone for nsILoadGroup { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsCOMArray_base { + pub mArray: nsTArray<*mut nsISupports>, +} +pub type nsCOMArray_base_nsBaseArrayEnumFunc = + ::std::option::Option<unsafe extern "C" fn(aElement: + *mut ::std::os::raw::c_void, + aData: + *mut ::std::os::raw::c_void) + -> bool>; +pub type nsCOMArray_base_nsBaseArrayComparatorFunc = + ::std::option::Option<unsafe extern "C" fn(aElement1: *mut nsISupports, + aElement2: *mut nsISupports, + aData: + *mut ::std::os::raw::c_void) + -> ::std::os::raw::c_int>; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsCOMArray_base_nsCOMArrayComparatorContext { + pub mComparatorFunc: nsCOMArray_base_nsBaseArrayComparatorFunc, + pub mData: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_nsCOMArray_base_nsCOMArrayComparatorContext() { + assert_eq!(::std::mem::size_of::<nsCOMArray_base_nsCOMArrayComparatorContext>() + , 16usize); + assert_eq!(::std::mem::align_of::<nsCOMArray_base_nsCOMArrayComparatorContext>() + , 8usize); } -impl ::std::clone::Clone for EventStates { +impl Clone for nsCOMArray_base_nsCOMArrayComparatorContext { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_EventStates() { - assert_eq!(::std::mem::size_of::<EventStates>() , 8usize); - assert_eq!(::std::mem::align_of::<EventStates>() , 8usize); +fn bindgen_test_layout_nsCOMArray_base() { + assert_eq!(::std::mem::size_of::<nsCOMArray_base>() , 8usize); + assert_eq!(::std::mem::align_of::<nsCOMArray_base>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsCOMArray<T> { + pub _base: nsCOMArray_base, + pub _phantom_0: ::std::marker::PhantomData<T>, } +pub type nsCOMArray_nsCOMArrayEnumFunc<T> = + ::std::option::Option<unsafe extern "C" fn(aElement: *mut T, + aData: + *mut ::std::os::raw::c_void) + -> bool>; +pub type nsCOMArray_nsCOMArrayComparatorFunc<T> = + ::std::option::Option<unsafe extern "C" fn(aElement1: *mut T, + aElement2: *mut T, + aData: + *mut ::std::os::raw::c_void) + -> ::std::os::raw::c_int>; +#[repr(u32)] /** * Enum defining the mode in which a sheet is to be parsed. This is * usually, but not always, the same as the cascade level at which the @@ -2804,8 +5573,7 @@ fn bindgen_test_layout_EventStates() { * styling of anonymous box pseudo-elements can violate layout * invariants. */ -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum SheetParsingMode { eAuthorSheetFeatures = 0, eUserSheetFeatures = 1, @@ -2823,38 +5591,907 @@ pub enum SheetParsingMode { pub struct HandleRefPtr<T> { pub mHandle: T, } -pub enum nsAttrAndChildArray { } -pub enum nsChildContentList { } -pub enum nsCSSSelectorList { } -pub enum nsDOMAttributeMap { } -pub enum nsIAnimationObserver { } -pub enum nsIDOMElement { } -pub enum nsIDOMNodeList { } -pub enum nsIEditor { } -pub enum nsIFrame { } -pub enum nsINodeList { } -pub enum nsNodeSupportsWeakRefTearoff { } -pub enum nsNodeWeakReference { } -pub enum nsDOMMutationObserver { } -pub enum ServoNodeData { } -pub enum EventListenerManager { } -pub enum AccessibleNode { } -pub enum BoxQuadOptions { } -pub enum ConvertCoordinateOptions { } -pub enum DOMPoint { } -pub enum DOMQuad { } -pub enum DOMRectReadOnly { } -pub enum Element { } -pub enum Text { } -pub enum TextOrElementOrDocument { } -pub enum DOMPointInit { } -pub const NODE_IS_DIRTY_FOR_SERVO: nsINode_h_unnamed_8 = - nsINode_h_unnamed_8::NODE_SHARED_RESTYLE_BIT_1; -pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: nsINode_h_unnamed_8 = - nsINode_h_unnamed_8::NODE_SHARED_RESTYLE_BIT_2; +#[repr(C)] +#[derive(Debug)] +pub struct nsAttrValue { + pub mBits: usize, +} +pub type nsAttrValue_AtomArray = nsTArray<nsCOMPtr<nsIAtom>>; +pub const nsAttrValue_ValueType_eSVGTypesBegin: nsAttrValue_ValueType = + nsAttrValue_ValueType::eSVGAngle; +pub const nsAttrValue_ValueType_eSVGTypesEnd: nsAttrValue_ValueType = + nsAttrValue_ValueType::eSVGViewBox; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsAttrValue_ValueType { + eString = 0, + eAtom = 2, + eInteger = 3, + eColor = 7, + eEnum = 11, + ePercent = 15, + eGeckoCSSDeclaration = 16, + eServoCSSDeclaration = 17, + eURL = 18, + eImage = 19, + eAtomArray = 20, + eDoubleValue = 21, + eIntMarginValue = 22, + eSVGAngle = 23, + eSVGIntegerPair = 24, + eSVGLength = 25, + eSVGLengthList = 26, + eSVGNumberList = 27, + eSVGNumberPair = 28, + eSVGPathData = 29, + eSVGPointList = 30, + eSVGPreserveAspectRatio = 31, + eSVGStringList = 32, + eSVGTransformList = 33, + eSVGViewBox = 34, +} +/** + * Structure for a mapping from int (enum) values to strings. When you use + * it you generally create an array of them. + * Instantiate like this: + * EnumTable myTable[] = { + * { "string1", 1 }, + * { "string2", 2 }, + * { nullptr, 0 } + * } + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsAttrValue_EnumTable { + /** The string the value maps to */ + pub tag: *const ::std::os::raw::c_char, + /** The enum value that maps to this string */ + pub value: i16, +} +#[test] +fn bindgen_test_layout_nsAttrValue_EnumTable() { + assert_eq!(::std::mem::size_of::<nsAttrValue_EnumTable>() , 16usize); + assert_eq!(::std::mem::align_of::<nsAttrValue_EnumTable>() , 8usize); +} +impl Clone for nsAttrValue_EnumTable { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsAttrValue_ValueBaseType { + eStringBase = 0, + eOtherBase = 1, + eAtomBase = 2, + eIntegerBase = 3, +} +extern "C" { + #[link_name = "_ZN11nsAttrValue15sEnumTableArrayE"] + pub static mut nsAttrValue_sEnumTableArray: + *mut nsTArray<*const nsAttrValue_EnumTable>; +} +#[test] +fn bindgen_test_layout_nsAttrValue() { + assert_eq!(::std::mem::size_of::<nsAttrValue>() , 8usize); + assert_eq!(::std::mem::align_of::<nsAttrValue>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsNodeInfoManager { + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mNodeInfoHash: *mut PLHashTable, + pub mDocument: *mut nsIDocument, + pub mNonDocumentNodeInfos: u32, + pub mPrincipal: nsCOMPtr<nsIPrincipal>, + pub mDefaultPrincipal: nsCOMPtr<nsIPrincipal>, + pub mTextNodeInfo: *mut NodeInfo, + pub mCommentNodeInfo: *mut NodeInfo, + pub mDocumentNodeInfo: *mut NodeInfo, + pub mBindingManager: RefPtr<nsBindingManager>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsNodeInfoManager_cycleCollection { + pub _base: nsCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_nsNodeInfoManager_cycleCollection() { + assert_eq!(::std::mem::size_of::<nsNodeInfoManager_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsNodeInfoManager_cycleCollection>() , + 8usize); +} +impl Clone for nsNodeInfoManager_cycleCollection { + fn clone(&self) -> Self { *self } +} +pub type nsNodeInfoManager_HasThreadSafeRefCnt = FalseType; +extern "C" { + #[link_name = "_ZN17nsNodeInfoManager21_cycleCollectorGlobalE"] + pub static mut nsNodeInfoManager__cycleCollectorGlobal: + nsNodeInfoManager_cycleCollection; +} +#[test] +fn bindgen_test_layout_nsNodeInfoManager() { + assert_eq!(::std::mem::size_of::<nsNodeInfoManager>() , 88usize); + assert_eq!(::std::mem::align_of::<nsNodeInfoManager>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct NodeInfo { + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mDocument: *mut nsIDocument, + pub mInner: NodeInfo_NodeInfoInner, + pub mOwnerManager: RefPtr<nsNodeInfoManager>, + pub mQualifiedName: nsString, + pub mNodeName: nsString, + pub mLocalName: nsString, +} +pub type NodeInfo_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct NodeInfo_cycleCollection { + pub _base: nsCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_NodeInfo_cycleCollection() { + assert_eq!(::std::mem::size_of::<NodeInfo_cycleCollection>() , 16usize); + assert_eq!(::std::mem::align_of::<NodeInfo_cycleCollection>() , 8usize); +} +impl Clone for NodeInfo_cycleCollection { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct NodeInfo_NodeInfoInner { + pub mName: nsCOMPtr<nsIAtom>, + pub mPrefix: nsCOMPtr<nsIAtom>, + pub mNamespaceID: i32, + pub mNodeType: u16, + pub mNameString: *const nsAString_internal, + pub mExtraName: nsCOMPtr<nsIAtom>, +} +#[test] +fn bindgen_test_layout_NodeInfo_NodeInfoInner() { + assert_eq!(::std::mem::size_of::<NodeInfo_NodeInfoInner>() , 40usize); + assert_eq!(::std::mem::align_of::<NodeInfo_NodeInfoInner>() , 8usize); +} +extern "C" { + #[link_name = "_ZN7mozilla3dom8NodeInfo21_cycleCollectorGlobalE"] + pub static mut NodeInfo__cycleCollectorGlobal: NodeInfo_cycleCollection; +} +#[test] +fn bindgen_test_layout_NodeInfo() { + assert_eq!(::std::mem::size_of::<NodeInfo>() , 120usize); + assert_eq!(::std::mem::align_of::<NodeInfo>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsBindingManager { + pub _address: u8, +} +impl Clone for nsBindingManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIFrame { + pub _address: u8, +} +impl Clone for nsIFrame { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsPropertyTable { + pub mPropertyList: *mut nsPropertyTable_PropertyList, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsPropertyTable_PropertyList { + pub _address: u8, +} +impl Clone for nsPropertyTable_PropertyList { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_nsPropertyTable() { + assert_eq!(::std::mem::size_of::<nsPropertyTable>() , 8usize); + assert_eq!(::std::mem::align_of::<nsPropertyTable>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsAttrAndChildArray { + pub mImpl: *mut nsAttrAndChildArray_Impl, +} +pub type nsAttrAndChildArray_BorrowedAttrInfo = BorrowedAttrInfo; +#[repr(C)] +#[derive(Debug)] +pub struct nsAttrAndChildArray_InternalAttr { + pub mName: nsAttrName, + pub mValue: nsAttrValue, +} +#[test] +fn bindgen_test_layout_nsAttrAndChildArray_InternalAttr() { + assert_eq!(::std::mem::size_of::<nsAttrAndChildArray_InternalAttr>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsAttrAndChildArray_InternalAttr>() , + 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsAttrAndChildArray_Impl { + pub mAttrAndChildCount: u32, + pub mBufferSize: u32, + pub mMappedAttrs: *mut nsMappedAttributes, + pub mBuffer: [*mut ::std::os::raw::c_void; 1usize], +} +#[test] +fn bindgen_test_layout_nsAttrAndChildArray_Impl() { + assert_eq!(::std::mem::size_of::<nsAttrAndChildArray_Impl>() , 24usize); + assert_eq!(::std::mem::align_of::<nsAttrAndChildArray_Impl>() , 8usize); +} +impl Clone for nsAttrAndChildArray_Impl { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_nsAttrAndChildArray() { + assert_eq!(::std::mem::size_of::<nsAttrAndChildArray>() , 8usize); + assert_eq!(::std::mem::align_of::<nsAttrAndChildArray>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsChildContentList { + pub _address: u8, +} +impl Clone for nsChildContentList { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsDOMAttributeMap { + pub _base: nsIDOMMozNamedAttrMap, + pub _base_1: nsWrapperCache, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mContent: nsCOMPtr<Element>, + /** + * Cache of Attrs. + */ + pub mAttributeCache: nsDOMAttributeMap_AttrCache, +} +pub type nsDOMAttributeMap_Attr = Attr; +pub type nsDOMAttributeMap_Element = Element; +pub type nsDOMAttributeMap_ErrorResult = ErrorResult; +pub type nsDOMAttributeMap_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDOMAttributeMap_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_nsDOMAttributeMap_cycleCollection() { + assert_eq!(::std::mem::size_of::<nsDOMAttributeMap_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<nsDOMAttributeMap_cycleCollection>() , + 8usize); +} +impl Clone for nsDOMAttributeMap_cycleCollection { + fn clone(&self) -> Self { *self } +} +pub type nsDOMAttributeMap_AttrCache = [u64; 5usize]; +extern "C" { + #[link_name = "_ZN17nsDOMAttributeMap21_cycleCollectorGlobalE"] + pub static mut nsDOMAttributeMap__cycleCollectorGlobal: + nsDOMAttributeMap_cycleCollection; +} +#[test] +fn bindgen_test_layout_nsDOMAttributeMap() { + assert_eq!(::std::mem::size_of::<nsDOMAttributeMap>() , 96usize); + assert_eq!(::std::mem::align_of::<nsDOMAttributeMap>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIDOMMozNamedAttrMap { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIDOMMozNamedAttrMap_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsIDOMMozNamedAttrMap() { + assert_eq!(::std::mem::size_of::<nsIDOMMozNamedAttrMap>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIDOMMozNamedAttrMap>() , 8usize); +} +impl Clone for nsIDOMMozNamedAttrMap { + fn clone(&self) -> Self { *self } +} +/** + * Presentation shell interface. Presentation shells are the + * controlling point for managing the presentation of a document. The + * presentation shell holds a live reference to the document, the + * presentation context, the style manager, the style set and the root + * frame. <p> + * + * When this object is Release'd, it will release the document, the + * presentation context, the style manager, the style set and the root + * frame. + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsIPresShell { + pub _base: nsISupports, + pub mDocument: nsCOMPtr<nsIDocument>, + pub mPresContext: RefPtr<nsPresContext>, + pub mStyleSet: StyleSetHandle, + pub mFrameConstructor: *mut nsCSSFrameConstructor, + pub mViewManager: *mut nsViewManager, + pub mFrameArena: nsPresArena, + pub mSelection: RefPtr<nsFrameSelection>, + pub mFrameManager: *mut nsFrameManagerBase, + pub mForwardingContainer: u64, + pub mHiddenInvalidationObserverRefreshDriver: *mut nsRefreshDriver, + pub mDocAccessible: *mut DocAccessible, + pub mReflowContinueTimer: nsCOMPtr<nsITimer>, + pub mPaintCount: u64, + pub mScrollPositionClampingScrollPortSize: nsSize, + pub mWeakFrames: *mut nsWeakFrame, + pub mCanvasBackgroundColor: nscolor, + pub mResolution: [u64; 2usize], + pub mSelectionFlags: i16, + pub mRenderFlags: nsIPresShell_RenderFlags, + pub _bitfield_1: u16, + pub mPresShellId: u32, + pub mChangedScopeStyleRoots: [u64; 3usize], + pub mFontSizeInflationEmPerLine: u32, + pub mFontSizeInflationMinTwips: u32, + pub mFontSizeInflationLineThreshold: u32, + pub mFontSizeInflationForceEnabled: bool, + pub mFontSizeInflationDisabledInMasterProcess: bool, + pub mFontSizeInflationEnabled: bool, + pub mPaintingIsFrozen: bool, + pub mFontSizeInflationEnabledIsDirty: bool, + pub mIsNeverPainting: bool, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIPresShell_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +pub type nsIPresShell_LayerManager = LayerManager; +pub type nsIPresShell_SourceSurface = SourceSurface; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_eRenderFlag { + STATE_IGNORING_VIEWPORT_SCROLLING = 1, + STATE_DRAWWINDOW_NOT_FLUSHING = 2, +} +pub type nsIPresShell_RenderFlags = u8; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_ScrollDirection { + eHorizontal = 0, + eVertical = 1, + eEither = 2, +} +#[repr(u32)] +/** + * Tell the pres shell that a frame needs to be marked dirty and needs + * Reflow. It's OK if this is an ancestor of the frame needing reflow as + * long as the ancestor chain between them doesn't cross a reflow root. + * + * The bit to add should be NS_FRAME_IS_DIRTY, NS_FRAME_HAS_DIRTY_CHILDREN + * or nsFrameState(0); passing 0 means that dirty bits won't be set on the + * frame or its ancestors/descendants, but that intrinsic widths will still + * be marked dirty. Passing aIntrinsicDirty = eResize and aBitToAdd = 0 + * would result in no work being done, so don't do that. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_IntrinsicDirty { + eResize = 0, + eTreeChange = 1, + eStyleChange = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_ReflowRootHandling { + ePositionOrSizeChange = 0, + 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; +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell__bindgen_ty_bindgen_id_148842 { + SCROLL_TOP = 0, + SCROLL_BOTTOM = 100, + SCROLL_CENTER = 50, + SCROLL_MINIMUM = -1, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_WhenToScroll { + SCROLL_ALWAYS = 0, + SCROLL_IF_NOT_VISIBLE = 1, + SCROLL_IF_NOT_FULLY_VISIBLE = 2, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIPresShell_ScrollAxis { + pub _bindgen_opaque_blob: u32, +} +#[test] +fn bindgen_test_layout_nsIPresShell_ScrollAxis() { + assert_eq!(::std::mem::size_of::<nsIPresShell_ScrollAxis>() , 4usize); + assert_eq!(::std::mem::align_of::<nsIPresShell_ScrollAxis>() , 4usize); +} +impl Clone for nsIPresShell_ScrollAxis { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsIPresShell_PointerCaptureInfo { + pub mPendingContent: nsCOMPtr<nsIContent>, + pub mOverrideContent: nsCOMPtr<nsIContent>, + pub mPrimaryState: bool, +} +#[test] +fn bindgen_test_layout_nsIPresShell_PointerCaptureInfo() { + assert_eq!(::std::mem::size_of::<nsIPresShell_PointerCaptureInfo>() , + 24usize); + assert_eq!(::std::mem::align_of::<nsIPresShell_PointerCaptureInfo>() , + 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIPresShell_PointerInfo { + pub mActiveState: bool, + pub mPointerType: u16, + pub mPrimaryState: bool, +} +#[test] +fn bindgen_test_layout_nsIPresShell_PointerInfo() { + assert_eq!(::std::mem::size_of::<nsIPresShell_PointerInfo>() , 6usize); + assert_eq!(::std::mem::align_of::<nsIPresShell_PointerInfo>() , 2usize); +} +impl Clone for nsIPresShell_PointerInfo { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_PaintFlags { + PAINT_LAYERS = 1, + PAINT_COMPOSITE = 2, + PAINT_SYNC_DECODE_IMAGES = 4, +} +#[repr(u32)] +/** + * Ensures that the refresh driver is running, and schedules a view + * manager flush on the next tick. + * + * @param aType PAINT_DELAYED_COMPRESS : Schedule a paint to be executed after a delay, and + * put FrameLayerBuilder in 'compressed' mode that avoids short cut optimizations. + */ +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsIPresShell_PaintType { + PAINT_DEFAULT = 0, + PAINT_DELAYED_COMPRESS = 1, +} +extern "C" { + #[link_name = "_ZN12nsIPresShell12gCaptureInfoE"] + pub static mut nsIPresShell_gCaptureInfo: CapturingContentInfo; +} +extern "C" { + #[link_name = "_ZN12nsIPresShell19gPointerCaptureListE"] + pub static mut nsIPresShell_gPointerCaptureList: *mut [u64; 5usize]; +} +extern "C" { + #[link_name = "_ZN12nsIPresShell18gActivePointersIdsE"] + pub static mut nsIPresShell_gActivePointersIds: *mut (); +} +extern "C" { + #[link_name = "_ZN12nsIPresShell14gKeyDownTargetE"] + pub static mut nsIPresShell_gKeyDownTarget: *mut nsIContent; +} +#[test] +fn bindgen_test_layout_nsIPresShell() { + assert_eq!(::std::mem::size_of::<nsIPresShell>() , 344usize); + assert_eq!(::std::mem::align_of::<nsIPresShell>() , 8usize); +} +impl nsIPresShell { + #[inline] + pub fn mStylesHaveChanged(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u16)) >> + 0u32) as u8) + } + } + #[inline] + pub fn set_mStylesHaveChanged(&mut self, val: bool) { + self._bitfield_1 &= !(1usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 0u32) & (1usize as u16); + } + #[inline] + pub fn mDidInitialize(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u16)) >> + 1u32) as u8) + } + } + #[inline] + pub fn set_mDidInitialize(&mut self, val: bool) { + self._bitfield_1 &= !(2usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 1u32) & (2usize as u16); + } + #[inline] + pub fn mIsDestroying(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4usize as u16)) >> + 2u32) as u8) + } + } + #[inline] + pub fn set_mIsDestroying(&mut self, val: bool) { + self._bitfield_1 &= !(4usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 2u32) & (4usize as u16); + } + #[inline] + pub fn mIsZombie(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8usize as u16)) >> + 3u32) as u8) + } + } + #[inline] + pub fn set_mIsZombie(&mut self, val: bool) { + self._bitfield_1 &= !(8usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 3u32) & (8usize as u16); + } + #[inline] + pub fn mIsReflowing(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (16usize as u16)) >> + 4u32) as u8) + } + } + #[inline] + pub fn set_mIsReflowing(&mut self, val: bool) { + self._bitfield_1 &= !(16usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 4u32) & (16usize as u16); + } + #[inline] + pub fn mPaintingSuppressed(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (32usize as u16)) >> + 5u32) as u8) + } + } + #[inline] + pub fn set_mPaintingSuppressed(&mut self, val: bool) { + self._bitfield_1 &= !(32usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 5u32) & (32usize as u16); + } + #[inline] + pub fn mIsThemeSupportDisabled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (64usize as u16)) >> + 6u32) as u8) + } + } + #[inline] + pub fn set_mIsThemeSupportDisabled(&mut self, val: bool) { + self._bitfield_1 &= !(64usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 6u32) & (64usize as u16); + } + #[inline] + pub fn mIsActive(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (128usize as u16)) >> + 7u32) as u8) + } + } + #[inline] + pub fn set_mIsActive(&mut self, val: bool) { + self._bitfield_1 &= !(128usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 7u32) & (128usize as u16); + } + #[inline] + pub fn mFrozen(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (256usize as u16)) >> + 8u32) as u8) + } + } + #[inline] + pub fn set_mFrozen(&mut self, val: bool) { + self._bitfield_1 &= !(256usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 8u32) & (256usize as u16); + } + #[inline] + pub fn mIsFirstPaint(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (512usize as u16)) >> + 9u32) as u8) + } + } + #[inline] + pub fn set_mIsFirstPaint(&mut self, val: bool) { + self._bitfield_1 &= !(512usize as u16); + self._bitfield_1 |= ((val as u8 as u16) << 9u32) & (512usize as u16); + } + #[inline] + pub fn mObservesMutationsForPrint(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1024usize as u16)) >> + 10u32) as u8) + } + } + #[inline] + pub fn set_mObservesMutationsForPrint(&mut self, val: bool) { + self._bitfield_1 &= !(1024usize as u16); + self._bitfield_1 |= + ((val as u8 as u16) << 10u32) & (1024usize as u16); + } + #[inline] + pub fn mReflowScheduled(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2048usize as u16)) >> + 11u32) as u8) + } + } + #[inline] + pub fn set_mReflowScheduled(&mut self, val: bool) { + self._bitfield_1 &= !(2048usize as u16); + self._bitfield_1 |= + ((val as u8 as u16) << 11u32) & (2048usize as u16); + } + #[inline] + pub fn mSuppressInterruptibleReflows(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (4096usize as u16)) >> + 12u32) as u8) + } + } + #[inline] + pub fn set_mSuppressInterruptibleReflows(&mut self, val: bool) { + self._bitfield_1 &= !(4096usize as u16); + self._bitfield_1 |= + ((val as u8 as u16) << 12u32) & (4096usize as u16); + } + #[inline] + pub fn mScrollPositionClampingScrollPortSizeSet(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (8192usize as u16)) >> + 13u32) as u8) + } + } + #[inline] + pub fn set_mScrollPositionClampingScrollPortSizeSet(&mut self, + val: bool) { + self._bitfield_1 &= !(8192usize as u16); + self._bitfield_1 |= + ((val as u8 as u16) << 13u32) & (8192usize as u16); + } +} +/** + * A class that implements nsIWeakReference + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsNodeWeakReference { + pub _base: nsIWeakReference, + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mNode: *mut nsINode, +} +pub type nsNodeWeakReference_HasThreadSafeRefCnt = FalseType; +#[test] +fn bindgen_test_layout_nsNodeWeakReference() { + assert_eq!(::std::mem::size_of::<nsNodeWeakReference>() , 32usize); + assert_eq!(::std::mem::align_of::<nsNodeWeakReference>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDOMMutationObserver { + pub _address: u8, +} +impl Clone for nsDOMMutationObserver { + fn clone(&self) -> Self { *self } +} +#[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, +} +impl Clone for BoxQuadOptions { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct ConvertCoordinateOptions { + pub _address: u8, +} +impl Clone for ConvertCoordinateOptions { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DOMPoint { + pub _address: u8, +} +impl Clone for DOMPoint { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DOMQuad { + pub _address: u8, +} +impl Clone for DOMQuad { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct DOMRectReadOnly { + pub _base: nsISupports, + pub _base_1: nsWrapperCache, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mParent: nsCOMPtr<nsISupports>, +} +pub type DOMRectReadOnly_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DOMRectReadOnly_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, +} +#[test] +fn bindgen_test_layout_DOMRectReadOnly_cycleCollection() { + assert_eq!(::std::mem::size_of::<DOMRectReadOnly_cycleCollection>() , + 16usize); + assert_eq!(::std::mem::align_of::<DOMRectReadOnly_cycleCollection>() , + 8usize); +} +impl Clone for DOMRectReadOnly_cycleCollection { + fn clone(&self) -> Self { *self } +} +extern "C" { + #[link_name = "_ZN7mozilla3dom15DOMRectReadOnly21_cycleCollectorGlobalE"] + pub static mut DOMRectReadOnly__cycleCollectorGlobal: + DOMRectReadOnly_cycleCollection; +} +#[test] +fn bindgen_test_layout_DOMRectReadOnly() { + assert_eq!(::std::mem::size_of::<DOMRectReadOnly>() , 56usize); + assert_eq!(::std::mem::align_of::<DOMRectReadOnly>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct OwningNodeOrString { + pub mType: OwningNodeOrString_Type, + pub mValue: OwningNodeOrString_Value, +} #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsINode_h_unnamed_8 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum OwningNodeOrString_Type { + eUninitialized = 0, + eNode = 1, + eString = 2, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct OwningNodeOrString_Value { + pub mNode: __BindgenUnionField<UnionMember<OwningNonNull<nsINode>>>, + pub mString: __BindgenUnionField<UnionMember<nsString>>, + pub bindgen_union_field: [u64; 2usize], +} +#[test] +fn bindgen_test_layout_OwningNodeOrString_Value() { + assert_eq!(::std::mem::size_of::<OwningNodeOrString_Value>() , 16usize); + assert_eq!(::std::mem::align_of::<OwningNodeOrString_Value>() , 8usize); +} +impl Clone for OwningNodeOrString_Value { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_OwningNodeOrString() { + assert_eq!(::std::mem::size_of::<OwningNodeOrString>() , 24usize); + assert_eq!(::std::mem::align_of::<OwningNodeOrString>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct TextOrElementOrDocument { + pub _address: u8, +} +impl Clone for TextOrElementOrDocument { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DOMPointInit { + pub _address: u8, +} +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 + = + _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_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; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _bindgen_ty_bindgen_id_150829 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -2882,388 +6519,379 @@ pub enum nsINode_h_unnamed_8 { NODE_SHARED_RESTYLE_BIT_2 = 16777216, NODE_TYPE_SPECIFIC_BITS_OFFSET = 23, } +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsContentList { + pub _address: u8, +} +impl Clone for nsContentList { + fn clone(&self) -> Self { *self } +} /** - * Class used to detect unexpected mutations. To use the class create an - * nsMutationGuard on the stack before unexpected mutations could occur. - * You can then at any time call Mutated to check if any unexpected mutations - * have occurred. + * The signature of the timer callback function passed to initWithFuncCallback. + * This is the function that will get called when the timer expires if the + * timer is initialized via initWithFuncCallback. + * + * @param aTimer the timer which has expired + * @param aClosure opaque parameter passed to initWithFuncCallback */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsMutationGuard { - pub mStartingGeneration: u64, +pub struct nsITimer { + pub _base: nsISupports, } -impl ::std::clone::Clone for nsMutationGuard { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsITimer_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsITimer__bindgen_ty_bindgen_id_167235 { + TYPE_ONE_SHOT = 0, + TYPE_REPEATING_SLACK = 1, + TYPE_REPEATING_PRECISE = 2, + TYPE_REPEATING_PRECISE_CAN_SKIP = 3, } #[test] -fn bindgen_test_layout_nsMutationGuard() { - assert_eq!(::std::mem::size_of::<nsMutationGuard>() , 8usize); - assert_eq!(::std::mem::align_of::<nsMutationGuard>() , 8usize); +fn bindgen_test_layout_nsITimer() { + assert_eq!(::std::mem::size_of::<nsITimer>() , 8usize); + assert_eq!(::std::mem::align_of::<nsITimer>() , 8usize); } -extern "C" { - #[link_name = "_ZN15nsMutationGuard11sGenerationE"] - pub static mut nsMutationGuard_consts_sGeneration: - ::std::os::raw::c_ulonglong; -} -pub type Float = f32; -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SurfaceType { - DATA = 0, - D2D1_BITMAP = 1, - D2D1_DRAWTARGET = 2, - CAIRO = 3, - CAIRO_IMAGE = 4, - COREGRAPHICS_IMAGE = 5, - COREGRAPHICS_CGCONTEXT = 6, - SKIA = 7, - DUAL_DT = 8, - D2D1_1_IMAGE = 9, - RECORDING = 10, - TILED = 11, -} -pub const A8R8G8B8_UINT32: SurfaceFormat = SurfaceFormat::B8G8R8A8; -pub const X8R8G8B8_UINT32: SurfaceFormat = SurfaceFormat::B8G8R8X8; -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SurfaceFormat { - B8G8R8A8 = 0, - B8G8R8X8 = 1, - R8G8B8A8 = 2, - R8G8B8X8 = 3, - A8R8G8B8 = 4, - X8R8G8B8 = 5, - R8G8B8 = 6, - B8G8R8 = 7, - R5G6B5_UINT16 = 8, - A8 = 9, - YUV = 10, - NV12 = 11, - YUV422 = 12, - HSV = 13, - Lab = 14, - Depth = 15, - UNKNOWN = 16, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FilterType { - BLEND = 0, - TRANSFORM = 1, - MORPHOLOGY = 2, - COLOR_MATRIX = 3, - FLOOD = 4, - TILE = 5, - TABLE_TRANSFER = 6, - DISCRETE_TRANSFER = 7, - LINEAR_TRANSFER = 8, - GAMMA_TRANSFER = 9, - CONVOLVE_MATRIX = 10, - DISPLACEMENT_MAP = 11, - TURBULENCE = 12, - ARITHMETIC_COMBINE = 13, - COMPOSITE = 14, - DIRECTIONAL_BLUR = 15, - GAUSSIAN_BLUR = 16, - POINT_DIFFUSE = 17, - POINT_SPECULAR = 18, - SPOT_DIFFUSE = 19, - SPOT_SPECULAR = 20, - DISTANT_DIFFUSE = 21, - DISTANT_SPECULAR = 22, - CROP = 23, - PREMULTIPLY = 24, - UNPREMULTIPLY = 25, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum DrawTargetType { - SOFTWARE_RASTER = 0, - HARDWARE_RASTER = 1, - VECTOR = 2, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum BackendType { - NONE = 0, - DIRECT2D = 1, - COREGRAPHICS = 2, - COREGRAPHICS_ACCELERATED = 3, - CAIRO = 4, - SKIA = 5, - RECORDING = 6, - DIRECT2D1_1 = 7, - BACKEND_LAST = 8, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FontType { - DWRITE = 0, - GDI = 1, - MAC = 2, - SKIA = 3, - CAIRO = 4, - COREGRAPHICS = 5, - FONTCONFIG = 6, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum NativeSurfaceType { - D3D10_TEXTURE = 0, - CAIRO_CONTEXT = 1, - CGCONTEXT = 2, - CGCONTEXT_ACCELERATED = 3, - OPENGL_TEXTURE = 4, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum NativeFontType { - DWRITE_FONT_FACE = 0, - GDI_FONT_FACE = 1, - MAC_FONT_FACE = 2, - SKIA_FONT_FACE = 3, - CAIRO_FONT_FACE = 4, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FontStyle { NORMAL = 0, ITALIC = 1, BOLD = 2, BOLD_ITALIC = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FontHinting { NONE = 0, LIGHT = 1, NORMAL = 2, FULL = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum CompositionOp { - OP_OVER = 0, - OP_ADD = 1, - OP_ATOP = 2, - OP_OUT = 3, - OP_IN = 4, - OP_SOURCE = 5, - OP_DEST_IN = 6, - OP_DEST_OUT = 7, - OP_DEST_OVER = 8, - OP_DEST_ATOP = 9, - OP_XOR = 10, - OP_MULTIPLY = 11, - OP_SCREEN = 12, - OP_OVERLAY = 13, - OP_DARKEN = 14, - OP_LIGHTEN = 15, - OP_COLOR_DODGE = 16, - OP_COLOR_BURN = 17, - OP_HARD_LIGHT = 18, - OP_SOFT_LIGHT = 19, - OP_DIFFERENCE = 20, - OP_EXCLUSION = 21, - OP_HUE = 22, - OP_SATURATION = 23, - OP_COLOR = 24, - OP_LUMINOSITY = 25, - OP_COUNT = 26, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum Axis { X_AXIS = 0, Y_AXIS = 1, BOTH = 2, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum ExtendMode { - CLAMP = 0, - REPEAT = 1, - REPEAT_X = 2, - REPEAT_Y = 3, - REFLECT = 4, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum FillRule { FILL_WINDING = 0, FILL_EVEN_ODD = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum AntialiasMode { NONE = 0, GRAY = 1, SUBPIXEL = 2, DEFAULT = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SamplingFilter { GOOD = 0, LINEAR = 1, POINT = 2, SENTINEL = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum PatternType { - COLOR = 0, - SURFACE = 1, - LINEAR_GRADIENT = 2, - RADIAL_GRADIENT = 3, -} -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum JoinStyle { BEVEL = 0, ROUND = 1, MITER = 2, MITER_OR_BEVEL = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum CapStyle { BUTT = 0, ROUND = 1, SQUARE = 2, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SamplingBounds { UNBOUNDED = 0, BOUNDED = 1, } -#[repr(C)] -#[derive(Debug, Copy)] -pub struct Color { - pub r: Float, - pub g: Float, - pub b: Float, - pub a: Float, -} -impl ::std::clone::Clone for Color { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_Color() { - assert_eq!(::std::mem::size_of::<Color>() , 16usize); - assert_eq!(::std::mem::align_of::<Color>() , 4usize); -} -#[repr(C)] -#[derive(Debug, Copy)] -pub struct GradientStop { - pub offset: Float, - pub color: Color, -} -impl ::std::clone::Clone for GradientStop { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_GradientStop() { - assert_eq!(::std::mem::size_of::<GradientStop>() , 20usize); - assert_eq!(::std::mem::align_of::<GradientStop>() , 4usize); +impl Clone for nsITimer { + fn clone(&self) -> Self { *self } } -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum JobStatus { Complete = 0, Wait = 1, Yield = 2, Error = 3, } -pub type gfxImageFormat = SurfaceFormat; +/** + * Data used to track the expiration state of an object. We promise that this + * is 32 bits so that objects that includes this as a field can pad and align + * efficiently. + */ #[repr(C)] #[derive(Debug, Copy)] -pub struct RectCorner; +pub struct nsExpirationState { + pub _bitfield_1: u32, +} #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum RectCorner_Types_h_unnamed_11 { - TopLeft = 0, - TopRight = 1, - BottomRight = 2, - BottomLeft = 3, - Count = 4, +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsExpirationState__bindgen_ty_bindgen_id_167711 { + NOT_TRACKED = 15, + MAX_INDEX_IN_GENERATION = 268435455, +} +#[test] +fn bindgen_test_layout_nsExpirationState() { + assert_eq!(::std::mem::size_of::<nsExpirationState>() , 4usize); + assert_eq!(::std::mem::align_of::<nsExpirationState>() , 4usize); } -impl ::std::clone::Clone for RectCorner { +impl Clone for nsExpirationState { fn clone(&self) -> Self { *self } } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum Side { - eSideTop = 0, - eSideRight = 1, - eSideBottom = 2, - eSideLeft = 3, +impl nsExpirationState { + #[inline] + pub fn mGeneration(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (15usize as u32)) >> + 0u32) as u32) + } + } + #[inline] + pub fn set_mGeneration(&mut self, val: u32) { + self._bitfield_1 &= !(15usize as u32); + self._bitfield_1 |= ((val as u32 as u32) << 0u32) & (15usize as u32); + } + #[inline] + pub fn mIndexInGeneration(&self) -> u32 { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & + (4294967280usize as u32)) >> 4u32) as + u32) + } + } + #[inline] + pub fn set_mIndexInGeneration(&mut self, val: u32) { + self._bitfield_1 &= !(4294967280usize as u32); + self._bitfield_1 |= + ((val as u32 as u32) << 4u32) & (4294967280usize as u32); + } } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SideBits { - eSideBitsNone = 0, - eSideBitsTop = 1, - eSideBitsRight = 2, - eSideBitsBottom = 4, - eSideBitsLeft = 8, - eSideBitsTopBottom = 5, - eSideBitsLeftRight = 10, - eSideBitsAll = 15, +#[repr(C)] +#[derive(Debug, Copy)] +pub struct PRCListStr { + pub next: *mut PRCList, + pub prev: *mut PRCList, +} +#[test] +fn bindgen_test_layout_PRCListStr() { + assert_eq!(::std::mem::size_of::<PRCListStr>() , 16usize); + assert_eq!(::std::mem::align_of::<PRCListStr>() , 8usize); +} +impl Clone for PRCListStr { + fn clone(&self) -> Self { *self } +} +pub type PRCList = PRCListStr; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UnionMember<T> { + pub mStorage: AlignedStorage2<T>, } -pub type nscoord = i32; #[repr(C)] -pub struct nsIntPoint { - pub _bindgen_opaque_blob: [u32; 2usize], +#[derive(Debug, Copy)] +pub struct imgIRequest { + pub _base: nsIRequest, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct imgIRequest_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum imgIRequest__bindgen_ty_bindgen_id_169133 { + STATUS_NONE = 0, + STATUS_SIZE_AVAILABLE = 1, + STATUS_LOAD_COMPLETE = 2, + STATUS_ERROR = 4, + STATUS_FRAME_COMPLETE = 8, + STATUS_DECODE_COMPLETE = 16, + STATUS_IS_ANIMATED = 32, + STATUS_HAS_TRANSPARENCY = 64, } #[test] -fn bindgen_test_layout_nsIntPoint() { - assert_eq!(::std::mem::size_of::<nsIntPoint>() , 8usize); - assert_eq!(::std::mem::align_of::<nsIntPoint>() , 4usize); +fn bindgen_test_layout_imgIRequest() { + assert_eq!(::std::mem::size_of::<imgIRequest>() , 8usize); + assert_eq!(::std::mem::align_of::<imgIRequest>() , 8usize); +} +impl Clone for imgIRequest { + fn clone(&self) -> Self { *self } } -/** - * These *_Simple types are used to map Gecko types to layout-equivalent but - * simpler Rust types, to aid Rust binding generation. - * - * If something in this types or the assertions below needs to change, ask - * bholley, heycam or emilio before! - * - * <div rustbindgen="true" replaces="nsPoint"> - */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsPoint { - pub x: nscoord, - pub y: nscoord, +pub struct nsHTMLCSSStyleSheet { + pub _address: u8, } -impl ::std::clone::Clone for nsPoint { +impl Clone for nsHTMLCSSStyleSheet { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsPoint() { - assert_eq!(::std::mem::size_of::<nsPoint>() , 8usize); - assert_eq!(::std::mem::align_of::<nsPoint>() , 4usize); +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsHTMLStyleSheet { + pub _address: u8, +} +impl Clone for nsHTMLStyleSheet { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIBFCacheEntry { + pub _address: u8, +} +impl Clone for nsIBFCacheEntry { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIDocumentEncoder { + pub _address: u8, +} +impl Clone for nsIDocumentEncoder { + fn clone(&self) -> Self { *self } } /** - * <div rustbindgen="true" replaces="nsMargin"> + * An internal interface */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsMargin { - pub top: nscoord, - pub right: nscoord, - pub bottom: nscoord, - pub left: nscoord, +pub struct nsIHTMLCollection { + pub _base: nsIDOMHTMLCollection, } -impl ::std::clone::Clone for nsMargin { - fn clone(&self) -> Self { *self } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIHTMLCollection_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsMargin() { - assert_eq!(::std::mem::size_of::<nsMargin>() , 16usize); - assert_eq!(::std::mem::align_of::<nsMargin>() , 4usize); +fn bindgen_test_layout_nsIHTMLCollection() { + assert_eq!(::std::mem::size_of::<nsIHTMLCollection>() , 8usize); + assert_eq!(::std::mem::align_of::<nsIHTMLCollection>() , 8usize); +} +impl Clone for nsIHTMLCollection { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIObjectLoadingContent { + pub _address: u8, +} +impl Clone for nsIObjectLoadingContent { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIStructuredCloneContainer { + pub _address: u8, +} +impl Clone for nsIStructuredCloneContainer { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsViewManager { + pub _address: u8, +} +impl Clone for nsViewManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsSMILAnimationController { + pub _address: u8, +} +impl Clone for nsSMILAnimationController { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct SVGAttrAnimationRuleProcessor { + pub _address: u8, +} +impl Clone for SVGAttrAnimationRuleProcessor { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Loader { + pub _address: u8, +} +impl Clone for Loader { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct ImageLoader { + pub _address: u8, +} +impl Clone for ImageLoader { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Animation { + pub _address: u8, +} +impl Clone for Animation { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct AnonymousContent { + pub _address: u8, +} +impl Clone for AnonymousContent { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct Attr { + pub _base: nsIAttribute, + pub _base_1: nsIDOMAttr, + pub mRefCnt: nsCycleCollectingAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mValue: nsString, } +pub type Attr_HasThreadSafeRefCnt = FalseType; #[repr(C)] -pub struct nsIntMargin { - pub _bindgen_opaque_blob: [u32; 4usize], +#[derive(Debug, Copy)] +pub struct Attr_cycleCollection { + pub _base: nsXPCOMCycleCollectionParticipant, } #[test] -fn bindgen_test_layout_nsIntMargin() { - assert_eq!(::std::mem::size_of::<nsIntMargin>() , 16usize); - assert_eq!(::std::mem::align_of::<nsIntMargin>() , 4usize); +fn bindgen_test_layout_Attr_cycleCollection() { + assert_eq!(::std::mem::size_of::<Attr_cycleCollection>() , 16usize); + assert_eq!(::std::mem::align_of::<Attr_cycleCollection>() , 8usize); +} +impl Clone for Attr_cycleCollection { + fn clone(&self) -> Self { *self } +} +extern "C" { + #[link_name = "_ZN7mozilla3dom4Attr21_cycleCollectorGlobalE"] + pub static mut Attr__cycleCollectorGlobal: Attr_cycleCollection; +} +extern "C" { + #[link_name = "_ZN7mozilla3dom4Attr12sInitializedE"] + pub static mut Attr_sInitialized: bool; +} +#[test] +fn bindgen_test_layout_Attr() { + assert_eq!(::std::mem::size_of::<Attr>() , 152usize); + assert_eq!(::std::mem::align_of::<Attr>() , 8usize); } #[repr(C)] -pub struct nsIntRect { - pub _bindgen_opaque_blob: [u32; 4usize], +#[derive(Debug)] +pub struct nsIAttribute { + pub _base: nsINode, + pub mAttrMap: RefPtr<nsDOMAttributeMap>, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsIAttribute_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsIntRect() { - assert_eq!(::std::mem::size_of::<nsIntRect>() , 16usize); - assert_eq!(::std::mem::align_of::<nsIntRect>() , 4usize); +fn bindgen_test_layout_nsIAttribute() { + assert_eq!(::std::mem::size_of::<nsIAttribute>() , 112usize); + assert_eq!(::std::mem::align_of::<nsIAttribute>() , 8usize); } -/** - * <div rustbindgen="true" replaces="nsRect"> - */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsRect { - pub x: nscoord, - pub y: nscoord, - pub width: nscoord, - pub height: nscoord, +pub struct FontFaceSet { + pub _address: u8, } -impl ::std::clone::Clone for nsRect { +impl Clone for FontFaceSet { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug)] +pub struct FrameRequestCallback { + pub _base: CallbackFunction, +} #[test] -fn bindgen_test_layout_nsRect() { - assert_eq!(::std::mem::size_of::<nsRect>() , 16usize); - assert_eq!(::std::mem::align_of::<nsRect>() , 4usize); +fn bindgen_test_layout_FrameRequestCallback() { + assert_eq!(::std::mem::size_of::<FrameRequestCallback>() , 56usize); + assert_eq!(::std::mem::align_of::<FrameRequestCallback>() , 8usize); } -pub enum AnimationEffectReadOnly { } -pub enum AnimationEffectReadOnlyAtoms { } -pub enum AnimationEffectTimingPropertiesAtoms { } -pub enum ComputedTimingPropertiesAtoms { } -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FullscreenRequest { + pub _address: u8, +} +impl Clone for FullscreenRequest { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct UndoManager { + pub _address: u8, +} +impl Clone for UndoManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct XPathEvaluator { + pub _address: u8, +} +impl Clone for XPathEvaluator { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum FillMode { None = 0, Forwards = 1, @@ -3272,8 +6900,8 @@ pub enum FillMode { Auto = 4, EndGuard_ = 5, } -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum PlaybackDirection { Normal = 0, Reverse = 1, @@ -3281,7 +6909,6 @@ pub enum PlaybackDirection { Alternate_reverse = 3, EndGuard_ = 4, } -pub type NativeType = AnimationEffectReadOnly; #[repr(C)] #[derive(Debug)] pub struct nsAttrName { @@ -3292,199 +6919,55 @@ fn bindgen_test_layout_nsAttrName() { assert_eq!(::std::mem::size_of::<nsAttrName>() , 8usize); assert_eq!(::std::mem::align_of::<nsAttrName>() , 8usize); } -pub type nscolor = u32; -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsHexColorType { NoAlpha = 0, AllowAlpha = 1, } -pub enum nsStyledElement { } -pub enum MiscContainer { } -pub enum ServoDeclarationBlock { } -pub enum Declaration { } -/** - * A class used to construct a nsString from a nsStringBuffer (we might - * want to move this to nsString at some point). - * - * WARNING: Note that nsCheapString doesn't take an explicit length -- it - * assumes the string is maximally large, given the nsStringBuffer's storage - * size. This means the given string buffer *must* be sized exactly correctly - * for the string it contains (including one byte for a null terminator). If - * it has any unused storage space, then that will result in bogus characters - * at the end of our nsCheapString. - */ #[repr(C)] -#[derive(Debug)] -pub struct nsCheapString { - pub _base: nsString, +#[derive(Debug, Copy)] +pub struct Declaration { + pub _address: u8, } -#[test] -fn bindgen_test_layout_nsCheapString() { - assert_eq!(::std::mem::size_of::<nsCheapString>() , 16usize); - assert_eq!(::std::mem::align_of::<nsCheapString>() , 8usize); +impl Clone for Declaration { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] -pub struct nsAttrValue { - pub mBits: usize, -} -pub const eSVGTypesBegin: nsAttrValue_ValueType = - nsAttrValue_ValueType::eSVGAngle; -pub const eSVGTypesEnd: nsAttrValue_ValueType = - nsAttrValue_ValueType::eSVGViewBox; -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAttrValue_ValueType { - eString = 0, - eAtom = 2, - eInteger = 3, - eColor = 7, - eEnum = 11, - ePercent = 15, - eGeckoCSSDeclaration = 16, - eServoCSSDeclaration = 17, - eURL = 18, - eImage = 19, - eAtomArray = 20, - eDoubleValue = 21, - eIntMarginValue = 22, - eSVGAngle = 23, - eSVGIntegerPair = 24, - eSVGLength = 25, - eSVGLengthList = 26, - eSVGNumberList = 27, - eSVGNumberPair = 28, - eSVGPathData = 29, - eSVGPointList = 30, - eSVGPreserveAspectRatio = 31, - eSVGStringList = 32, - eSVGTransformList = 33, - eSVGViewBox = 34, -} -/** - * Structure for a mapping from int (enum) values to strings. When you use - * it you generally create an array of them. - * Instantiate like this: - * EnumTable myTable[] = { - * { "string1", 1 }, - * { "string2", 2 }, - * { nullptr, 0 } - * } - */ -#[repr(C)] -#[derive(Debug, Copy)] -pub struct nsAttrValue_EnumTable { - /** The string the value maps to */ - pub tag: *const ::std::os::raw::c_char, - /** The enum value that maps to this string */ - pub value: i16, -} -impl ::std::clone::Clone for nsAttrValue_EnumTable { - fn clone(&self) -> Self { *self } +pub struct URLValue { + pub _base: URLValueData, + pub mRefCnt: ThreadSafeAutoRefCnt, } +pub type URLValue_HasThreadSafeRefCnt = TrueType; #[test] -fn bindgen_test_layout_nsAttrValue_EnumTable() { - assert_eq!(::std::mem::size_of::<nsAttrValue_EnumTable>() , 16usize); - assert_eq!(::std::mem::align_of::<nsAttrValue_EnumTable>() , 8usize); +fn bindgen_test_layout_URLValue() { + assert_eq!(::std::mem::size_of::<URLValue>() , 56usize); + assert_eq!(::std::mem::align_of::<URLValue>() , 8usize); } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsAttrValue_ValueBaseType { - eStringBase = 0, - eOtherBase = 1, - eAtomBase = 2, - eIntegerBase = 3, +#[repr(C)] +#[derive(Debug)] +pub struct URLValueData { + pub mURI: nsMainThreadPtrHandle<nsIURI>, + pub mBaseURI: nsMainThreadPtrHandle<nsIURI>, + pub mString: RefPtr<nsStringBuffer>, + pub mReferrer: nsMainThreadPtrHandle<nsIURI>, + pub mOriginPrincipal: nsMainThreadPtrHandle<nsIPrincipal>, + pub mURIResolved: bool, + pub mLocalURLFlag: bool, } #[test] -fn bindgen_test_layout_nsAttrValue() { - assert_eq!(::std::mem::size_of::<nsAttrValue>() , 8usize); - assert_eq!(::std::mem::align_of::<nsAttrValue>() , 8usize); -} -extern "C" { - #[link_name = "_ZN11nsAttrValue15sEnumTableArrayE"] - pub static mut nsAttrValue_consts_sEnumTableArray: - nsTArray<*const nsAttrValue_EnumTable>; -} -pub enum nsCSSSelector { } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsChangeHint { - nsChangeHint_RepaintFrame = 1, - nsChangeHint_NeedReflow = 2, - nsChangeHint_ClearAncestorIntrinsics = 4, - nsChangeHint_ClearDescendantIntrinsics = 8, - nsChangeHint_NeedDirtyReflow = 16, - nsChangeHint_SyncFrameView = 32, - nsChangeHint_UpdateCursor = 64, - nsChangeHint_UpdateEffects = 128, - nsChangeHint_UpdateOpacityLayer = 256, - nsChangeHint_UpdateTransformLayer = 512, - nsChangeHint_ReconstructFrame = 1024, - nsChangeHint_UpdateOverflow = 2048, - nsChangeHint_UpdateSubtreeOverflow = 4096, - nsChangeHint_UpdatePostTransformOverflow = 8192, - nsChangeHint_UpdateParentOverflow = 16384, - nsChangeHint_ChildrenOnlyTransform = 32768, - nsChangeHint_RecomputePosition = 65536, - nsChangeHint_UpdateContainingBlock = 131072, - nsChangeHint_BorderStyleNoneChange = 262144, - nsChangeHint_UpdateTextPath = 524288, - nsChangeHint_SchedulePaint = 1048576, - nsChangeHint_NeutralChange = 2097152, - nsChangeHint_InvalidateRenderingObservers = 4194304, - nsChangeHint_ReflowChangesSizeOrPosition = 8388608, - nsChangeHint_UpdateComputedBSize = 16777216, - nsChangeHint_UpdateUsesOpacity = 33554432, - nsChangeHint_UpdateBackgroundPosition = 67108864, - nsChangeHint_AllHints = 134217727, -} -pub type nsChangeHint_size_t = ::std::os::raw::c_int; -/** - * |nsRestyleHint| is a bitfield for the result of - * |HasStateDependentStyle| and |HasAttributeDependentStyle|. When no - * restyling is necessary, use |nsRestyleHint(0)|. - * - * Without eRestyle_Force or eRestyle_ForceDescendants, the restyling process - * can stop processing at a frame when it detects no style changes and it is - * known that the styles of the subtree beneath it will not change, leaving - * the old style context on the frame. eRestyle_Force can be used to skip this - * optimization on a frame, and to force its new style context to be used. - * - * Similarly, eRestyle_ForceDescendants will cause the frame and all of its - * descendants to be traversed and for the new style contexts that are created - * to be set on the frames. - * - * NOTE: When adding new restyle hints, please also add them to - * RestyleManager::RestyleHintToString. - */ -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsRestyleHint { - eRestyle_Self = 1, - eRestyle_SomeDescendants = 2, - eRestyle_Subtree = 4, - eRestyle_LaterSiblings = 8, - eRestyle_CSSTransitions = 16, - eRestyle_CSSAnimations = 32, - eRestyle_SVGAttrAnimations = 64, - eRestyle_StyleAttribute = 128, - eRestyle_StyleAttribute_Animations = 256, - eRestyle_Force = 512, - eRestyle_ForceDescendants = 1024, - eRestyle_AllHintsWithAnimations = 368, +fn bindgen_test_layout_URLValueData() { + assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize); + assert_eq!(::std::mem::align_of::<URLValueData>() , 8usize); } -pub type nsRestyleHint_size_t = ::std::os::raw::c_int; -/** - * Additional data used in conjunction with an nsRestyleHint to control the - * restyle process. - */ #[repr(C)] #[derive(Debug)] -pub struct RestyleHintData { - pub mSelectorsForDescendants: nsTArray<*mut nsCSSSelector>, +pub struct ImageValue { + pub _base: URLValueData, + pub mRequests: [u64; 5usize], + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, } +pub type ImageValue_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_RestyleHintData() { - assert_eq!(::std::mem::size_of::<RestyleHintData>() , 8usize); - assert_eq!(::std::mem::align_of::<RestyleHintData>() , 8usize); +fn bindgen_test_layout_ImageValue() { + assert_eq!(::std::mem::size_of::<ImageValue>() , 104usize); + assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize); } /** * A structure representing a single attribute name and value. @@ -3502,12 +6985,12 @@ fn bindgen_test_layout_ServoAttrSnapshot() { assert_eq!(::std::mem::size_of::<ServoAttrSnapshot>() , 16usize); assert_eq!(::std::mem::align_of::<ServoAttrSnapshot>() , 8usize); } +#[repr(u8)] /** * A bitflags enum class used to determine what data does a ServoElementSnapshot * contains. */ -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum ServoElementSnapshotFlags { State = 1, Attributes = 2, All = 3, } /** * This class holds all non-tree-structural state of an element that might be @@ -3519,268 +7002,304 @@ pub enum ServoElementSnapshotFlags { State = 1, Attributes = 2, All = 3, } #[repr(C)] #[derive(Debug)] pub struct ServoElementSnapshot { - pub mContains: ServoElementSnapshotFlags, + pub mContains: ServoElementSnapshot_Flags, pub mAttrs: nsTArray<ServoAttrSnapshot>, - pub mState: ::std::os::raw::c_uchar, + pub mState: ServoElementSnapshot_ServoStateType, pub mExplicitRestyleHint: nsRestyleHint, pub mExplicitChangeHint: nsChangeHint, pub mIsHTMLElementInHTMLDocument: bool, pub mIsInChromeDocument: bool, } +pub type ServoElementSnapshot_BorrowedAttrInfo = BorrowedAttrInfo; +pub type ServoElementSnapshot_Element = Element; +pub type ServoElementSnapshot_ServoStateType = EventStates_ServoType; +pub type ServoElementSnapshot_Flags = ServoElementSnapshotFlags; #[test] fn bindgen_test_layout_ServoElementSnapshot() { assert_eq!(::std::mem::size_of::<ServoElementSnapshot>() , 32usize); assert_eq!(::std::mem::align_of::<ServoElementSnapshot>() , 8usize); } -pub enum ErrorReporter { } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSTokenType { - eCSSToken_Whitespace = 0, - eCSSToken_Comment = 1, - eCSSToken_Ident = 2, - eCSSToken_Function = 3, - eCSSToken_AtKeyword = 4, - eCSSToken_ID = 5, - eCSSToken_Hash = 6, - eCSSToken_Number = 7, - eCSSToken_Dimension = 8, - eCSSToken_Percentage = 9, - eCSSToken_String = 10, - eCSSToken_Bad_String = 11, - eCSSToken_URL = 12, - eCSSToken_Bad_URL = 13, - eCSSToken_Symbol = 14, - eCSSToken_Includes = 15, - eCSSToken_Dashmatch = 16, - eCSSToken_Beginsmatch = 17, - eCSSToken_Endsmatch = 18, - eCSSToken_Containsmatch = 19, - eCSSToken_URange = 20, - eCSSToken_HTMLComment = 21, +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsMappedAttributes { + pub _address: u8, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSTokenSerializationType { - eCSSTokenSerialization_Nothing = 0, - eCSSTokenSerialization_Whitespace = 1, - eCSSTokenSerialization_AtKeyword_or_Hash = 2, - eCSSTokenSerialization_Number = 3, - eCSSTokenSerialization_Dimension = 4, - eCSSTokenSerialization_Percentage = 5, - eCSSTokenSerialization_URange = 6, - eCSSTokenSerialization_URL_or_BadURL = 7, - eCSSTokenSerialization_Function = 8, - eCSSTokenSerialization_Ident = 9, - eCSSTokenSerialization_CDC = 10, - eCSSTokenSerialization_DashMatch = 11, - eCSSTokenSerialization_ContainsMatch = 12, - eCSSTokenSerialization_Symbol_Hash = 13, - eCSSTokenSerialization_Symbol_At = 14, - eCSSTokenSerialization_Symbol_Dot_or_Plus = 15, - eCSSTokenSerialization_Symbol_Minus = 16, - eCSSTokenSerialization_Symbol_OpenParen = 17, - eCSSTokenSerialization_Symbol_Question = 18, - eCSSTokenSerialization_Symbol_Assorted = 19, - eCSSTokenSerialization_Symbol_Equals = 20, - eCSSTokenSerialization_Symbol_Bar = 21, - eCSSTokenSerialization_Symbol_Slash = 22, - eCSSTokenSerialization_Symbol_Asterisk = 23, - eCSSTokenSerialization_Other = 24, +impl Clone for nsMappedAttributes { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct nsCSSToken { - pub mIdent: nsAutoString, - pub mNumber: f32, - pub mInteger: i32, - pub mInteger2: i32, - pub mType: nsCSSTokenType, - pub mSymbol: ::std::os::raw::c_ushort, - pub mIntegerValid: bool, - pub mHasSign: bool, +#[derive(Debug, Copy)] +pub struct nsXBLBinding { + pub _address: u8, +} +impl Clone for nsXBLBinding { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct ShadowRoot { + pub _address: u8, +} +impl Clone for ShadowRoot { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct CustomElementData { + pub _address: u8, +} +impl Clone for CustomElementData { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct IMEState { + pub _address: u8, +} +impl Clone for IMEState { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDOMTokenList { + pub _address: u8, +} +impl Clone for nsDOMTokenList { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDOMStringMap { + pub _address: u8, +} +impl Clone for nsDOMStringMap { + fn clone(&self) -> Self { *self } +} +/** + * Interface used for handling clicks on links + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsILinkHandler { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsILinkHandler_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, } #[test] -fn bindgen_test_layout_nsCSSToken() { - assert_eq!(::std::mem::size_of::<nsCSSToken>() , 184usize); - assert_eq!(::std::mem::align_of::<nsCSSToken>() , 8usize); +fn bindgen_test_layout_nsILinkHandler() { + assert_eq!(::std::mem::size_of::<nsILinkHandler>() , 8usize); + assert_eq!(::std::mem::align_of::<nsILinkHandler>() , 8usize); +} +impl Clone for nsILinkHandler { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCSSScannerPosition { - pub mOffset: u32, - pub mLineNumber: u32, - pub mLineOffset: u32, - pub mTokenLineNumber: u32, - pub mTokenLineOffset: u32, - pub mTokenOffset: u32, - pub mInitialized: bool, +pub struct nsStyleContext { + pub _address: u8, } -impl ::std::clone::Clone for nsCSSScannerPosition { +impl Clone for nsStyleContext { fn clone(&self) -> Self { *self } } +#[repr(C)] +#[derive(Debug)] +pub struct nsFrameManagerBase { + pub mPresShell: *mut nsIPresShell, + pub mRootFrame: *mut nsIFrame, + pub mPlaceholderMap: PLDHashTable, + pub mUndisplayedMap: *mut nsFrameManagerBase_UndisplayedMap, + pub mDisplayContentsMap: *mut nsFrameManagerBase_UndisplayedMap, + pub mIsDestroyingFrames: bool, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsFrameManagerBase_UndisplayedMap { + pub _address: u8, +} +impl Clone for nsFrameManagerBase_UndisplayedMap { + fn clone(&self) -> Self { *self } +} +extern "C" { + #[link_name = "_ZN18nsFrameManagerBase23sGlobalGenerationNumberE"] + pub static mut nsFrameManagerBase_sGlobalGenerationNumber: u32; +} #[test] -fn bindgen_test_layout_nsCSSScannerPosition() { - assert_eq!(::std::mem::size_of::<nsCSSScannerPosition>() , 28usize); - assert_eq!(::std::mem::align_of::<nsCSSScannerPosition>() , 4usize); +fn bindgen_test_layout_nsFrameManagerBase() { + assert_eq!(::std::mem::size_of::<nsFrameManagerBase>() , 80usize); + assert_eq!(::std::mem::align_of::<nsFrameManagerBase>() , 8usize); } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSScannerExclude { - eCSSScannerExclude_None = 0, - eCSSScannerExclude_Comments = 1, - eCSSScannerExclude_WhitespaceAndComments = 2, +#[repr(C)] +#[derive(Debug)] +pub struct nsPresArena { + pub mFreeLists: [u64; 5usize], + pub mPool: [u64; 7usize], + pub mArenaRefPtrs: [u64; 5usize], } #[repr(C)] #[derive(Debug)] -pub struct nsCSSScanner { - pub mBuffer: *const ::std::os::raw::c_ushort, - pub mOffset: u32, - pub mCount: u32, - pub mLineNumber: u32, - pub mLineOffset: u32, - pub mTokenLineNumber: u32, - pub mTokenLineOffset: u32, - pub mTokenOffset: u32, - pub mRecordStartOffset: u32, - pub mEOFCharacters: nsCSSScanner_EOFCharacters, - pub mReporter: *mut ErrorReporter, - pub mSVGMode: bool, - pub mRecording: bool, - pub mSeenBadToken: bool, - pub mSeenVariableReference: bool, +pub struct nsPresArena_FreeList { + pub _base: PLDHashEntryHdr, + pub mEntries: nsTArray<*mut ::std::os::raw::c_void>, + pub mEntrySize: usize, + pub mEntriesEverAllocated: usize, + pub mKey: nsPresArena_FreeList_KeyTypePointer, } +pub type nsPresArena_FreeList_KeyType = u32; +pub type nsPresArena_FreeList_KeyTypePointer = *const ::std::os::raw::c_void; #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSScanner_EOFCharacters { - eEOFCharacters_None = 0, - eEOFCharacters_DropBackslash = 1, - eEOFCharacters_ReplacementChar = 2, - eEOFCharacters_Asterisk = 4, - eEOFCharacters_Slash = 8, - eEOFCharacters_DoubleQuote = 16, - eEOFCharacters_SingleQuote = 32, - eEOFCharacters_CloseParen = 64, +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsPresArena_FreeList__bindgen_ty_bindgen_id_189570 { + ALLOW_MEMMOVE = 0, +} +#[test] +fn bindgen_test_layout_nsPresArena_FreeList() { + assert_eq!(::std::mem::size_of::<nsPresArena_FreeList>() , 40usize); + assert_eq!(::std::mem::align_of::<nsPresArena_FreeList>() , 8usize); } #[test] -fn bindgen_test_layout_nsCSSScanner() { - assert_eq!(::std::mem::size_of::<nsCSSScanner>() , 64usize); - assert_eq!(::std::mem::align_of::<nsCSSScanner>() , 8usize); +fn bindgen_test_layout_nsPresArena() { + assert_eq!(::std::mem::size_of::<nsPresArena>() , 136usize); + assert_eq!(::std::mem::align_of::<nsPresArena>() , 8usize); } #[repr(C)] -pub struct nsCSSGridTemplateAreaToken { - pub mName: nsAutoString, - pub isTrash: bool, +#[derive(Debug, Copy)] +pub struct imgINotificationObserver { + pub _base: nsISupports, } -#[test] -fn bindgen_test_layout_nsCSSGridTemplateAreaToken() { - assert_eq!(::std::mem::size_of::<nsCSSGridTemplateAreaToken>() , - 168usize); - assert_eq!(::std::mem::align_of::<nsCSSGridTemplateAreaToken>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct imgINotificationObserver_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum imgINotificationObserver__bindgen_ty_bindgen_id_189717 { + SIZE_AVAILABLE = 1, + FRAME_UPDATE = 2, + FRAME_COMPLETE = 3, + LOAD_COMPLETE = 4, + DECODE_COMPLETE = 5, + DISCARD = 6, + UNLOCKED_DRAW = 7, + IS_ANIMATED = 8, + HAS_TRANSPARENCY = 9, +} +#[test] +fn bindgen_test_layout_imgINotificationObserver() { + assert_eq!(::std::mem::size_of::<imgINotificationObserver>() , 8usize); + assert_eq!(::std::mem::align_of::<imgINotificationObserver>() , 8usize); +} +impl Clone for imgINotificationObserver { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCSSGridTemplateAreaScanner { - pub mBuffer: *const ::std::os::raw::c_ushort, - pub mOffset: u32, - pub mCount: u32, +pub struct nsFrameSelection { + pub _address: u8, } -impl ::std::clone::Clone for nsCSSGridTemplateAreaScanner { +impl Clone for nsFrameSelection { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsCSSGridTemplateAreaScanner() { - assert_eq!(::std::mem::size_of::<nsCSSGridTemplateAreaScanner>() , - 16usize); - assert_eq!(::std::mem::align_of::<nsCSSGridTemplateAreaScanner>() , - 8usize); +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsCSSFrameConstructor { + pub _address: u8, +} +impl Clone for nsCSSFrameConstructor { + fn clone(&self) -> Self { *self } } -pub enum CSSVariableResolver { } #[repr(C)] -pub struct CSSVariableValues { - pub mVariableIDs: [u64; 5usize], - /** - * Array of variables, indexed by variable ID. - */ - pub mVariables: nsTArray<CSSVariableValues_Variable>, +#[derive(Debug, Copy)] +pub struct nsWeakFrame { + pub _address: u8, +} +impl Clone for nsWeakFrame { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] -pub struct CSSVariableValues_Variable { - pub mVariableName: nsString, - pub mValue: nsString, - pub mFirstToken: nsCSSTokenSerializationType, - pub mLastToken: nsCSSTokenSerializationType, +pub struct ScrollbarStyles { + pub mHorizontal: u8, + pub mVertical: u8, + pub mScrollBehavior: u8, + pub mScrollSnapTypeX: u8, + pub mScrollSnapTypeY: u8, + pub mScrollSnapPointsX: nsStyleCoord, + pub mScrollSnapPointsY: nsStyleCoord, + pub mScrollSnapDestinationX: nsStyleCoord_CalcValue, + pub mScrollSnapDestinationY: nsStyleCoord_CalcValue, } #[test] -fn bindgen_test_layout_CSSVariableValues_Variable() { - assert_eq!(::std::mem::size_of::<CSSVariableValues_Variable>() , 40usize); - assert_eq!(::std::mem::align_of::<CSSVariableValues_Variable>() , 8usize); +fn bindgen_test_layout_ScrollbarStyles() { + assert_eq!(::std::mem::size_of::<ScrollbarStyles>() , 64usize); + assert_eq!(::std::mem::align_of::<ScrollbarStyles>() , 8usize); } -#[test] -fn bindgen_test_layout_CSSVariableValues() { - assert_eq!(::std::mem::size_of::<CSSVariableValues>() , 48usize); - assert_eq!(::std::mem::align_of::<CSSVariableValues>() , 8usize); +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsRefreshDriver { + pub _address: u8, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SheetType { - Agent = 0, - User = 1, - PresHint = 2, - SVGAttrAnimation = 3, - Doc = 4, - ScopedDoc = 5, - StyleAttr = 6, - Override = 7, - Animation = 8, - Transition = 9, - Count = 10, - Unknown = -1, +impl Clone for nsRefreshDriver { + fn clone(&self) -> Self { *self } } -/** - * StaticAutoPtr and StaticRefPtr are like nsAutoPtr and nsRefPtr, except they - * are suitable for use as global variables. - * - * In particular, a global instance of Static{Auto,Ref}Ptr doesn't cause the - * compiler to emit a static initializer (in release builds, anyway). - * - * In order to accomplish this, Static{Auto,Ref}Ptr must have a trivial - * constructor and destructor. As a consequence, it cannot initialize its raw - * pointer to 0 on construction, and it cannot delete/release its raw pointer - * upon destruction. - * - * Since the compiler guarantees that all global variables are initialized to - * 0, these trivial constructors are safe. Since we rely on this, the clang - * plugin, run as part of our "static analysis" builds, makes it a compile-time - * error to use Static{Auto,Ref}Ptr as anything except a global variable. - * - * Static{Auto,Ref}Ptr have a limited interface as compared to ns{Auto,Ref}Ptr; - * this is intentional, since their range of acceptable uses is smaller. - */ #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct StaticAutoPtr<T> { - pub mRawPtr: *mut T, +#[derive(Debug, Copy)] +pub struct DocAccessible { + pub _address: u8, +} +impl Clone for DocAccessible { + fn clone(&self) -> Self { *self } } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct StaticRefPtr<T> { - pub mRawPtr: *mut T, +#[derive(Debug, Copy)] +pub struct LayerManager { + pub _address: u8, } -pub enum Zero { } -pub const eFamily_generic_first: FontFamilyType = +impl Clone for LayerManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct SourceSurface { + pub _address: u8, +} +impl Clone for SourceSurface { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct CapturingContentInfo { + pub mAllowed: bool, + pub mPointerLock: bool, + pub mRetargetToElement: bool, + pub mPreventDrag: bool, + pub mContent: StaticRefPtr<nsIContent>, +} +#[test] +fn bindgen_test_layout_CapturingContentInfo() { + assert_eq!(::std::mem::size_of::<CapturingContentInfo>() , 16usize); + assert_eq!(::std::mem::align_of::<CapturingContentInfo>() , 8usize); +} +pub const FontFamilyType_eFamily_generic_first: FontFamilyType = FontFamilyType::eFamily_serif; -pub const eFamily_generic_last: FontFamilyType = +pub const FontFamilyType_eFamily_generic_last: FontFamilyType = FontFamilyType::eFamily_fantasy; -pub const eFamily_generic_count: FontFamilyType = +pub const FontFamilyType_eFamily_generic_count: FontFamilyType = FontFamilyType::eFamily_monospace; +#[repr(u32)] /** * type of font family name, either a name (e.g. Helvetica) or a * generic (e.g. serif, sans-serif), with the ability to distinguish * between unquoted and quoted names for serializaiton */ -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum FontFamilyType { eFamily_none = 0, eFamily_named = 1, @@ -3793,9 +7312,6 @@ pub enum FontFamilyType { eFamily_moz_variable = 8, eFamily_moz_fixed = 9, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum QuotedName { eQuotedName = 0, eUnquotedName = 1, } /** * font family name, a string for the name if not a generic and * a font type indicated named family or which generic family @@ -3833,14 +7349,14 @@ pub struct gfxFontFeature { pub mTag: u32, pub mValue: u32, } -impl ::std::clone::Clone for gfxFontFeature { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_gfxFontFeature() { assert_eq!(::std::mem::size_of::<gfxFontFeature>() , 8usize); assert_eq!(::std::mem::align_of::<gfxFontFeature>() , 4usize); } +impl Clone for gfxFontFeature { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug)] pub struct gfxAlternateValue { @@ -3853,22 +7369,84 @@ fn bindgen_test_layout_gfxAlternateValue() { assert_eq!(::std::mem::align_of::<gfxAlternateValue>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct gfxFontFeatureValueSet { - pub _bindgen_opaque_blob: [u64; 7usize], + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mFontFeatureValues: [u64; 5usize], +} +pub type gfxFontFeatureValueSet_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug)] +pub struct gfxFontFeatureValueSet_ValueList { + pub name: nsString, + pub featureSelectors: nsTArray<::std::os::raw::c_uint>, +} +#[test] +fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { + assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet_ValueList>() , + 24usize); + assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet_ValueList>() , + 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct gfxFontFeatureValueSet_FeatureValues { + pub alternate: u32, + pub valuelist: nsTArray<gfxFontFeatureValueSet_ValueList>, +} +#[test] +fn bindgen_test_layout_gfxFontFeatureValueSet_FeatureValues() { + assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet_FeatureValues>() , + 16usize); + assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet_FeatureValues>() + , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct gfxFontFeatureValueSet_FeatureValueHashKey { + pub mFamily: nsString, + pub mPropVal: u32, + pub mName: nsString, +} +#[test] +fn bindgen_test_layout_gfxFontFeatureValueSet_FeatureValueHashKey() { + assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet_FeatureValueHashKey>() + , 40usize); + assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet_FeatureValueHashKey>() + , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { + pub _base: PLDHashEntryHdr, + pub mKey: gfxFontFeatureValueSet_FeatureValueHashKey, + pub mValues: nsTArray<::std::os::raw::c_uint>, +} +pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = + *const gfxFontFeatureValueSet_FeatureValueHashKey; +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 + { + ALLOW_MEMMOVE = 1, +} +#[test] +fn bindgen_test_layout_gfxFontFeatureValueSet_FeatureValueHashEntry() { + assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet_FeatureValueHashEntry>() + , 56usize); + assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet_FeatureValueHashEntry>() + , 8usize); } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet() { assert_eq!(::std::mem::size_of::<gfxFontFeatureValueSet>() , 56usize); assert_eq!(::std::mem::align_of::<gfxFontFeatureValueSet>() , 8usize); } -pub enum gfxFontStyle { } -pub type nsFontFamilyEnumFunc = - ::std::option::Option<unsafe extern "C" fn(aFamily: *const nsString, - aGeneric: bool, - aData: - *mut ::std::os::raw::c_void) - -> bool>; #[repr(C)] +#[derive(Debug)] pub struct nsFont { pub fontlist: FontFamilyList, pub style: u8, @@ -3897,16 +7475,192 @@ fn bindgen_test_layout_nsFont() { assert_eq!(::std::mem::size_of::<nsFont>() , 88usize); assert_eq!(::std::mem::align_of::<nsFont>() , 8usize); } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub type TimeStampValue = u64; +/** + * Instances of this class represent moments in time, or a special + * "null" moment. We do not use the non-monotonic system clock or + * local time, since they can be reset, causing apparent backward + * travel in time, which can confuse algorithms. Instead we measure + * elapsed time according to the system. This time can never go + * backwards (i.e. it never wraps around, at least not in less than + * five million years of system elapsed time). It might not advance + * while the system is sleeping. If TimeStamp::SetNow() is not called + * at all for hours or days, we might not notice the passage of some + * of that time. + * + * We deliberately do not expose a way to convert TimeStamps to some + * particular unit. All you can do is compute a difference between two + * TimeStamps to get a TimeDuration. You can also add a TimeDuration + * to a TimeStamp to get a new TimeStamp. You can't do something + * meaningless like add two TimeStamps. + * + * Internally this is implemented as either a wrapper around + * - high-resolution, monotonic, system clocks if they exist on this + * platform + * - PRIntervalTime otherwise. We detect wraparounds of + * PRIntervalTime and work around them. + * + * This class is similar to C++11's time_point, however it is + * explicitly nullable and provides an IsNull() method. time_point + * is initialized to the clock's epoch and provides a + * time_since_epoch() method that functions similiarly. i.e. + * t.IsNull() is equivalent to t.time_since_epoch() == decltype(t)::duration::zero(); + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct TimeStamp { + /** + * When built with PRIntervalTime, a value of 0 means this instance + * is "null". Otherwise, the low 32 bits represent a PRIntervalTime, + * and the high 32 bits represent a counter of the number of + * rollovers of PRIntervalTime that we've seen. This counter starts + * at 1 to avoid a real time colliding with the "null" value. + * + * PR_INTERVAL_MAX is set at 100,000 ticks per second. So the minimum + * time to wrap around is about 2^64/100000 seconds, i.e. about + * 5,849,424 years. + * + * When using a system clock, a value is system dependent. + */ + pub mValue: TimeStampValue, +} +#[test] +fn bindgen_test_layout_TimeStamp() { + assert_eq!(::std::mem::size_of::<TimeStamp>() , 8usize); + assert_eq!(::std::mem::align_of::<TimeStamp>() , 8usize); +} +impl Clone for TimeStamp { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FramePropertyDescriptorUntyped { + pub mDestructor: FramePropertyDescriptorUntyped_UntypedDestructor, + pub mDestructorWithFrame: FramePropertyDescriptorUntyped_UntypedDestructorWithFrame, +} +/** + * mDestructor will be called if it's non-null. + */ +pub type FramePropertyDescriptorUntyped_UntypedDestructor = + ::std::option::Option<unsafe extern "C" fn(aPropertyValue: + *mut ::std::os::raw::c_void)>; +/** + * mDestructorWithFrame will be called if it's non-null and mDestructor + * is null. WARNING: The frame passed to mDestructorWithFrame may + * be a dangling frame pointer, if this is being called during + * presshell teardown. Do not use it except to compare against + * other frame pointers. No frame will have been allocated with + * the same address yet. + */ +pub type FramePropertyDescriptorUntyped_UntypedDestructorWithFrame = + ::std::option::Option<unsafe extern "C" fn(aFrame: *const nsIFrame, + aPropertyValue: + *mut ::std::os::raw::c_void)>; +#[test] +fn bindgen_test_layout_FramePropertyDescriptorUntyped() { + assert_eq!(::std::mem::size_of::<FramePropertyDescriptorUntyped>() , + 16usize); + assert_eq!(::std::mem::align_of::<FramePropertyDescriptorUntyped>() , + 8usize); +} +impl Clone for FramePropertyDescriptorUntyped { + fn clone(&self) -> Self { *self } +} +/** + * The FramePropertyTable is optimized for storing 0 or 1 properties on + * a given frame. Storing very large numbers of properties on a single + * frame will not be efficient. + * + * Property values are passed as void* but do not actually have to be + * valid pointers. You can use NS_INT32_TO_PTR/NS_PTR_TO_INT32 to + * store int32_t values. Null/zero values can be stored and retrieved. + * Of course, the destructor function (if any) must handle such values + * correctly. + */ +#[repr(C)] +#[derive(Debug)] +pub struct FramePropertyTable { + pub mEntries: [u64; 5usize], + pub mLastFrame: *const nsIFrame, + pub mLastEntry: *mut FramePropertyTable_Entry, +} +pub type FramePropertyTable_UntypedDescriptor = + *const FramePropertyDescriptorUntyped; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct FramePropertyTable_ReinterpretHelper<T> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, +} +/** + * Stores a property descriptor/value pair. It can also be used to + * store an nsTArray of PropertyValues. + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FramePropertyTable_PropertyValue { + pub mProperty: FramePropertyTable_UntypedDescriptor, + pub mValue: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_FramePropertyTable_PropertyValue() { + assert_eq!(::std::mem::size_of::<FramePropertyTable_PropertyValue>() , + 16usize); + assert_eq!(::std::mem::align_of::<FramePropertyTable_PropertyValue>() , + 8usize); +} +impl Clone for FramePropertyTable_PropertyValue { + fn clone(&self) -> Self { *self } +} +/** + * Used with an array of PropertyValues to allow lookups that compare + * only on the FramePropertyDescriptor. + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct FramePropertyTable_PropertyComparator { + pub _address: u8, +} +#[test] +fn bindgen_test_layout_FramePropertyTable_PropertyComparator() { + assert_eq!(::std::mem::size_of::<FramePropertyTable_PropertyComparator>() + , 1usize); + assert_eq!(::std::mem::align_of::<FramePropertyTable_PropertyComparator>() + , 1usize); +} +impl Clone for FramePropertyTable_PropertyComparator { + fn clone(&self) -> Self { *self } +} +/** + * Our hashtable entry. The key is an nsIFrame*, the value is a + * PropertyValue representing one or more property/value pairs. + */ +#[repr(C)] +#[derive(Debug)] +pub struct FramePropertyTable_Entry { + pub _base: nsPtrHashKey<nsIFrame>, + pub mProp: FramePropertyTable_PropertyValue, +} +#[test] +fn bindgen_test_layout_FramePropertyTable_Entry() { + assert_eq!(::std::mem::size_of::<FramePropertyTable_Entry>() , 32usize); + assert_eq!(::std::mem::align_of::<FramePropertyTable_Entry>() , 8usize); +} +#[test] +fn bindgen_test_layout_FramePropertyTable() { + assert_eq!(::std::mem::size_of::<FramePropertyTable>() , 56usize); + assert_eq!(::std::mem::align_of::<FramePropertyTable>() , 8usize); +} +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBasicShapeType { Polygon = 0, Circle = 1, Ellipse = 2, Inset = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxAlign { Stretch = 0, Start = 1, @@ -3914,26 +7668,23 @@ pub enum StyleBoxAlign { Baseline = 3, End = 4, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxDecorationBreak { Slice = 0, Clone = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxDirection { Normal = 0, Reverse = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxOrient { Horizontal = 0, Vertical = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxPack { Start = 0, Center = 1, End = 2, Justify = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleBoxSizing { Content = 0, Border = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum StyleBoxShadowType { Inset = 0, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleClear { None = 0, Left = 1, @@ -3944,8 +7695,8 @@ pub enum StyleClear { Line = 8, Max = 13, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleClipPathGeometryBox { NoBox = 0, Content = 1, @@ -3956,11 +7707,11 @@ pub enum StyleClipPathGeometryBox { Stroke = 6, View = 7, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleFillRule { Nonzero = 0, Evenodd = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleFloat { None = 0, Left = 1, @@ -3968,11 +7719,11 @@ pub enum StyleFloat { InlineStart = 3, InlineEnd = 4, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleFloatEdge { ContentBox = 0, MarginBox = 1, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleShapeOutsideShapeBox { NoBox = 0, Content = 1, @@ -3980,11 +7731,11 @@ pub enum StyleShapeOutsideShapeBox { Border = 3, Margin = 4, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleShapeSourceType { None = 0, URL = 1, Shape = 2, Box = 3, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleUserFocus { None = 0, Ignore = 1, @@ -3995,8 +7746,8 @@ pub enum StyleUserFocus { SelectSame = 6, SelectMenu = 7, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleUserSelect { None = 0, Text = 1, @@ -4009,8 +7760,8 @@ pub enum StyleUserSelect { MozAll = 8, MozText = 9, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum StyleDisplay { None = 0, Block = 1, @@ -4051,20 +7802,504 @@ pub enum StyleDisplay { Groupbox = 36, Popup = 37, } -pub const eCSSProperty_COUNT_DUMMY: nsCSSPropertyID = +pub const nsStyleUnit_eStyleUnit_MAX: nsStyleUnit = + nsStyleUnit::eStyleUnit_Calc; +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsStyleUnit { + eStyleUnit_Null = 0, + eStyleUnit_Normal = 1, + eStyleUnit_Auto = 2, + eStyleUnit_None = 3, + eStyleUnit_Percent = 10, + eStyleUnit_Factor = 11, + eStyleUnit_Degree = 12, + eStyleUnit_Grad = 13, + eStyleUnit_Radian = 14, + eStyleUnit_Turn = 15, + eStyleUnit_FlexFraction = 16, + eStyleUnit_Coord = 20, + eStyleUnit_Integer = 30, + eStyleUnit_Enumerated = 32, + eStyleUnit_Calc = 40, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct _bindgen_ty_bindgen_id_191700 { + pub mInt: __BindgenUnionField<i32>, + pub mFloat: __BindgenUnionField<f32>, + 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>() , + 8usize); + assert_eq!(::std::mem::align_of::<_bindgen_ty_bindgen_id_191700>() , + 8usize); +} +impl Clone for _bindgen_ty_bindgen_id_191700 { + fn clone(&self) -> Self { *self } +} +pub type nsStyleUnion = _bindgen_ty_bindgen_id_191700; +/** + * Class that hold a single size specification used by the style + * system. The size specification consists of two parts -- a number + * and a unit. The number is an integer, a floating point value, an + * nscoord, or undefined, and the unit is an nsStyleUnit. Checking + * the unit is a must before asking for the value in any particular + * form. + */ + /** <div rustbindgen private accessor="unsafe"></div> */ +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleCoord { + mUnit: nsStyleUnit, + mValue: nsStyleUnion, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsStyleCoord_CalcValue { + pub mLength: nscoord, + pub mPercent: f32, + pub mHasPercent: bool, +} +#[test] +fn bindgen_test_layout_nsStyleCoord_CalcValue() { + assert_eq!(::std::mem::size_of::<nsStyleCoord_CalcValue>() , 12usize); + assert_eq!(::std::mem::align_of::<nsStyleCoord_CalcValue>() , 4usize); +} +impl Clone for nsStyleCoord_CalcValue { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleCoord_Calc { + pub _base: nsStyleCoord_CalcValue, + pub mRefCnt: ThreadSafeAutoRefCnt, +} +pub type nsStyleCoord_Calc_HasThreadSafeRefCnt = TrueType; +#[test] +fn bindgen_test_layout_nsStyleCoord_Calc() { + assert_eq!(::std::mem::size_of::<nsStyleCoord_Calc>() , 24usize); + assert_eq!(::std::mem::align_of::<nsStyleCoord_Calc>() , 8usize); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsStyleCoord_CoordConstructorType { CoordConstructor = 0, } +#[test] +fn bindgen_test_layout_nsStyleCoord() { + assert_eq!(::std::mem::size_of::<nsStyleCoord>() , 16usize); + assert_eq!(::std::mem::align_of::<nsStyleCoord>() , 8usize); +} +impl nsStyleCoord { + #[inline] + pub unsafe fn get_mUnit(&self) -> &nsStyleUnit { &self.mUnit } + #[inline] + pub unsafe fn get_mUnit_mut(&mut self) -> &mut nsStyleUnit { + &mut self.mUnit + } + #[inline] + pub unsafe fn get_mValue(&self) -> &nsStyleUnion { &self.mValue } + #[inline] + pub unsafe fn get_mValue_mut(&mut self) -> &mut nsStyleUnion { + &mut self.mValue + } +} +/** + * Class that represents a set of top/right/bottom/left nsStyleCoords. + * This is commonly used to hold the widths of the borders, margins, + * or paddings of a box. + */ + /** <div rustbindgen private accessor="unsafe"></div> */ +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleSides { + mUnits: [nsStyleUnit; 4usize], + mValues: [nsStyleUnion; 4usize], +} +#[test] +fn bindgen_test_layout_nsStyleSides() { + assert_eq!(::std::mem::size_of::<nsStyleSides>() , 40usize); + assert_eq!(::std::mem::align_of::<nsStyleSides>() , 8usize); +} +impl nsStyleSides { + #[inline] + pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 4usize] { &self.mUnits } + #[inline] + pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 4usize] { + &mut self.mUnits + } + #[inline] + pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 4usize] { + &self.mValues + } + #[inline] + pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 4usize] { + &mut self.mValues + } +} +/** + * Class that represents a set of top-left/top-right/bottom-right/bottom-left + * nsStyleCoord pairs. This is used to hold the dimensions of the + * corners of a box (for, e.g., border-radius and outline-radius). + */ + /** <div rustbindgen private accessor="unsafe"></div> */ +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleCorners { + mUnits: [nsStyleUnit; 8usize], + mValues: [nsStyleUnion; 8usize], +} +#[test] +fn bindgen_test_layout_nsStyleCorners() { + assert_eq!(::std::mem::size_of::<nsStyleCorners>() , 72usize); + assert_eq!(::std::mem::align_of::<nsStyleCorners>() , 8usize); +} +impl nsStyleCorners { + #[inline] + pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 8usize] { &self.mUnits } + #[inline] + pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 8usize] { + &mut self.mUnits + } + #[inline] + pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 8usize] { + &self.mValues + } + #[inline] + pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 8usize] { + &mut self.mValues + } +} +#[repr(C)] +#[derive(Debug)] +pub struct nsStyleDisplay { + pub mBinding: RefPtr<URLValue>, + pub mDisplay: StyleDisplay, + pub mOriginalDisplay: StyleDisplay, + pub mContain: u8, + pub mAppearance: u8, + pub mPosition: u8, + pub mFloat: StyleFloat, + pub mOriginalFloat: StyleFloat, + pub mBreakType: StyleClear, + pub mBreakInside: u8, + pub mBreakBefore: bool, + pub mBreakAfter: bool, + pub mOverflowX: u8, + pub mOverflowY: u8, + pub mOverflowClipBox: u8, + pub mResize: u8, + pub mOrient: u8, + pub mIsolation: u8, + pub mTopLayer: u8, + pub mWillChangeBitField: u8, + pub mWillChange: nsTArray<nsString>, + pub mTouchAction: u8, + pub mScrollBehavior: u8, + pub mScrollSnapTypeX: u8, + pub mScrollSnapTypeY: u8, + pub mScrollSnapPointsX: nsStyleCoord, + pub mScrollSnapPointsY: nsStyleCoord, + pub mScrollSnapDestination: Position, + pub mScrollSnapCoordinate: nsTArray<Position>, + pub mBackfaceVisibility: u8, + pub mTransformStyle: u8, + pub mTransformBox: u8, + pub mSpecifiedTransform: RefPtr<nsCSSValueSharedList>, + pub mTransformOrigin: [nsStyleCoord; 3usize], + pub mChildPerspective: nsStyleCoord, + pub mPerspectiveOrigin: [nsStyleCoord; 2usize], + pub mVerticalAlign: nsStyleCoord, + pub mTransitions: nsStyleAutoArray<StyleTransition>, + pub mTransitionTimingFunctionCount: u32, + pub mTransitionDurationCount: u32, + pub mTransitionDelayCount: u32, + pub mTransitionPropertyCount: u32, + pub mAnimations: nsStyleAutoArray<StyleAnimation>, + pub mAnimationTimingFunctionCount: u32, + pub mAnimationDurationCount: u32, + pub mAnimationDelayCount: u32, + pub mAnimationNameCount: u32, + pub mAnimationDirectionCount: u32, + pub mAnimationFillModeCount: u32, + pub mAnimationPlayStateCount: u32, + pub mAnimationIterationCountCount: u32, + pub mShapeOutside: StyleShapeOutside, +} +#[test] +fn bindgen_test_layout_nsStyleDisplay() { + assert_eq!(::std::mem::size_of::<nsStyleDisplay>() , 424usize); + assert_eq!(::std::mem::align_of::<nsStyleDisplay>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsILanguageAtomService { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsILanguageAtomService_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsILanguageAtomService() { + assert_eq!(::std::mem::size_of::<nsILanguageAtomService>() , 8usize); + assert_eq!(::std::mem::align_of::<nsILanguageAtomService>() , 8usize); +} +impl Clone for nsILanguageAtomService { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct LangGroupFontPrefs { + pub mLangGroup: nsCOMPtr<nsIAtom>, + pub mMinimumFontSize: nscoord, + pub mDefaultVariableFont: nsFont, + pub mDefaultFixedFont: nsFont, + pub mDefaultSerifFont: nsFont, + pub mDefaultSansSerifFont: nsFont, + pub mDefaultMonospaceFont: nsFont, + pub mDefaultCursiveFont: nsFont, + pub mDefaultFantasyFont: nsFont, + pub mNext: nsAutoPtr<LangGroupFontPrefs>, +} +#[test] +fn bindgen_test_layout_LangGroupFontPrefs() { + assert_eq!(::std::mem::size_of::<LangGroupFontPrefs>() , 640usize); + assert_eq!(::std::mem::align_of::<LangGroupFontPrefs>() , 8usize); +} +/** + * Some functionality that has historically lived on nsPresContext does not + * actually need to be per-document. This singleton class serves as a host + * for that functionality. We delegate to it from nsPresContext where + * appropriate, and use it standalone in some cases as well. + */ +#[repr(C)] +#[derive(Debug)] +pub struct StaticPresData { + pub mLangService: nsCOMPtr<nsILanguageAtomService>, + pub mBorderWidthTable: [nscoord; 3usize], + pub mStaticLangGroupFontPrefs: LangGroupFontPrefs, +} +#[test] +fn bindgen_test_layout_StaticPresData() { + assert_eq!(::std::mem::size_of::<StaticPresData>() , 664usize); + assert_eq!(::std::mem::align_of::<StaticPresData>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsIPrintSettings { + pub _address: u8, +} +impl Clone for nsIPrintSettings { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsITheme { + pub _address: u8, +} +impl Clone for nsITheme { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct gfxTextPerfMetrics { + pub _address: u8, +} +impl Clone for gfxTextPerfMetrics { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsTransitionManager { + pub _address: u8, +} +impl Clone for nsTransitionManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsAnimationManager { + pub _address: u8, +} +impl Clone for nsAnimationManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsDeviceContext { + pub _address: u8, +} +impl Clone for nsDeviceContext { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct gfxMissingFontRecorder { + pub _address: u8, +} +impl Clone for gfxMissingFontRecorder { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct EffectCompositor { + pub _address: u8, +} +impl Clone for EffectCompositor { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct EventStateManager { + pub _address: u8, +} +impl Clone for EventStateManager { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug)] +pub struct CounterStyleManager { + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mPresContext: *mut nsPresContext, + pub mCacheTable: [u64; 5usize], +} +pub type CounterStyleManager_HasThreadSafeRefCnt = FalseType; +#[test] +fn bindgen_test_layout_CounterStyleManager() { + assert_eq!(::std::mem::size_of::<CounterStyleManager>() , 64usize); + assert_eq!(::std::mem::align_of::<CounterStyleManager>() , 8usize); +} +#[repr(C)] +#[derive(Debug)] +pub struct nsInvalidateRequestList { + pub mRequests: nsTArray<nsInvalidateRequestList_Request>, +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsInvalidateRequestList_Request { + pub mRect: nsRect, + pub mFlags: u32, +} +#[test] +fn bindgen_test_layout_nsInvalidateRequestList_Request() { + assert_eq!(::std::mem::size_of::<nsInvalidateRequestList_Request>() , + 20usize); + assert_eq!(::std::mem::align_of::<nsInvalidateRequestList_Request>() , + 4usize); +} +impl Clone for nsInvalidateRequestList_Request { + fn clone(&self) -> Self { *self } +} +#[test] +fn bindgen_test_layout_nsInvalidateRequestList() { + assert_eq!(::std::mem::size_of::<nsInvalidateRequestList>() , 8usize); + assert_eq!(::std::mem::align_of::<nsInvalidateRequestList>() , 8usize); +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct DisplayItemClip_RoundedRect { + pub mRect: nsRect, + pub mRadii: [nscoord; 8usize], +} +#[test] +fn bindgen_test_layout_DisplayItemClip_RoundedRect() { + assert_eq!(::std::mem::size_of::<DisplayItemClip_RoundedRect>() , + 48usize); + assert_eq!(::std::mem::align_of::<DisplayItemClip_RoundedRect>() , + 4usize); +} +impl Clone for DisplayItemClip_RoundedRect { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct Grid { + pub _address: u8, +} +impl Clone for Grid { + fn clone(&self) -> Self { *self } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsCSSTokenSerializationType { + eCSSTokenSerialization_Nothing = 0, + eCSSTokenSerialization_Whitespace = 1, + eCSSTokenSerialization_AtKeyword_or_Hash = 2, + eCSSTokenSerialization_Number = 3, + eCSSTokenSerialization_Dimension = 4, + eCSSTokenSerialization_Percentage = 5, + eCSSTokenSerialization_URange = 6, + eCSSTokenSerialization_URL_or_BadURL = 7, + eCSSTokenSerialization_Function = 8, + eCSSTokenSerialization_Ident = 9, + eCSSTokenSerialization_CDC = 10, + eCSSTokenSerialization_DashMatch = 11, + eCSSTokenSerialization_ContainsMatch = 12, + eCSSTokenSerialization_Symbol_Hash = 13, + eCSSTokenSerialization_Symbol_At = 14, + eCSSTokenSerialization_Symbol_Dot_or_Plus = 15, + eCSSTokenSerialization_Symbol_Minus = 16, + eCSSTokenSerialization_Symbol_OpenParen = 17, + eCSSTokenSerialization_Symbol_Question = 18, + eCSSTokenSerialization_Symbol_Assorted = 19, + eCSSTokenSerialization_Symbol_Equals = 20, + eCSSTokenSerialization_Symbol_Bar = 21, + eCSSTokenSerialization_Symbol_Slash = 22, + eCSSTokenSerialization_Symbol_Asterisk = 23, + eCSSTokenSerialization_Other = 24, +} +#[repr(C)] +#[derive(Debug)] +pub struct CSSVariableValues { + /** + * Map of variable names to IDs. Variable IDs are indexes into + * mVariables. + */ + pub mVariableIDs: [u64; 5usize], + /** + * Array of variables, indexed by variable ID. + */ + pub mVariables: nsTArray<CSSVariableValues_Variable>, +} +#[repr(C)] +#[derive(Debug)] +pub struct CSSVariableValues_Variable { + pub mVariableName: nsString, + pub mValue: nsString, + pub mFirstToken: nsCSSTokenSerializationType, + pub mLastToken: nsCSSTokenSerializationType, +} +#[test] +fn bindgen_test_layout_CSSVariableValues_Variable() { + assert_eq!(::std::mem::size_of::<CSSVariableValues_Variable>() , 40usize); + assert_eq!(::std::mem::align_of::<CSSVariableValues_Variable>() , 8usize); +} +#[test] +fn bindgen_test_layout_CSSVariableValues() { + assert_eq!(::std::mem::size_of::<CSSVariableValues>() , 48usize); + assert_eq!(::std::mem::align_of::<CSSVariableValues>() , 8usize); +} +pub const nsCSSPropertyID_eCSSProperty_COUNT_DUMMY: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_z_index; -pub const eCSSProperty_all: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSProperty_all: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_COUNT_no_shorthands; -pub const eCSSProperty_COUNT_DUMMY2: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSProperty_COUNT_DUMMY2: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_transition; -pub const eCSSPropertyAlias_WordWrap: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSPropertyAlias_WordWrap: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_COUNT; -pub const eCSSProperty_COUNT_DUMMY3: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSProperty_COUNT_DUMMY3: nsCSSPropertyID = nsCSSPropertyID::eCSSPropertyAlias_WebkitMaskSize; -pub const eCSSPropertyExtra_no_properties: nsCSSPropertyID = +pub const nsCSSPropertyID_eCSSPropertyExtra_no_properties: nsCSSPropertyID = nsCSSPropertyID::eCSSProperty_COUNT_with_aliases; #[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSPropertyID { eCSSProperty_UNKNOWN = -1, eCSSProperty_align_content = 0, @@ -4533,52 +8768,6 @@ pub enum nsCSSPropertyID { eCSSPropertyExtra_x_auto_value = 463, eCSSPropertyExtra_variable = 464, } -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSFontDesc { - eCSSFontDesc_UNKNOWN = -1, - eCSSFontDesc_Family = 0, - eCSSFontDesc_Style = 1, - eCSSFontDesc_Weight = 2, - eCSSFontDesc_Stretch = 3, - eCSSFontDesc_Src = 4, - eCSSFontDesc_UnicodeRange = 5, - eCSSFontDesc_FontFeatureSettings = 6, - eCSSFontDesc_FontLanguageOverride = 7, - eCSSFontDesc_Display = 8, - eCSSFontDesc_COUNT = 9, -} -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSCounterDesc { - eCSSCounterDesc_UNKNOWN = -1, - eCSSCounterDesc_System = 0, - eCSSCounterDesc_Symbols = 1, - eCSSCounterDesc_AdditiveSymbols = 2, - eCSSCounterDesc_Negative = 3, - eCSSCounterDesc_Prefix = 4, - eCSSCounterDesc_Suffix = 5, - eCSSCounterDesc_Range = 6, - eCSSCounterDesc_Pad = 7, - eCSSCounterDesc_Fallback = 8, - eCSSCounterDesc_SpeakAs = 9, - eCSSCounterDesc_COUNT = 10, -} -#[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSPropertyLogicalGroup { - eCSSPropertyLogicalGroup_UNKNOWN = -1, - eCSSPropertyLogicalGroup_BorderColor = 0, - eCSSPropertyLogicalGroup_BorderStyle = 1, - eCSSPropertyLogicalGroup_BorderWidth = 2, - eCSSPropertyLogicalGroup_Margin = 3, - eCSSPropertyLogicalGroup_MaxSize = 4, - eCSSPropertyLogicalGroup_Offset = 5, - eCSSPropertyLogicalGroup_Padding = 6, - eCSSPropertyLogicalGroup_MinSize = 7, - eCSSPropertyLogicalGroup_Size = 8, - eCSSPropertyLogicalGroup_COUNT = 9, -} /** * Class to safely handle main-thread-only pointers off the main thread. * @@ -4624,38 +8813,152 @@ pub struct nsMainThreadPtrHolder<T> { pub mRawPtr: *mut T, pub mStrict: bool, } +pub type nsMainThreadPtrHolder_HasThreadSafeRefCnt = TrueType; #[repr(C)] #[derive(Debug)] pub struct nsMainThreadPtrHandle<T> { pub mPtr: RefPtr<T>, } -pub enum CSSStyleSheet { } #[repr(C)] -pub struct URLValueData { - pub _bindgen_opaque_blob: [u64; 6usize], +#[derive(Debug)] +pub struct imgRequestProxy { + pub _base: imgIRequest, + pub _base_1: IProgressObserver, + pub _base_2: nsISupportsPriority, + pub _base_3: nsISecurityInfoProvider, + pub _base_4: nsITimedChannel, + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, + pub mBehaviour: UniquePtr<ProxyBehaviour, DefaultDelete<ProxyBehaviour>>, + pub mURI: RefPtr<ImageURL>, + pub mListener: *mut imgINotificationObserver, + pub mLoadGroup: nsCOMPtr<nsILoadGroup>, + pub mLoadFlags: nsLoadFlags, + pub mLockCount: u32, + pub mAnimationConsumers: u32, + pub mCanceled: bool, + pub mIsInLoadGroup: bool, + pub mListenerIsStrongRef: bool, + pub mDecodeRequested: bool, + pub mDeferNotifications: bool, +} +pub type imgRequestProxy_Image = Image; +pub type imgRequestProxy_ImageURL = ImageURL; +pub type imgRequestProxy_ProgressTracker = ProgressTracker; +pub type imgRequestProxy_HasThreadSafeRefCnt = FalseType; +#[repr(C)] +#[derive(Debug)] +pub struct imgRequestProxy_imgCancelRunnable { + pub _base: Runnable, + pub mOwner: RefPtr<imgRequestProxy>, + pub mStatus: nsresult, } #[test] -fn bindgen_test_layout_URLValueData() { - assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize); - assert_eq!(::std::mem::align_of::<URLValueData>() , 8usize); +fn bindgen_test_layout_imgRequestProxy_imgCancelRunnable() { + assert_eq!(::std::mem::size_of::<imgRequestProxy_imgCancelRunnable>() , + 40usize); + assert_eq!(::std::mem::align_of::<imgRequestProxy_imgCancelRunnable>() , + 8usize); +} +#[test] +fn bindgen_test_layout_imgRequestProxy() { + assert_eq!(::std::mem::size_of::<imgRequestProxy>() , 120usize); + assert_eq!(::std::mem::align_of::<imgRequestProxy>() , 8usize); } #[repr(C)] -pub struct URLValue { - pub _bindgen_opaque_blob: [u64; 7usize], +pub struct bindgen_vtable__bindgen_id_200558 { +} +/** + * An interface for observing changes to image state, as reported by + * ProgressTracker. + * + * This is the ImageLib-internal version of imgINotificationObserver, + * essentially, with implementation details that code outside of ImageLib + * shouldn't see. + * + * XXX(seth): It's preferable to avoid adding anything to this interface if + * possible. In the long term, it would be ideal to get to a place where we can + * just use the imgINotificationObserver interface internally as well. + */ +#[repr(C)] +#[derive(Debug)] +pub struct IProgressObserver { + pub vtable_: *const bindgen_vtable__bindgen_id_200558, + pub _base: u64, } #[test] -fn bindgen_test_layout_URLValue() { - assert_eq!(::std::mem::size_of::<URLValue>() , 56usize); - assert_eq!(::std::mem::align_of::<URLValue>() , 8usize); +fn bindgen_test_layout_IProgressObserver() { + assert_eq!(::std::mem::size_of::<IProgressObserver>() , 16usize); + assert_eq!(::std::mem::align_of::<IProgressObserver>() , 8usize); } #[repr(C)] -pub struct ImageValue { - pub _bindgen_opaque_blob: [u64; 13usize], +#[derive(Debug, Copy)] +pub struct nsISupportsPriority { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsISupportsPriority_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsISupportsPriority__bindgen_ty_bindgen_id_200634 { + PRIORITY_HIGHEST = -20, + PRIORITY_HIGH = -10, + PRIORITY_NORMAL = 0, + PRIORITY_LOW = 10, + PRIORITY_LOWEST = 20, } #[test] -fn bindgen_test_layout_ImageValue() { - assert_eq!(::std::mem::size_of::<ImageValue>() , 104usize); - assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize); +fn bindgen_test_layout_nsISupportsPriority() { + assert_eq!(::std::mem::size_of::<nsISupportsPriority>() , 8usize); + assert_eq!(::std::mem::align_of::<nsISupportsPriority>() , 8usize); +} +impl Clone for nsISupportsPriority { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsISecurityInfoProvider { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsISecurityInfoProvider_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsISecurityInfoProvider() { + assert_eq!(::std::mem::size_of::<nsISecurityInfoProvider>() , 8usize); + assert_eq!(::std::mem::align_of::<nsISecurityInfoProvider>() , 8usize); +} +impl Clone for nsISecurityInfoProvider { + fn clone(&self) -> Self { *self } +} +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsITimedChannel { + pub _base: nsISupports, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct nsITimedChannel_COMTypeInfo<T, U> { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData<T>, + pub _phantom_1: ::std::marker::PhantomData<U>, +} +#[test] +fn bindgen_test_layout_nsITimedChannel() { + assert_eq!(::std::mem::size_of::<nsITimedChannel>() , 8usize); + assert_eq!(::std::mem::align_of::<nsITimedChannel>() , 8usize); +} +impl Clone for nsITimedChannel { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug)] @@ -4680,6 +8983,7 @@ pub struct GridTemplateAreasValue { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type GridTemplateAreasValue_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_GridTemplateAreasValue() { assert_eq!(::std::mem::size_of::<GridTemplateAreasValue>() , 40usize); @@ -4692,13 +8996,14 @@ pub struct FontFamilyListRefCnt { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type FontFamilyListRefCnt_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_FontFamilyListRefCnt() { assert_eq!(::std::mem::size_of::<FontFamilyListRefCnt>() , 32usize); assert_eq!(::std::mem::align_of::<FontFamilyListRefCnt>() , 8usize); } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSUnit { eCSSUnit_Null = 0, eCSSUnit_Auto = 1, @@ -4787,184 +9092,71 @@ pub enum nsCSSUnit { } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValue { - pub mUnit: nsCSSUnit, - pub mValue: nsCSSValue_nsCSSValue_h_unnamed_13, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsCSSValue_Serialization { eNormalized = 0, eAuthorSpecified = 1, } -#[repr(C)] -#[derive(Debug, Copy)] -pub struct nsCSSValue_nsCSSValue_h_unnamed_13 { - pub mInt: __BindgenUnionField<i32>, - pub mFloat: __BindgenUnionField<f32>, - pub mString: __BindgenUnionField<*mut nsStringBuffer>, - pub mColor: __BindgenUnionField<nscolor>, - pub mArray: __BindgenUnionField<*mut Array>, - pub mURL: __BindgenUnionField<*mut URLValue>, - pub mImage: __BindgenUnionField<*mut ImageValue>, - pub mGridTemplateAreas: __BindgenUnionField<*mut GridTemplateAreasValue>, - pub mGradient: __BindgenUnionField<*mut nsCSSValueGradient>, - pub mTokenStream: __BindgenUnionField<*mut nsCSSValueTokenStream>, - pub mPair: __BindgenUnionField<*mut nsCSSValuePair_heap>, - pub mRect: __BindgenUnionField<*mut nsCSSRect_heap>, - pub mTriplet: __BindgenUnionField<*mut nsCSSValueTriplet_heap>, - pub mList: __BindgenUnionField<*mut nsCSSValueList_heap>, - pub mListDependent: __BindgenUnionField<*mut nsCSSValueList>, - pub mSharedList: __BindgenUnionField<*mut nsCSSValueSharedList>, - pub mPairList: __BindgenUnionField<*mut nsCSSValuePairList_heap>, - pub mPairListDependent: __BindgenUnionField<*mut nsCSSValuePairList>, - pub mFloatColor: __BindgenUnionField<*mut nsCSSValueFloatColor>, - pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>, - pub _bindgen_data_: u64, -} -impl nsCSSValue_nsCSSValue_h_unnamed_13 { - pub unsafe fn mInt(&mut self) -> *mut i32 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mFloat(&mut self) -> *mut f32 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mString(&mut self) -> *mut *mut nsStringBuffer { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mColor(&mut self) -> *mut nscolor { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mArray(&mut self) -> *mut *mut Array { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mURL(&mut self) -> *mut *mut URLValue { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mImage(&mut self) -> *mut *mut ImageValue { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mGridTemplateAreas(&mut self) - -> *mut *mut GridTemplateAreasValue { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mGradient(&mut self) -> *mut *mut nsCSSValueGradient { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mTokenStream(&mut self) -> *mut *mut nsCSSValueTokenStream { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPair(&mut self) -> *mut *mut nsCSSValuePair_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mRect(&mut self) -> *mut *mut nsCSSRect_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mTriplet(&mut self) -> *mut *mut nsCSSValueTriplet_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mList(&mut self) -> *mut *mut nsCSSValueList_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mListDependent(&mut self) -> *mut *mut nsCSSValueList { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mSharedList(&mut self) -> *mut *mut nsCSSValueSharedList { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPairList(&mut self) -> *mut *mut nsCSSValuePairList_heap { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPairListDependent(&mut self) - -> *mut *mut nsCSSValuePairList { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mFloatColor(&mut self) -> *mut *mut nsCSSValueFloatColor { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mFontFamilyList(&mut self) - -> *mut *mut FontFamilyListRefCnt { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsCSSValue_nsCSSValue_h_unnamed_13 { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_nsCSSValue_nsCSSValue_h_unnamed_13() { - assert_eq!(::std::mem::size_of::<nsCSSValue_nsCSSValue_h_unnamed_13>() , - 8usize); - assert_eq!(::std::mem::align_of::<nsCSSValue_nsCSSValue_h_unnamed_13>() , - 8usize); -} -#[test] -fn bindgen_test_layout_nsCSSValue() { - assert_eq!(::std::mem::size_of::<nsCSSValue>() , 16usize); - assert_eq!(::std::mem::align_of::<nsCSSValue>() , 8usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct Array { - pub mRefCnt: usize, - pub mCount: usize, - pub mArray: [nsCSSValue; 1usize], +pub struct nsCSSValueGradient { + pub mIsRadial: bool, + pub mIsRepeating: bool, + pub mIsLegacySyntax: bool, + pub mIsExplicitSize: bool, + pub mBgPos: nsCSSValuePair, + pub mAngle: nsCSSValue, + pub mRadialValues: [nsCSSValue; 2usize], + pub mStops: nsTArray<nsCSSValueGradientStop>, + pub mRefCnt: nsAutoRefCnt, + pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValueGradient_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_Array() { - assert_eq!(::std::mem::size_of::<Array>() , 32usize); - assert_eq!(::std::mem::align_of::<Array>() , 8usize); +fn bindgen_test_layout_nsCSSValueGradient() { + assert_eq!(::std::mem::size_of::<nsCSSValueGradient>() , 112usize); + assert_eq!(::std::mem::align_of::<nsCSSValueGradient>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueList { - pub mValue: nsCSSValue, - pub mNext: *mut nsCSSValueList, +pub struct nsCSSValuePair { + pub mXValue: nsCSSValue, + pub mYValue: nsCSSValue, } #[test] -fn bindgen_test_layout_nsCSSValueList() { - assert_eq!(::std::mem::size_of::<nsCSSValueList>() , 24usize); - assert_eq!(::std::mem::align_of::<nsCSSValueList>() , 8usize); +fn bindgen_test_layout_nsCSSValuePair() { + assert_eq!(::std::mem::size_of::<nsCSSValuePair>() , 32usize); + assert_eq!(::std::mem::align_of::<nsCSSValuePair>() , 8usize); } +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum Serialization { eNormalized = 0, eAuthorSpecified = 1, } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueList_heap { - pub _base: nsCSSValueList, +pub struct nsCSSValuePair_heap { + pub _base: nsCSSValuePair, pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValuePair_heap_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValueList_heap() { - assert_eq!(::std::mem::size_of::<nsCSSValueList_heap>() , 40usize); - assert_eq!(::std::mem::align_of::<nsCSSValueList_heap>() , 8usize); +fn bindgen_test_layout_nsCSSValuePair_heap() { + assert_eq!(::std::mem::size_of::<nsCSSValuePair_heap>() , 48usize); + assert_eq!(::std::mem::align_of::<nsCSSValuePair_heap>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueSharedList { +pub struct nsCSSValueTokenStream { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, - pub mHead: *mut nsCSSValueList, + pub mPropertyID: nsCSSPropertyID, + pub mShorthandPropertyID: nsCSSPropertyID, + pub mTokenStream: nsString, + pub mBaseURI: nsCOMPtr<nsIURI>, + pub mSheetURI: nsCOMPtr<nsIURI>, + pub mSheetPrincipal: nsCOMPtr<nsIPrincipal>, + pub mLineNumber: u32, + pub mLineOffset: u32, + pub mLevel: SheetType, } +pub type nsCSSValueTokenStream_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValueSharedList() { - assert_eq!(::std::mem::size_of::<nsCSSValueSharedList>() , 24usize); - assert_eq!(::std::mem::align_of::<nsCSSValueSharedList>() , 8usize); +fn bindgen_test_layout_nsCSSValueTokenStream() { + assert_eq!(::std::mem::size_of::<nsCSSValueTokenStream>() , 80usize); + assert_eq!(::std::mem::align_of::<nsCSSValueTokenStream>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -4974,15 +9166,16 @@ pub struct nsCSSRect { pub mBottom: nsCSSValue, pub mLeft: nsCSSValue, } +pub type nsCSSRect_side_type = *mut nsCSSValue; +extern "C" { + #[link_name = "_ZN9nsCSSRect5sidesE"] + pub static mut nsCSSRect_sides: [nsCSSRect_side_type; 4usize]; +} #[test] fn bindgen_test_layout_nsCSSRect() { assert_eq!(::std::mem::size_of::<nsCSSRect>() , 64usize); assert_eq!(::std::mem::align_of::<nsCSSRect>() , 8usize); } -extern "C" { - #[link_name = "_ZN9nsCSSRect5sidesE"] - pub static mut nsCSSRect_consts_sides: [::std::os::raw::c_void; 4usize]; -} #[repr(C)] #[derive(Debug)] pub struct nsCSSRect_heap { @@ -4990,6 +9183,7 @@ pub struct nsCSSRect_heap { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSRect_heap_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_nsCSSRect_heap() { assert_eq!(::std::mem::size_of::<nsCSSRect_heap>() , 80usize); @@ -4997,50 +9191,40 @@ fn bindgen_test_layout_nsCSSRect_heap() { } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValuePair { - pub mXValue: nsCSSValue, - pub mYValue: nsCSSValue, +pub struct nsCSSValueList { + pub mValue: nsCSSValue, + pub mNext: *mut nsCSSValueList, } #[test] -fn bindgen_test_layout_nsCSSValuePair() { - assert_eq!(::std::mem::size_of::<nsCSSValuePair>() , 32usize); - assert_eq!(::std::mem::align_of::<nsCSSValuePair>() , 8usize); +fn bindgen_test_layout_nsCSSValueList() { + assert_eq!(::std::mem::size_of::<nsCSSValueList>() , 24usize); + assert_eq!(::std::mem::align_of::<nsCSSValueList>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValuePair_heap { - pub _base: nsCSSValuePair, +pub struct nsCSSValueList_heap { + pub _base: nsCSSValueList, pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValueList_heap_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValuePair_heap() { - assert_eq!(::std::mem::size_of::<nsCSSValuePair_heap>() , 48usize); - assert_eq!(::std::mem::align_of::<nsCSSValuePair_heap>() , 8usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct nsCSSValueTriplet { - pub mXValue: nsCSSValue, - pub mYValue: nsCSSValue, - pub mZValue: nsCSSValue, -} -#[test] -fn bindgen_test_layout_nsCSSValueTriplet() { - assert_eq!(::std::mem::size_of::<nsCSSValueTriplet>() , 48usize); - assert_eq!(::std::mem::align_of::<nsCSSValueTriplet>() , 8usize); +fn bindgen_test_layout_nsCSSValueList_heap() { + assert_eq!(::std::mem::size_of::<nsCSSValueList_heap>() , 40usize); + assert_eq!(::std::mem::align_of::<nsCSSValueList_heap>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueTriplet_heap { - pub _base: nsCSSValueTriplet, +pub struct nsCSSValueSharedList { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, + pub mHead: *mut nsCSSValueList, } +pub type nsCSSValueSharedList_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValueTriplet_heap() { - assert_eq!(::std::mem::size_of::<nsCSSValueTriplet_heap>() , 64usize); - assert_eq!(::std::mem::align_of::<nsCSSValueTriplet_heap>() , 8usize); +fn bindgen_test_layout_nsCSSValueSharedList() { + assert_eq!(::std::mem::size_of::<nsCSSValueSharedList>() , 24usize); + assert_eq!(::std::mem::align_of::<nsCSSValueSharedList>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -5061,6 +9245,7 @@ pub struct nsCSSValuePairList_heap { pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, } +pub type nsCSSValuePairList_heap_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_nsCSSValuePairList_heap() { assert_eq!(::std::mem::size_of::<nsCSSValuePairList_heap>() , 56usize); @@ -5068,53 +9253,28 @@ fn bindgen_test_layout_nsCSSValuePairList_heap() { } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueGradientStop { - pub mLocation: nsCSSValue, - pub mColor: nsCSSValue, - pub mIsInterpolationHint: bool, +pub struct nsCSSValueTriplet { + pub mXValue: nsCSSValue, + pub mYValue: nsCSSValue, + pub mZValue: nsCSSValue, } #[test] -fn bindgen_test_layout_nsCSSValueGradientStop() { - assert_eq!(::std::mem::size_of::<nsCSSValueGradientStop>() , 40usize); - assert_eq!(::std::mem::align_of::<nsCSSValueGradientStop>() , 8usize); +fn bindgen_test_layout_nsCSSValueTriplet() { + assert_eq!(::std::mem::size_of::<nsCSSValueTriplet>() , 48usize); + assert_eq!(::std::mem::align_of::<nsCSSValueTriplet>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct nsCSSValueGradient { - pub mIsRadial: bool, - pub mIsRepeating: bool, - pub mIsLegacySyntax: bool, - pub mIsExplicitSize: bool, - pub mBgPos: nsCSSValuePair, - pub mAngle: nsCSSValue, - pub mRadialValues: [nsCSSValue; 2usize], - pub mStops: nsTArray<nsCSSValueGradientStop>, - pub mRefCnt: nsAutoRefCnt, - pub _mOwningThread: nsAutoOwningThread, -} -#[test] -fn bindgen_test_layout_nsCSSValueGradient() { - assert_eq!(::std::mem::size_of::<nsCSSValueGradient>() , 112usize); - assert_eq!(::std::mem::align_of::<nsCSSValueGradient>() , 8usize); -} -#[repr(C)] -pub struct nsCSSValueTokenStream { +pub struct nsCSSValueTriplet_heap { + pub _base: nsCSSValueTriplet, pub mRefCnt: nsAutoRefCnt, pub _mOwningThread: nsAutoOwningThread, - pub mPropertyID: nsCSSPropertyID, - pub mShorthandPropertyID: nsCSSPropertyID, - pub mTokenStream: nsString, - pub mBaseURI: nsCOMPtr<nsIURI>, - pub mSheetURI: nsCOMPtr<nsIURI>, - pub mSheetPrincipal: nsCOMPtr<nsIPrincipal>, - pub mLineNumber: u32, - pub mLineOffset: u32, - pub mLevel: SheetType, } +pub type nsCSSValueTriplet_heap_HasThreadSafeRefCnt = FalseType; #[test] -fn bindgen_test_layout_nsCSSValueTokenStream() { - assert_eq!(::std::mem::size_of::<nsCSSValueTokenStream>() , 80usize); - assert_eq!(::std::mem::align_of::<nsCSSValueTokenStream>() , 8usize); +fn bindgen_test_layout_nsCSSValueTriplet_heap() { + assert_eq!(::std::mem::size_of::<nsCSSValueTriplet_heap>() , 64usize); + assert_eq!(::std::mem::align_of::<nsCSSValueTriplet_heap>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -5126,6 +9286,7 @@ pub struct nsCSSValueFloatColor { pub mComponent3: f32, pub mAlpha: f32, } +pub type nsCSSValueFloatColor_HasThreadSafeRefCnt = FalseType; #[test] fn bindgen_test_layout_nsCSSValueFloatColor() { assert_eq!(::std::mem::size_of::<nsCSSValueFloatColor>() , 32usize); @@ -5133,420 +9294,161 @@ fn bindgen_test_layout_nsCSSValueFloatColor() { } #[repr(C)] #[derive(Debug)] -pub struct nsCSSCornerSizes { - pub mTopLeft: nsCSSValue, - pub mTopRight: nsCSSValue, - pub mBottomRight: nsCSSValue, - pub mBottomLeft: nsCSSValue, +pub struct nsCSSValue { + pub mUnit: nsCSSUnit, + pub mValue: nsCSSValue__bindgen_ty_bindgen_id_203528, +} +#[repr(C)] +#[derive(Debug)] +pub struct nsCSSValue_Array { + pub mRefCnt: usize, + pub mCount: usize, + pub mArray: [nsCSSValue; 1usize], } #[test] -fn bindgen_test_layout_nsCSSCornerSizes() { - assert_eq!(::std::mem::size_of::<nsCSSCornerSizes>() , 64usize); - assert_eq!(::std::mem::align_of::<nsCSSCornerSizes>() , 8usize); -} -extern "C" { - #[link_name = "_ZN16nsCSSCornerSizes7cornersE"] - pub static mut nsCSSCornerSizes_consts_corners: - [::std::os::raw::c_void; 4usize]; +fn bindgen_test_layout_nsCSSValue_Array() { + assert_eq!(::std::mem::size_of::<nsCSSValue_Array>() , 32usize); + assert_eq!(::std::mem::align_of::<nsCSSValue_Array>() , 8usize); } -pub enum WritingMode { } -pub type CounterValue = i32; -pub enum NegativeType { } -pub enum PadType { } #[repr(C)] #[derive(Debug, Copy)] -pub struct CounterStyle { - pub _vftable: *const _vftable_CounterStyle, - pub mStyle: i32, +pub struct nsCSSValue__bindgen_ty_bindgen_id_203528 { + pub mInt: __BindgenUnionField<i32>, + pub mFloat: __BindgenUnionField<f32>, + pub mString: __BindgenUnionField<*mut nsStringBuffer>, + pub mColor: __BindgenUnionField<nscolor>, + pub mArray: __BindgenUnionField<*mut nsCSSValue_Array>, + pub mURL: __BindgenUnionField<*mut URLValue>, + pub mImage: __BindgenUnionField<*mut ImageValue>, + pub mGridTemplateAreas: __BindgenUnionField<*mut GridTemplateAreasValue>, + pub mGradient: __BindgenUnionField<*mut nsCSSValueGradient>, + pub mTokenStream: __BindgenUnionField<*mut nsCSSValueTokenStream>, + pub mPair: __BindgenUnionField<*mut nsCSSValuePair_heap>, + pub mRect: __BindgenUnionField<*mut nsCSSRect_heap>, + pub mTriplet: __BindgenUnionField<*mut nsCSSValueTriplet_heap>, + pub mList: __BindgenUnionField<*mut nsCSSValueList_heap>, + pub mListDependent: __BindgenUnionField<*mut nsCSSValueList>, + pub mSharedList: __BindgenUnionField<*mut nsCSSValueSharedList>, + pub mPairList: __BindgenUnionField<*mut nsCSSValuePairList_heap>, + pub mPairListDependent: __BindgenUnionField<*mut nsCSSValuePairList>, + pub mFloatColor: __BindgenUnionField<*mut nsCSSValueFloatColor>, + pub mFontFamilyList: __BindgenUnionField<*mut FontFamilyListRefCnt>, + pub bindgen_union_field: u64, } -#[repr(C)] -pub struct _vftable_CounterStyle { - pub _bindgen_empty_ctype_warning_fix: u64, +#[test] +fn bindgen_test_layout_nsCSSValue__bindgen_ty_bindgen_id_203528() { + assert_eq!(::std::mem::size_of::<nsCSSValue__bindgen_ty_bindgen_id_203528>() + , 8usize); + assert_eq!(::std::mem::align_of::<nsCSSValue__bindgen_ty_bindgen_id_203528>() + , 8usize); } -impl ::std::clone::Clone for CounterStyle { +impl Clone for nsCSSValue__bindgen_ty_bindgen_id_203528 { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_CounterStyle() { - assert_eq!(::std::mem::size_of::<CounterStyle>() , 16usize); - assert_eq!(::std::mem::align_of::<CounterStyle>() , 8usize); +fn bindgen_test_layout_nsCSSValue() { + assert_eq!(::std::mem::size_of::<nsCSSValue>() , 16usize); + assert_eq!(::std::mem::align_of::<nsCSSValue>() , 8usize); } #[repr(C)] #[derive(Debug)] -pub struct AnonymousCounterStyle { - pub _base: CounterStyle, - pub mRefCnt: nsAutoRefCnt, - pub _mOwningThread: nsAutoOwningThread, - pub mSingleString: bool, - pub mSystem: u8, - pub mSymbols: nsTArray<nsString>, -} -#[repr(C)] -pub struct _vftable_AnonymousCounterStyle { - pub _base: _vftable_CounterStyle, +pub struct nsCSSValueGradientStop { + pub mLocation: nsCSSValue, + pub mColor: nsCSSValue, + pub mIsInterpolationHint: bool, } #[test] -fn bindgen_test_layout_AnonymousCounterStyle() { - assert_eq!(::std::mem::size_of::<AnonymousCounterStyle>() , 48usize); - assert_eq!(::std::mem::align_of::<AnonymousCounterStyle>() , 8usize); +fn bindgen_test_layout_nsCSSValueGradientStop() { + assert_eq!(::std::mem::size_of::<nsCSSValueGradientStop>() , 40usize); + assert_eq!(::std::mem::align_of::<nsCSSValueGradientStop>() , 8usize); } #[repr(C)] -pub struct CounterStyleManager { - pub _bindgen_opaque_blob: [u64; 8usize], +pub struct bindgen_vtable__bindgen_id_203735 { } -#[test] -fn bindgen_test_layout_CounterStyleManager() { - assert_eq!(::std::mem::size_of::<CounterStyleManager>() , 64usize); - assert_eq!(::std::mem::align_of::<CounterStyleManager>() , 8usize); -} -/** - * A class for holding strong references to nsPresArena-allocated - * objects. - * - * Since the arena's lifetime is not related to the refcounts - * of the objects allocated within it, it is possible to have a strong - * reference to an arena-allocated object that lives until the - * destruction of the arena. An ArenaRefPtr acts like a weak reference - * in that it will clear its referent if the arena is about to go away. - * - * T must be a class that has these two methods: - * - * static mozilla::ArenaObjectID ArenaObjectID(); - * U* Arena(); - * - * where U is a class that has these two methods: - * - * void RegisterArenaRefPtr(ArenaRefPtr<T>*); - * void DeregisterArenaRefPtr(ArenaRefPtr<T>*); - * - * Currently, both nsPresArena and nsIPresShell can be used as U. - * - * The ArenaObjectID method must return the mozilla::ArenaObjectID that - * uniquely identifies T, and the Arena method must return the nsPresArena - * (or a proxy for it) in which the object was allocated. - */ #[repr(C)] -#[derive(Debug)] -pub struct ArenaRefPtr<T> { - pub mPtr: RefPtr<T>, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum gfxFontConstants_h_unnamed_14 { - eFeatureAlternates_historical = 0, - eFeatureAlternates_stylistic = 1, - eFeatureAlternates_styleset = 2, - eFeatureAlternates_character_variant = 3, - eFeatureAlternates_swash = 4, - eFeatureAlternates_ornaments = 5, - eFeatureAlternates_annotation = 6, - eFeatureAlternates_numFeatures = 7, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum gfxFontConstants_h_unnamed_15 { - eFeatureEastAsian_jis78 = 0, - eFeatureEastAsian_jis83 = 1, - eFeatureEastAsian_jis90 = 2, - eFeatureEastAsian_jis04 = 3, - eFeatureEastAsian_simplified = 4, - eFeatureEastAsian_traditional = 5, - eFeatureEastAsian_full_width = 6, - eFeatureEastAsian_prop_width = 7, - eFeatureEastAsian_ruby = 8, - eFeatureEastAsian_numFeatures = 9, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum gfxFontConstants_h_unnamed_16 { - eFeatureLigatures_none = 0, - eFeatureLigatures_common = 1, - eFeatureLigatures_no_common = 2, - eFeatureLigatures_discretionary = 3, - eFeatureLigatures_no_discretionary = 4, - eFeatureLigatures_historical = 5, - eFeatureLigatures_no_historical = 6, - eFeatureLigatures_contextual = 7, - eFeatureLigatures_no_contextual = 8, - eFeatureLigatures_numFeatures = 9, +#[derive(Debug, Copy)] +pub struct CounterStyle { + pub vtable_: *const bindgen_vtable__bindgen_id_203735, + pub mStyle: i32, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum gfxFontConstants_h_unnamed_17 { - eFeatureNumeric_lining = 0, - eFeatureNumeric_oldstyle = 1, - eFeatureNumeric_proportional = 2, - eFeatureNumeric_tabular = 3, - eFeatureNumeric_diagonal_fractions = 4, - eFeatureNumeric_stacked_fractions = 5, - eFeatureNumeric_slashedzero = 6, - eFeatureNumeric_ordinal = 7, - eFeatureNumeric_numFeatures = 8, -} -pub const eFontPrefLang_First: eFontPrefLang = - eFontPrefLang::eFontPrefLang_Western; -pub const eFontPrefLang_Last: eFontPrefLang = - eFontPrefLang::eFontPrefLang_Others; -pub const eFontPrefLang_Count: eFontPrefLang = - eFontPrefLang::eFontPrefLang_CJKSet; -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum eFontPrefLang { - eFontPrefLang_Western = 0, - eFontPrefLang_Japanese = 1, - eFontPrefLang_ChineseTW = 2, - eFontPrefLang_ChineseCN = 3, - eFontPrefLang_ChineseHK = 4, - eFontPrefLang_Korean = 5, - eFontPrefLang_Cyrillic = 6, - eFontPrefLang_Greek = 7, - eFontPrefLang_Thai = 8, - eFontPrefLang_Hebrew = 9, - eFontPrefLang_Arabic = 10, - eFontPrefLang_Devanagari = 11, - eFontPrefLang_Tamil = 12, - eFontPrefLang_Armenian = 13, - eFontPrefLang_Bengali = 14, - eFontPrefLang_Canadian = 15, - eFontPrefLang_Ethiopic = 16, - eFontPrefLang_Georgian = 17, - eFontPrefLang_Gujarati = 18, - eFontPrefLang_Gurmukhi = 19, - eFontPrefLang_Khmer = 20, - eFontPrefLang_Malayalam = 21, - eFontPrefLang_Mathematics = 22, - eFontPrefLang_Oriya = 23, - eFontPrefLang_Telugu = 24, - eFontPrefLang_Kannada = 25, - eFontPrefLang_Sinhala = 26, - eFontPrefLang_Tibetan = 27, - eFontPrefLang_Others = 28, - eFontPrefLang_CJKSet = 29, +#[test] +fn bindgen_test_layout_CounterStyle() { + assert_eq!(::std::mem::size_of::<CounterStyle>() , 16usize); + assert_eq!(::std::mem::align_of::<CounterStyle>() , 8usize); } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum LogicalAxis { eLogicalAxisBlock = 0, eLogicalAxisInline = 1, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum LogicalEdge { eLogicalEdgeStart = 0, eLogicalEdgeEnd = 1, } -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum LogicalSide { - eLogicalSideBStart = 0, - eLogicalSideBEnd = 1, - eLogicalSideIStart = 2, - eLogicalSideIEnd = 3, -} -pub const eStyleUnit_MAX: nsStyleUnit = nsStyleUnit::eStyleUnit_Calc; -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleUnit { - eStyleUnit_Null = 0, - eStyleUnit_Normal = 1, - eStyleUnit_Auto = 2, - eStyleUnit_None = 3, - eStyleUnit_Percent = 10, - eStyleUnit_Factor = 11, - eStyleUnit_Degree = 12, - eStyleUnit_Grad = 13, - eStyleUnit_Radian = 14, - eStyleUnit_Turn = 15, - eStyleUnit_FlexFraction = 16, - eStyleUnit_Coord = 20, - eStyleUnit_Integer = 30, - eStyleUnit_Enumerated = 32, - eStyleUnit_Calc = 40, +impl Clone for CounterStyle { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleCoord_h_unnamed_18 { - pub mInt: __BindgenUnionField<i32>, - pub mFloat: __BindgenUnionField<f32>, - pub mPointer: __BindgenUnionField<*mut ::std::os::raw::c_void>, - pub _bindgen_data_: u64, -} -impl nsStyleCoord_h_unnamed_18 { - pub unsafe fn mInt(&mut self) -> *mut i32 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mFloat(&mut self) -> *mut f32 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPointer(&mut self) -> *mut *mut ::std::os::raw::c_void { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleCoord_h_unnamed_18 { - fn clone(&self) -> Self { *self } +pub struct LookAndFeelInt { + pub id: i32, + pub value: i32, } #[test] -fn bindgen_test_layout_nsStyleCoord_h_unnamed_18() { - assert_eq!(::std::mem::size_of::<nsStyleCoord_h_unnamed_18>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleCoord_h_unnamed_18>() , 8usize); -} -pub type nsStyleUnion = nsStyleCoord_h_unnamed_18; -/** - * Class that hold a single size specification used by the style - * system. The size specification consists of two parts -- a number - * and a unit. The number is an integer, a floating point value, an - * nscoord, or undefined, and the unit is an nsStyleUnit. Checking - * the unit is a must before asking for the value in any particular - * form. - */ - /** <div rustbindgen private accessor="unsafe"></div> */ -#[repr(C)] -#[derive(Debug)] -pub struct nsStyleCoord { - mUnit: nsStyleUnit, - mValue: nsStyleUnion, +fn bindgen_test_layout_LookAndFeelInt() { + assert_eq!(::std::mem::size_of::<LookAndFeelInt>() , 8usize); + assert_eq!(::std::mem::align_of::<LookAndFeelInt>() , 4usize); } -impl nsStyleCoord { - #[inline] - pub unsafe fn get_mUnit(&self) -> &nsStyleUnit { &self.mUnit } - pub unsafe fn get_mUnit_mut(&mut self) -> &mut nsStyleUnit { - &mut self.mUnit - } - #[inline] - pub unsafe fn get_mValue(&self) -> &nsStyleUnion { &self.mValue } - pub unsafe fn get_mValue_mut(&mut self) -> &mut nsStyleUnion { - &mut self.mValue - } +impl Clone for LookAndFeelInt { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleCoord_CalcValue { - pub mLength: nscoord, - pub mPercent: f32, - pub mHasPercent: bool, +pub struct imgIContainer { + pub _address: u8, } -impl ::std::clone::Clone for nsStyleCoord_CalcValue { +impl Clone for imgIContainer { fn clone(&self) -> Self { *self } } -#[test] -fn bindgen_test_layout_nsStyleCoord_CalcValue() { - assert_eq!(::std::mem::size_of::<nsStyleCoord_CalcValue>() , 12usize); - assert_eq!(::std::mem::align_of::<nsStyleCoord_CalcValue>() , 4usize); -} -#[repr(C)] -#[derive(Debug)] -pub struct nsStyleCoord_Calc { - pub _base: nsStyleCoord_CalcValue, - pub mRefCnt: ThreadSafeAutoRefCnt, -} -#[test] -fn bindgen_test_layout_nsStyleCoord_Calc() { - assert_eq!(::std::mem::size_of::<nsStyleCoord_Calc>() , 24usize); - assert_eq!(::std::mem::align_of::<nsStyleCoord_Calc>() , 8usize); -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleCoord_CoordConstructorType { CoordConstructor = 0, } -#[test] -fn bindgen_test_layout_nsStyleCoord() { - assert_eq!(::std::mem::size_of::<nsStyleCoord>() , 16usize); - assert_eq!(::std::mem::align_of::<nsStyleCoord>() , 8usize); -} -/** - * Class that represents a set of top/right/bottom/left nsStyleCoords. - * This is commonly used to hold the widths of the borders, margins, - * or paddings of a box. - */ - /** <div rustbindgen private accessor="unsafe"></div> */ #[repr(C)] -#[derive(Debug)] -pub struct nsStyleSides { - mUnits: [nsStyleUnit; 4usize], - mValues: [nsStyleUnion; 4usize], -} -impl nsStyleSides { - #[inline] - pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 4usize] { &self.mUnits } - pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 4usize] { - &mut self.mUnits - } - #[inline] - pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 4usize] { - &self.mValues - } - pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 4usize] { - &mut self.mValues - } +#[derive(Debug, Copy)] +pub struct ImageURL { + pub _address: u8, } -#[test] -fn bindgen_test_layout_nsStyleSides() { - assert_eq!(::std::mem::size_of::<nsStyleSides>() , 40usize); - assert_eq!(::std::mem::align_of::<nsStyleSides>() , 8usize); +impl Clone for ImageURL { + fn clone(&self) -> Self { *self } } -/** - * Class that represents a set of top-left/top-right/bottom-right/bottom-left - * nsStyleCoord pairs. This is used to hold the dimensions of the - * corners of a box (for, e.g., border-radius and outline-radius). - */ - /** <div rustbindgen private accessor="unsafe"></div> */ #[repr(C)] -#[derive(Debug)] -pub struct nsStyleCorners { - mUnits: [nsStyleUnit; 8usize], - mValues: [nsStyleUnion; 8usize], -} -impl nsStyleCorners { - #[inline] - pub unsafe fn get_mUnits(&self) -> &[nsStyleUnit; 8usize] { &self.mUnits } - pub unsafe fn get_mUnits_mut(&mut self) -> &mut [nsStyleUnit; 8usize] { - &mut self.mUnits - } - #[inline] - pub unsafe fn get_mValues(&self) -> &[nsStyleUnion; 8usize] { - &self.mValues - } - pub unsafe fn get_mValues_mut(&mut self) -> &mut [nsStyleUnion; 8usize] { - &mut self.mValues - } +#[derive(Debug, Copy)] +pub struct Image { + pub _address: u8, } -#[test] -fn bindgen_test_layout_nsStyleCorners() { - assert_eq!(::std::mem::size_of::<nsStyleCorners>() , 72usize); - assert_eq!(::std::mem::align_of::<nsStyleCorners>() , 8usize); +impl Clone for Image { + fn clone(&self) -> Self { *self } } -pub enum imgIContainer { } -pub enum imgINotificationObserver { } #[repr(C)] -pub struct imgIRequest { - pub _bindgen_opaque_blob: u64, +#[derive(Debug, Copy)] +pub struct ProgressTracker { + pub _address: u8, } -#[test] -fn bindgen_test_layout_imgIRequest() { - assert_eq!(::std::mem::size_of::<imgIRequest>() , 8usize); - assert_eq!(::std::mem::align_of::<imgIRequest>() , 8usize); +impl Clone for ProgressTracker { + fn clone(&self) -> Self { *self } } -pub enum imgStatusNotifyRunnable { } -pub enum ProxyBehaviour { } -pub enum Image { } -pub enum ImageURL { } -pub enum ProgressTracker { } #[repr(C)] -pub struct imgRequestProxy { - pub _bindgen_opaque_blob: [u64; 15usize], +#[derive(Debug, Copy)] +pub struct ProxyBehaviour { + pub _address: u8, } -#[test] -fn bindgen_test_layout_imgRequestProxy() { - assert_eq!(::std::mem::size_of::<imgRequestProxy>() , 120usize); - assert_eq!(::std::mem::align_of::<imgRequestProxy>() , 8usize); +impl Clone for ProxyBehaviour { + fn clone(&self) -> Self { *self } } #[repr(C)] -pub struct imgRequestProxyStatic { - pub _bindgen_opaque_blob: [u64; 16usize], +#[derive(Debug)] +pub struct nsStyleVisibility { + pub mImageOrientation: nsStyleImageOrientation, + pub mDirection: u8, + pub mVisible: u8, + pub mImageRendering: u8, + pub mWritingMode: u8, + pub mTextOrientation: u8, + pub mColorAdjust: u8, } #[test] -fn bindgen_test_layout_imgRequestProxyStatic() { - assert_eq!(::std::mem::size_of::<imgRequestProxyStatic>() , 128usize); - assert_eq!(::std::mem::align_of::<imgRequestProxyStatic>() , 8usize); +fn bindgen_test_layout_nsStyleVisibility() { + assert_eq!(::std::mem::size_of::<nsStyleVisibility>() , 7usize); + assert_eq!(::std::mem::align_of::<nsStyleVisibility>() , 1usize); } -pub enum nsStyleContext { } -pub enum nsTextFrame { } #[repr(C)] #[derive(Debug)] pub struct FragmentOrURL { @@ -5561,18 +9463,20 @@ fn bindgen_test_layout_FragmentOrURL() { #[repr(C)] #[derive(Debug, Copy)] pub struct Position { - pub mXPosition: nsStyleCoord_CalcValue, - pub mYPosition: nsStyleCoord_CalcValue, -} -impl ::std::clone::Clone for Position { - fn clone(&self) -> Self { *self } + pub mXPosition: Position_Coord, + pub mYPosition: Position_Coord, } +pub type Position_Coord = nsStyleCoord_CalcValue; #[test] fn bindgen_test_layout_Position() { assert_eq!(::std::mem::size_of::<Position>() , 24usize); assert_eq!(::std::mem::align_of::<Position>() , 4usize); } +impl Clone for Position { + fn clone(&self) -> Self { *self } +} #[repr(C)] +#[derive(Debug)] pub struct nsStyleFont { pub mFont: nsFont, pub mSize: nscoord, @@ -5620,13 +9524,14 @@ pub struct nsStyleGradient { pub mStops: nsTArray<nsStyleGradientStop>, pub mRefCnt: ThreadSafeAutoRefCnt, } +pub type nsStyleGradient_HasThreadSafeRefCnt = TrueType; #[test] fn bindgen_test_layout_nsStyleGradient() { assert_eq!(::std::mem::size_of::<nsStyleGradient>() , 104usize); assert_eq!(::std::mem::align_of::<nsStyleGradient>() , 8usize); } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageType { eStyleImageType_Null = 0, eStyleImageType_Image = 1, @@ -5634,9 +9539,10 @@ pub enum nsStyleImageType { eStyleImageType_Element = 3, } #[repr(C)] +#[derive(Debug)] pub struct CachedBorderImageData { pub mCachedSVGViewportSize: [u64; 2usize], - pub mSubImages: u64, + pub mSubImages: nsCOMArray<imgIContainer>, } #[test] fn bindgen_test_layout_CachedBorderImageData() { @@ -5654,46 +9560,32 @@ fn bindgen_test_layout_CachedBorderImageData() { * image of type (1)). */ #[repr(C)] +#[derive(Debug)] pub struct nsStyleImage { pub mCachedBIData: UniquePtr<CachedBorderImageData, DefaultDelete<CachedBorderImageData>>, pub mType: nsStyleImageType, - pub nsStyleImage_nsStyleStruct_h_unnamed_21: nsStyleImage_nsStyleStruct_h_unnamed_21, + pub __bindgen_anon_1: nsStyleImage__bindgen_ty_bindgen_id_205690, pub mCropRect: UniquePtr<nsStyleSides, DefaultDelete<nsStyleSides>>, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleImage_nsStyleStruct_h_unnamed_21 { +pub struct nsStyleImage__bindgen_ty_bindgen_id_205690 { pub mImage: __BindgenUnionField<*mut imgRequestProxy>, pub mGradient: __BindgenUnionField<*mut nsStyleGradient>, - pub mElementId: __BindgenUnionField<*mut ::std::os::raw::c_ushort>, - pub _bindgen_data_: u64, -} -impl nsStyleImage_nsStyleStruct_h_unnamed_21 { - pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mGradient(&mut self) -> *mut *mut nsStyleGradient { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mElementId(&mut self) - -> *mut *mut ::std::os::raw::c_ushort { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleImage_nsStyleStruct_h_unnamed_21 { - fn clone(&self) -> Self { *self } + pub mElementId: __BindgenUnionField<*mut u16>, + pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleImage_nsStyleStruct_h_unnamed_21() { - assert_eq!(::std::mem::size_of::<nsStyleImage_nsStyleStruct_h_unnamed_21>() +fn bindgen_test_layout_nsStyleImage__bindgen_ty_bindgen_id_205690() { + assert_eq!(::std::mem::size_of::<nsStyleImage__bindgen_ty_bindgen_id_205690>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleImage_nsStyleStruct_h_unnamed_21>() + assert_eq!(::std::mem::align_of::<nsStyleImage__bindgen_ty_bindgen_id_205690>() , 8usize); } +impl Clone for nsStyleImage__bindgen_ty_bindgen_id_205690 { + fn clone(&self) -> Self { *self } +} #[test] fn bindgen_test_layout_nsStyleImage() { assert_eq!(::std::mem::size_of::<nsStyleImage>() , 32usize); @@ -5720,11 +9612,12 @@ pub struct nsStyleAutoArray<T> { pub mOtherElements: nsTArray<T>, } #[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleAutoArray_WithSingleInitialElement { WITH_SINGLE_INITIAL_ELEMENT = 0, } #[repr(C)] +#[derive(Debug)] pub struct nsStyleImageLayers { pub mAttachmentCount: u32, pub mClipCount: u32, @@ -5740,8 +9633,8 @@ pub struct nsStyleImageLayers { pub mLayers: nsStyleAutoArray<nsStyleImageLayers_Layer>, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleImageLayers_nsStyleStruct_h_unnamed_22 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsStyleImageLayers__bindgen_ty_bindgen_id_205734 { shorthand = 0, color = 1, image = 2, @@ -5755,8 +9648,8 @@ pub enum nsStyleImageLayers_nsStyleStruct_h_unnamed_22 { maskMode = 10, composite = 11, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[repr(u8)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageLayers_LayerType { Background = 0, Mask = 1, } #[repr(C)] #[derive(Debug, Copy)] @@ -5771,9 +9664,6 @@ pub struct nsStyleImageLayers_Size { pub struct nsStyleImageLayers_Size_Dimension { pub _base: nsStyleCoord_CalcValue, } -impl ::std::clone::Clone for nsStyleImageLayers_Size_Dimension { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_nsStyleImageLayers_Size_Dimension() { assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Size_Dimension>() , @@ -5781,8 +9671,11 @@ fn bindgen_test_layout_nsStyleImageLayers_Size_Dimension() { assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Size_Dimension>() , 4usize); } +impl Clone for nsStyleImageLayers_Size_Dimension { + fn clone(&self) -> Self { *self } +} #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageLayers_Size_DimensionType { eContain = 0, eCover = 1, @@ -5790,29 +9683,30 @@ pub enum nsStyleImageLayers_Size_DimensionType { eLengthPercentage = 3, eDimensionType_COUNT = 4, } -impl ::std::clone::Clone for nsStyleImageLayers_Size { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_nsStyleImageLayers_Size() { assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Size>() , 28usize); assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Size>() , 4usize); } +impl Clone for nsStyleImageLayers_Size { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsStyleImageLayers_Repeat { pub mXRepeat: u8, pub mYRepeat: u8, } -impl ::std::clone::Clone for nsStyleImageLayers_Repeat { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_nsStyleImageLayers_Repeat() { assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Repeat>() , 2usize); assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Repeat>() , 1usize); } +impl Clone for nsStyleImageLayers_Repeat { + fn clone(&self) -> Self { *self } +} #[repr(C)] +#[derive(Debug)] pub struct nsStyleImageLayers_Layer { pub mImage: nsStyleImage, pub mSourceURI: FragmentOrURL, @@ -5831,20 +9725,22 @@ fn bindgen_test_layout_nsStyleImageLayers_Layer() { assert_eq!(::std::mem::size_of::<nsStyleImageLayers_Layer>() , 112usize); assert_eq!(::std::mem::align_of::<nsStyleImageLayers_Layer>() , 8usize); } -#[test] -fn bindgen_test_layout_nsStyleImageLayers() { - assert_eq!(::std::mem::size_of::<nsStyleImageLayers>() , 168usize); - assert_eq!(::std::mem::align_of::<nsStyleImageLayers>() , 8usize); -} extern "C" { #[link_name = "_ZN18nsStyleImageLayers21kBackgroundLayerTableE"] - pub static mut nsStyleImageLayers_consts_kBackgroundLayerTable: + pub static mut nsStyleImageLayers_kBackgroundLayerTable: *const nsCSSPropertyID; +} +extern "C" { #[link_name = "_ZN18nsStyleImageLayers15kMaskLayerTableE"] - pub static mut nsStyleImageLayers_consts_kMaskLayerTable: - *const nsCSSPropertyID; + pub static mut nsStyleImageLayers_kMaskLayerTable: *const nsCSSPropertyID; +} +#[test] +fn bindgen_test_layout_nsStyleImageLayers() { + assert_eq!(::std::mem::size_of::<nsStyleImageLayers>() , 168usize); + assert_eq!(::std::mem::align_of::<nsStyleImageLayers>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleBackground { pub mImage: nsStyleImageLayers, pub mBackgroundColor: nscolor, @@ -5908,12 +9804,14 @@ pub struct nsCSSShadowArray { pub mLength: u32, pub mArray: [nsCSSShadowItem; 1usize], } +pub type nsCSSShadowArray_HasThreadSafeRefCnt = TrueType; #[test] fn bindgen_test_layout_nsCSSShadowArray() { assert_eq!(::std::mem::size_of::<nsCSSShadowArray>() , 40usize); assert_eq!(::std::mem::align_of::<nsCSSShadowArray>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleBorder { pub mBorderColors: *mut *mut nsBorderColors, pub mBorderRadius: nsStyleCorners, @@ -5962,14 +9860,18 @@ fn bindgen_test_layout_nsStyleOutline() { #[derive(Debug)] pub struct nsStyleQuoteValues { pub mRefCnt: ThreadSafeAutoRefCnt, - pub mQuotePairs: nsTArray<pair<nsString, nsString>>, + pub mQuotePairs: nsStyleQuoteValues_QuotePairArray, } +pub type nsStyleQuoteValues_QuotePairArray = + nsTArray<pair<nsString, nsString>>; +pub type nsStyleQuoteValues_HasThreadSafeRefCnt = TrueType; #[test] fn bindgen_test_layout_nsStyleQuoteValues() { assert_eq!(::std::mem::size_of::<nsStyleQuoteValues>() , 16usize); assert_eq!(::std::mem::align_of::<nsStyleQuoteValues>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleList { pub mListStylePosition: u8, pub mCounterStyle: RefPtr<CounterStyle>, @@ -5977,18 +9879,19 @@ pub struct nsStyleList { pub mQuotes: RefPtr<nsStyleQuoteValues>, pub mImageRegion: nsRect, } -#[test] -fn bindgen_test_layout_nsStyleList() { - assert_eq!(::std::mem::size_of::<nsStyleList>() , 48usize); - assert_eq!(::std::mem::align_of::<nsStyleList>() , 8usize); -} extern "C" { #[link_name = "_ZN11nsStyleList14sInitialQuotesE"] - pub static mut nsStyleList_consts_sInitialQuotes: + pub static mut nsStyleList_sInitialQuotes: StaticRefPtr<nsStyleQuoteValues>; +} +extern "C" { #[link_name = "_ZN11nsStyleList11sNoneQuotesE"] - pub static mut nsStyleList_consts_sNoneQuotes: - StaticRefPtr<nsStyleQuoteValues>; + pub static mut nsStyleList_sNoneQuotes: StaticRefPtr<nsStyleQuoteValues>; +} +#[test] +fn bindgen_test_layout_nsStyleList() { + assert_eq!(::std::mem::size_of::<nsStyleList>() , 48usize); + assert_eq!(::std::mem::align_of::<nsStyleList>() , 8usize); } #[repr(C)] #[derive(Debug)] @@ -5997,17 +9900,19 @@ pub struct nsStyleGridLine { pub mInteger: i32, pub mLineName: nsString, } +extern "C" { + #[link_name = "_ZN15nsStyleGridLine8kMinLineE"] + pub static nsStyleGridLine_kMinLine: i32; +} +extern "C" { + #[link_name = "_ZN15nsStyleGridLine8kMaxLineE"] + pub static nsStyleGridLine_kMaxLine: i32; +} #[test] fn bindgen_test_layout_nsStyleGridLine() { assert_eq!(::std::mem::size_of::<nsStyleGridLine>() , 24usize); assert_eq!(::std::mem::align_of::<nsStyleGridLine>() , 8usize); } -extern "C" { - #[link_name = "_ZN15nsStyleGridLine8kMinLineE"] - pub static nsStyleGridLine_consts_kMinLine: ::std::os::raw::c_int; - #[link_name = "_ZN15nsStyleGridLine8kMaxLineE"] - pub static nsStyleGridLine_consts_kMaxLine: ::std::os::raw::c_int; -} #[repr(C)] #[derive(Debug)] pub struct nsStyleGridTemplate { @@ -6019,35 +9924,37 @@ pub struct nsStyleGridTemplate { pub mRepeatAutoIndex: i16, pub _bitfield_1: u8, } +#[test] +fn bindgen_test_layout_nsStyleGridTemplate() { + assert_eq!(::std::mem::size_of::<nsStyleGridTemplate>() , 48usize); + assert_eq!(::std::mem::align_of::<nsStyleGridTemplate>() , 8usize); +} impl nsStyleGridTemplate { #[inline] - pub fn mIsAutoFill(&self) -> u8 { - (self._bitfield_1 & (1usize as u8)) >> 0usize + pub fn mIsAutoFill(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u8)) >> + 0u32) as u8) + } } #[inline] pub fn set_mIsAutoFill(&mut self, val: bool) { self._bitfield_1 &= !(1usize as u8); - self._bitfield_1 |= ((val as u8) << 0usize) & (1usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 0u32) & (1usize as u8); } #[inline] - pub fn mIsSubgrid(&self) -> u8 { - (self._bitfield_1 & (2usize as u8)) >> 1usize + pub fn mIsSubgrid(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u8)) >> + 1u32) as u8) + } } #[inline] pub fn set_mIsSubgrid(&mut self, val: bool) { self._bitfield_1 &= !(2usize as u8); - self._bitfield_1 |= ((val as u8) << 1usize) & (2usize as u8); - } - #[inline] - pub fn new_bitfield_1(mIsAutoFill: bool, mIsSubgrid: bool) -> u8 { - 0 | ((mIsAutoFill as u8) << 0u32) | ((mIsSubgrid as u8) << 1u32) + self._bitfield_1 |= ((val as u8 as u8) << 1u32) & (2usize as u8); } } -#[test] -fn bindgen_test_layout_nsStyleGridTemplate() { - assert_eq!(::std::mem::size_of::<nsStyleGridTemplate>() , 48usize); - assert_eq!(::std::mem::align_of::<nsStyleGridTemplate>() , 8usize); -} #[repr(C)] #[derive(Debug)] pub struct nsStylePosition { @@ -6164,121 +10071,109 @@ pub struct nsStyleText { pub mTextShadow: RefPtr<nsCSSShadowArray>, pub mTextEmphasisStyleString: nsString, } +#[test] +fn bindgen_test_layout_nsStyleText() { + assert_eq!(::std::mem::size_of::<nsStyleText>() , 136usize); + assert_eq!(::std::mem::align_of::<nsStyleText>() , 8usize); +} impl nsStyleText { #[inline] - pub fn mTextAlignTrue(&self) -> u8 { - (self._bitfield_1 & (1usize as u8)) >> 0usize + pub fn mTextAlignTrue(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (1usize as u8)) >> + 0u32) as u8) + } } #[inline] pub fn set_mTextAlignTrue(&mut self, val: bool) { self._bitfield_1 &= !(1usize as u8); - self._bitfield_1 |= ((val as u8) << 0usize) & (1usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 0u32) & (1usize as u8); } #[inline] - pub fn mTextAlignLastTrue(&self) -> u8 { - (self._bitfield_1 & (2usize as u8)) >> 1usize + pub fn mTextAlignLastTrue(&self) -> bool { + unsafe { + ::std::mem::transmute(((self._bitfield_1 & (2usize as u8)) >> + 1u32) as u8) + } } #[inline] pub fn set_mTextAlignLastTrue(&mut self, val: bool) { self._bitfield_1 &= !(2usize as u8); - self._bitfield_1 |= ((val as u8) << 1usize) & (2usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 1u32) & (2usize as u8); } #[inline] - pub fn mTextEmphasisColorForeground(&self) -> u8 { - (self._bitfield_1 & (4usize as u8)) >> 2usize + 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) << 2usize) & (4usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 2u32) & (4usize as u8); } #[inline] - pub fn mWebkitTextFillColorForeground(&self) -> u8 { - (self._bitfield_1 & (8usize as u8)) >> 3usize + 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) << 3usize) & (8usize as u8); + self._bitfield_1 |= ((val as u8 as u8) << 3u32) & (8usize as u8); } #[inline] - pub fn mWebkitTextStrokeColorForeground(&self) -> u8 { - (self._bitfield_1 & (16usize as u8)) >> 4usize + 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) << 4usize) & (16usize as u8); - } - #[inline] - pub fn new_bitfield_1(mTextAlignTrue: bool, mTextAlignLastTrue: bool, - mTextEmphasisColorForeground: bool, - mWebkitTextFillColorForeground: bool, - mWebkitTextStrokeColorForeground: bool) -> u8 { - 0 | ((mTextAlignTrue as u8) << 0u32) | - ((mTextAlignLastTrue as u8) << 1u32) | - ((mTextEmphasisColorForeground as u8) << 2u32) | - ((mWebkitTextFillColorForeground as u8) << 3u32) | - ((mWebkitTextStrokeColorForeground as u8) << 4u32) + self._bitfield_1 |= ((val as u8 as u8) << 4u32) & (16usize as u8); } } -#[test] -fn bindgen_test_layout_nsStyleText() { - assert_eq!(::std::mem::size_of::<nsStyleText>() , 136usize); - assert_eq!(::std::mem::align_of::<nsStyleText>() , 8usize); -} #[repr(C)] #[derive(Debug, Copy)] pub struct nsStyleImageOrientation { pub mOrientation: u8, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageOrientation_Bits { ORIENTATION_MASK = 3, FLIP_MASK = 4, FROM_IMAGE_MASK = 8, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleImageOrientation_Angles { ANGLE_0 = 0, ANGLE_90 = 1, ANGLE_180 = 2, ANGLE_270 = 3, } -impl ::std::clone::Clone for nsStyleImageOrientation { - fn clone(&self) -> Self { *self } -} #[test] fn bindgen_test_layout_nsStyleImageOrientation() { assert_eq!(::std::mem::size_of::<nsStyleImageOrientation>() , 1usize); assert_eq!(::std::mem::align_of::<nsStyleImageOrientation>() , 1usize); } -#[repr(C)] -#[derive(Debug)] -pub struct nsStyleVisibility { - pub mImageOrientation: nsStyleImageOrientation, - pub mDirection: u8, - pub mVisible: u8, - pub mImageRendering: u8, - pub mWritingMode: u8, - pub mTextOrientation: u8, - pub mColorAdjust: u8, -} -#[test] -fn bindgen_test_layout_nsStyleVisibility() { - assert_eq!(::std::mem::size_of::<nsStyleVisibility>() , 7usize); - assert_eq!(::std::mem::align_of::<nsStyleVisibility>() , 1usize); +impl Clone for nsStyleImageOrientation { + fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] pub struct nsTimingFunction { pub mType: nsTimingFunction_Type, - pub nsTimingFunction_nsStyleStruct_h_unnamed_23: nsTimingFunction_nsStyleStruct_h_unnamed_23, + pub __bindgen_anon_1: nsTimingFunction__bindgen_ty_bindgen_id_207493, } #[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsTimingFunction_Type { Ease = 0, Linear = 1, @@ -6290,75 +10185,60 @@ pub enum nsTimingFunction_Type { CubicBezier = 7, } #[repr(i32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsTimingFunction_Keyword { Implicit = 0, Explicit = 1, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23 { - pub mFunc: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24>, - pub nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25: __BindgenUnionField<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>, - pub _bindgen_data_: [u32; 4usize], -} -impl nsTimingFunction_nsStyleStruct_h_unnamed_23 { - pub unsafe fn mFunc(&mut self) - -> - *mut nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25(&mut self) - -> - *mut nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsTimingFunction_nsStyleStruct_h_unnamed_23 { - fn clone(&self) -> Self { *self } -} -#[test] -fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23() { - assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23>() - , 16usize); - assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23>() - , 4usize); +pub struct nsTimingFunction__bindgen_ty_bindgen_id_207493 { + pub mFunc: __BindgenUnionField<nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494>, + pub __bindgen_anon_1: __BindgenUnionField<nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505>, + pub bindgen_union_field: [u32; 4usize], } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24 { +pub struct nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494 { pub mX1: f32, pub mY1: f32, pub mX2: f32, pub mY2: f32, } -impl ::std::clone::Clone for - nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24 { - fn clone(&self) -> Self { *self } -} #[test] -fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24() { - assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24>() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494() { + assert_eq!(::std::mem::size_of::<nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494>() , 16usize); - assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_24>() + assert_eq!(::std::mem::align_of::<nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494>() , 4usize); } +impl Clone for + nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207494 + { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug, Copy)] -pub struct nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 { +pub struct nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505 { pub mSteps: u32, } -impl ::std::clone::Clone for - nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25 { +#[test] +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505() { + assert_eq!(::std::mem::size_of::<nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505>() + , 4usize); + assert_eq!(::std::mem::align_of::<nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505>() + , 4usize); +} +impl Clone for + nsTimingFunction__bindgen_ty_bindgen_id_207493__bindgen_ty_bindgen_id_207505 + { fn clone(&self) -> Self { *self } } #[test] -fn bindgen_test_layout_nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25() { - assert_eq!(::std::mem::size_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>() - , 4usize); - assert_eq!(::std::mem::align_of::<nsTimingFunction_nsStyleStruct_h_unnamed_23_nsStyleStruct_h_unnamed_25>() +fn bindgen_test_layout_nsTimingFunction__bindgen_ty_bindgen_id_207493() { + assert_eq!(::std::mem::size_of::<nsTimingFunction__bindgen_ty_bindgen_id_207493>() + , 16usize); + assert_eq!(::std::mem::align_of::<nsTimingFunction__bindgen_ty_bindgen_id_207493>() , 4usize); } -impl ::std::clone::Clone for nsTimingFunction { +impl Clone for nsTimingFunction__bindgen_ty_bindgen_id_207493 { fn clone(&self) -> Self { *self } } #[test] @@ -6366,6 +10246,9 @@ fn bindgen_test_layout_nsTimingFunction() { assert_eq!(::std::mem::size_of::<nsTimingFunction>() , 20usize); assert_eq!(::std::mem::align_of::<nsTimingFunction>() , 4usize); } +impl Clone for nsTimingFunction { + fn clone(&self) -> Self { *self } +} #[repr(C)] #[derive(Debug)] pub struct StyleTransition { @@ -6407,6 +10290,7 @@ pub struct StyleBasicShape { pub mPosition: Position, pub mRadius: nsStyleCorners, } +pub type StyleBasicShape_HasThreadSafeRefCnt = TrueType; #[test] fn bindgen_test_layout_StyleBasicShape() { assert_eq!(::std::mem::size_of::<StyleBasicShape>() , 120usize); @@ -6415,92 +10299,21 @@ fn bindgen_test_layout_StyleBasicShape() { #[repr(C)] #[derive(Debug)] pub struct StyleShapeSource<ReferenceBox> { - pub StyleShapeSource_nsStyleStruct_h_unnamed_26: StyleShapeSource_nsStyleStruct_h_unnamed_26<ReferenceBox>, + pub __bindgen_anon_1: StyleShapeSource__bindgen_ty_bindgen_id_207876<ReferenceBox>, pub mType: StyleShapeSourceType, pub mReferenceBox: ReferenceBox, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct StyleShapeSource_nsStyleStruct_h_unnamed_26<ReferenceBox> { +pub struct StyleShapeSource__bindgen_ty_bindgen_id_207876<ReferenceBox> { pub mBasicShape: __BindgenUnionField<*mut StyleBasicShape>, pub mURL: __BindgenUnionField<*mut FragmentOrURL>, - pub _bindgen_data_: u64, - pub _phantom0: ::std::marker::PhantomData<ReferenceBox>, -} -impl <ReferenceBox> StyleShapeSource_nsStyleStruct_h_unnamed_26<ReferenceBox> - { - pub unsafe fn mBasicShape(&mut self) -> *mut *mut StyleBasicShape { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mURL(&mut self) -> *mut *mut FragmentOrURL { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } + pub bindgen_union_field: u64, + pub _phantom_0: ::std::marker::PhantomData<ReferenceBox>, } pub type StyleClipPath = StyleShapeSource<StyleClipPathGeometryBox>; pub type StyleShapeOutside = StyleShapeSource<StyleShapeOutsideShapeBox>; #[repr(C)] -pub struct nsStyleDisplay { - pub mBinding: RefPtr<URLValue>, - pub mDisplay: StyleDisplay, - pub mOriginalDisplay: StyleDisplay, - pub mContain: u8, - pub mAppearance: u8, - pub mPosition: u8, - pub mFloat: StyleFloat, - pub mOriginalFloat: StyleFloat, - pub mBreakType: StyleClear, - pub mBreakInside: u8, - pub mBreakBefore: bool, - pub mBreakAfter: bool, - pub mOverflowX: u8, - pub mOverflowY: u8, - pub mOverflowClipBox: u8, - pub mResize: u8, - pub mOrient: u8, - pub mIsolation: u8, - pub mTopLayer: u8, - pub mWillChangeBitField: u8, - pub mWillChange: nsTArray<nsString>, - pub mTouchAction: u8, - pub mScrollBehavior: u8, - pub mScrollSnapTypeX: u8, - pub mScrollSnapTypeY: u8, - pub mScrollSnapPointsX: nsStyleCoord, - pub mScrollSnapPointsY: nsStyleCoord, - pub mScrollSnapDestination: Position, - pub mScrollSnapCoordinate: nsTArray<Position>, - pub mBackfaceVisibility: u8, - pub mTransformStyle: u8, - pub mTransformBox: u8, - pub mSpecifiedTransform: RefPtr<nsCSSValueSharedList>, - pub mTransformOrigin: [nsStyleCoord; 3usize], - pub mChildPerspective: nsStyleCoord, - pub mPerspectiveOrigin: [nsStyleCoord; 2usize], - pub mVerticalAlign: nsStyleCoord, - pub mTransitions: nsStyleAutoArray<StyleTransition>, - pub mTransitionTimingFunctionCount: u32, - pub mTransitionDurationCount: u32, - pub mTransitionDelayCount: u32, - pub mTransitionPropertyCount: u32, - pub mAnimations: nsStyleAutoArray<StyleAnimation>, - pub mAnimationTimingFunctionCount: u32, - pub mAnimationDurationCount: u32, - pub mAnimationDelayCount: u32, - pub mAnimationNameCount: u32, - pub mAnimationDirectionCount: u32, - pub mAnimationFillModeCount: u32, - pub mAnimationPlayStateCount: u32, - pub mAnimationIterationCountCount: u32, - pub mShapeOutside: StyleShapeOutside, -} -#[test] -fn bindgen_test_layout_nsStyleDisplay() { - assert_eq!(::std::mem::size_of::<nsStyleDisplay>() , 424usize); - assert_eq!(::std::mem::align_of::<nsStyleDisplay>() , 8usize); -} -#[repr(C)] #[derive(Debug)] pub struct nsStyleTable { pub mLayoutStrategy: u8, @@ -6526,7 +10339,7 @@ fn bindgen_test_layout_nsStyleTableBorder() { assert_eq!(::std::mem::align_of::<nsStyleTableBorder>() , 4usize); } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleContentType { eStyleContentType_String = 1, eStyleContentType_Image = 10, @@ -6544,40 +10357,26 @@ pub enum nsStyleContentType { #[derive(Debug)] pub struct nsStyleContentData { pub mType: nsStyleContentType, - pub mContent: nsStyleContentData_nsStyleStruct_h_unnamed_27, + pub mContent: nsStyleContentData__bindgen_ty_bindgen_id_207960, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleContentData_nsStyleStruct_h_unnamed_27 { - pub mString: __BindgenUnionField<*mut ::std::os::raw::c_ushort>, +pub struct nsStyleContentData__bindgen_ty_bindgen_id_207960 { + pub mString: __BindgenUnionField<*mut u16>, pub mImage: __BindgenUnionField<*mut imgRequestProxy>, - pub mCounters: __BindgenUnionField<*mut Array>, - pub _bindgen_data_: u64, -} -impl nsStyleContentData_nsStyleStruct_h_unnamed_27 { - pub unsafe fn mString(&mut self) -> *mut *mut ::std::os::raw::c_ushort { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mImage(&mut self) -> *mut *mut imgRequestProxy { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mCounters(&mut self) -> *mut *mut Array { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleContentData_nsStyleStruct_h_unnamed_27 { - fn clone(&self) -> Self { *self } + pub mCounters: __BindgenUnionField<*mut nsCSSValue_Array>, + pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleContentData_nsStyleStruct_h_unnamed_27() { - assert_eq!(::std::mem::size_of::<nsStyleContentData_nsStyleStruct_h_unnamed_27>() +fn bindgen_test_layout_nsStyleContentData__bindgen_ty_bindgen_id_207960() { + assert_eq!(::std::mem::size_of::<nsStyleContentData__bindgen_ty_bindgen_id_207960>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleContentData_nsStyleStruct_h_unnamed_27>() + assert_eq!(::std::mem::align_of::<nsStyleContentData__bindgen_ty_bindgen_id_207960>() , 8usize); } +impl Clone for nsStyleContentData__bindgen_ty_bindgen_id_207960 { + fn clone(&self) -> Self { *self } +} #[test] fn bindgen_test_layout_nsStyleContentData() { assert_eq!(::std::mem::size_of::<nsStyleContentData>() , 16usize); @@ -6622,6 +10421,7 @@ fn bindgen_test_layout_nsStyleUIReset() { assert_eq!(::std::mem::align_of::<nsStyleUIReset>() , 1usize); } #[repr(C)] +#[derive(Debug)] pub struct nsCursorImage { pub mHaveHotspot: bool, pub mHotspotX: f32, @@ -6678,17 +10478,17 @@ pub struct nsStyleColumn { pub mColumnRuleWidth: nscoord, pub mTwipsPerPixel: nscoord, } +extern "C" { + #[link_name = "_ZN13nsStyleColumn15kMaxColumnCountE"] + pub static nsStyleColumn_kMaxColumnCount: u32; +} #[test] fn bindgen_test_layout_nsStyleColumn() { assert_eq!(::std::mem::size_of::<nsStyleColumn>() , 56usize); assert_eq!(::std::mem::align_of::<nsStyleColumn>() , 8usize); } -extern "C" { - #[link_name = "_ZN13nsStyleColumn15kMaxColumnCountE"] - pub static nsStyleColumn_consts_kMaxColumnCount: ::std::os::raw::c_uint; -} #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsStyleSVGPaintType { eStyleSVGPaintType_None = 1, eStyleSVGPaintType_Color = 2, @@ -6696,47 +10496,30 @@ pub enum nsStyleSVGPaintType { eStyleSVGPaintType_ContextFill = 4, eStyleSVGPaintType_ContextStroke = 5, } -#[repr(i8)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleSVGOpacitySource { - eStyleSVGOpacitySource_Normal = 0, - eStyleSVGOpacitySource_ContextFillOpacity = 1, - eStyleSVGOpacitySource_ContextStrokeOpacity = 2, -} #[repr(C)] #[derive(Debug)] pub struct nsStyleSVGPaint { - pub mPaint: nsStyleSVGPaint_nsStyleStruct_h_unnamed_28, + pub mPaint: nsStyleSVGPaint__bindgen_ty_bindgen_id_208357, pub mType: nsStyleSVGPaintType, pub mFallbackColor: nscolor, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 { +pub struct nsStyleSVGPaint__bindgen_ty_bindgen_id_208357 { pub mColor: __BindgenUnionField<nscolor>, pub mPaintServer: __BindgenUnionField<*mut FragmentOrURL>, - pub _bindgen_data_: u64, -} -impl nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 { - pub unsafe fn mColor(&mut self) -> *mut nscolor { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mPaintServer(&mut self) -> *mut *mut FragmentOrURL { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleSVGPaint_nsStyleStruct_h_unnamed_28 { - fn clone(&self) -> Self { *self } + pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleSVGPaint_nsStyleStruct_h_unnamed_28() { - assert_eq!(::std::mem::size_of::<nsStyleSVGPaint_nsStyleStruct_h_unnamed_28>() +fn bindgen_test_layout_nsStyleSVGPaint__bindgen_ty_bindgen_id_208357() { + assert_eq!(::std::mem::size_of::<nsStyleSVGPaint__bindgen_ty_bindgen_id_208357>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleSVGPaint_nsStyleStruct_h_unnamed_28>() + assert_eq!(::std::mem::align_of::<nsStyleSVGPaint__bindgen_ty_bindgen_id_208357>() , 8usize); } +impl Clone for nsStyleSVGPaint__bindgen_ty_bindgen_id_208357 { + fn clone(&self) -> Self { *self } +} #[test] fn bindgen_test_layout_nsStyleSVGPaint() { assert_eq!(::std::mem::size_of::<nsStyleSVGPaint>() , 16usize); @@ -6768,8 +10551,8 @@ pub struct nsStyleSVG { pub mContextFlags: u8, } #[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum nsStyleSVG_nsStyleStruct_h_unnamed_29 { +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsStyleSVG__bindgen_ty_bindgen_id_208534 { FILL_OPACITY_SOURCE_MASK = 3, STROKE_OPACITY_SOURCE_MASK = 12, STROKE_DASHARRAY_CONTEXT = 16, @@ -6788,41 +10571,32 @@ fn bindgen_test_layout_nsStyleSVG() { pub struct nsStyleFilter { pub mType: i32, pub mFilterParameter: nsStyleCoord, - pub nsStyleFilter_nsStyleStruct_h_unnamed_30: nsStyleFilter_nsStyleStruct_h_unnamed_30, + pub __bindgen_anon_1: nsStyleFilter__bindgen_ty_bindgen_id_208600, } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStyleFilter_nsStyleStruct_h_unnamed_30 { +pub struct nsStyleFilter__bindgen_ty_bindgen_id_208600 { pub mURL: __BindgenUnionField<*mut FragmentOrURL>, pub mDropShadow: __BindgenUnionField<*mut nsCSSShadowArray>, - pub _bindgen_data_: u64, -} -impl nsStyleFilter_nsStyleStruct_h_unnamed_30 { - pub unsafe fn mURL(&mut self) -> *mut *mut FragmentOrURL { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } - pub unsafe fn mDropShadow(&mut self) -> *mut *mut nsCSSShadowArray { - let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); - ::std::mem::transmute(raw.offset(0)) - } -} -impl ::std::clone::Clone for nsStyleFilter_nsStyleStruct_h_unnamed_30 { - fn clone(&self) -> Self { *self } + pub bindgen_union_field: u64, } #[test] -fn bindgen_test_layout_nsStyleFilter_nsStyleStruct_h_unnamed_30() { - assert_eq!(::std::mem::size_of::<nsStyleFilter_nsStyleStruct_h_unnamed_30>() +fn bindgen_test_layout_nsStyleFilter__bindgen_ty_bindgen_id_208600() { + assert_eq!(::std::mem::size_of::<nsStyleFilter__bindgen_ty_bindgen_id_208600>() , 8usize); - assert_eq!(::std::mem::align_of::<nsStyleFilter_nsStyleStruct_h_unnamed_30>() + assert_eq!(::std::mem::align_of::<nsStyleFilter__bindgen_ty_bindgen_id_208600>() , 8usize); } +impl Clone for nsStyleFilter__bindgen_ty_bindgen_id_208600 { + fn clone(&self) -> Self { *self } +} #[test] fn bindgen_test_layout_nsStyleFilter() { assert_eq!(::std::mem::size_of::<nsStyleFilter>() , 32usize); assert_eq!(::std::mem::align_of::<nsStyleFilter>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleSVGReset { pub mMask: nsStyleImageLayers, pub mClipPath: StyleClipPath, @@ -6841,6 +10615,7 @@ fn bindgen_test_layout_nsStyleSVGReset() { assert_eq!(::std::mem::align_of::<nsStyleSVGReset>() , 8usize); } #[repr(C)] +#[derive(Debug)] pub struct nsStyleVariables { pub mVariables: CSSVariableValues, } @@ -6865,19 +10640,77 @@ fn bindgen_test_layout_nsStyleEffects() { assert_eq!(::std::mem::align_of::<nsStyleEffects>() , 8usize); } /** - * <div rustbindgen="true" replaces="nsSize"> + * <div rustbindgen="true" replaces="nsMargin"> */ #[repr(C)] #[derive(Debug, Copy)] -pub struct nsSize { +pub struct nsMargin { + pub top: nscoord, + pub right: nscoord, + pub bottom: nscoord, + pub left: nscoord, +} +#[test] +fn bindgen_test_layout_nsMargin() { + assert_eq!(::std::mem::size_of::<nsMargin>() , 16usize); + assert_eq!(::std::mem::align_of::<nsMargin>() , 4usize); +} +impl Clone for nsMargin { + fn clone(&self) -> Self { *self } +} +/** + * <div rustbindgen="true" replaces="nsRect"> + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsRect { + pub x: nscoord, + pub y: nscoord, pub width: nscoord, pub height: nscoord, } -impl ::std::clone::Clone for nsSize { +#[test] +fn bindgen_test_layout_nsRect() { + assert_eq!(::std::mem::size_of::<nsRect>() , 16usize); + assert_eq!(::std::mem::align_of::<nsRect>() , 4usize); +} +impl Clone for nsRect { fn clone(&self) -> Self { *self } } +/** + * <div rustbindgen="true" replaces="nsSize"> + */ +#[repr(C)] +#[derive(Debug, Copy)] +pub struct nsSize { + pub width: nscoord, + pub height: nscoord, +} #[test] fn bindgen_test_layout_nsSize() { assert_eq!(::std::mem::size_of::<nsSize>() , 8usize); assert_eq!(::std::mem::align_of::<nsSize>() , 4usize); } +impl Clone for nsSize { + fn clone(&self) -> Self { *self } +} +/** + * <div rustbindgen="true" replaces="UniquePtr"> + * + * TODO(Emilio): This is a workaround and we should be able to get rid of this + * one. + */ +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UniquePtr<T, Deleter> { + pub mPtr: *mut T, + pub _phantom_1: ::std::marker::PhantomData<Deleter>, +} +/** + * <div rustbindgen replaces="nsTArray"></div> + */ +#[repr(C)] +#[derive(Debug)] +pub struct nsTArray<T> { + pub mBuffer: *mut T, +} |