diff --git a/components/gfx/font.rs b/components/gfx/font.rs index 8a0377cd2b0..76f63b2f389 100644 --- a/components/gfx/font.rs +++ b/components/gfx/font.rs @@ -18,7 +18,7 @@ use std::rc::Rc; use std::str; use std::sync::Arc; use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering}; -use style::computed_values::{font_stretch, font_variant, font_weight}; +use style::computed_values::{font_stretch, font_variant_caps, font_weight}; use text::Shaper; use text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore}; use text::shaping::ShaperMethods; @@ -105,7 +105,7 @@ pub struct FontMetrics { pub struct Font { pub handle: FontHandle, pub metrics: FontMetrics, - pub variant: font_variant::T, + pub variant: font_variant_caps::T, pub descriptor: FontTemplateDescriptor, pub requested_pt_size: Au, pub actual_pt_size: Au, @@ -117,7 +117,7 @@ pub struct Font { impl Font { pub fn new(handle: FontHandle, - variant: font_variant::T, + variant: font_variant_caps::T, descriptor: FontTemplateDescriptor, requested_pt_size: Au, actual_pt_size: Au, @@ -262,8 +262,8 @@ impl Font { #[inline] pub fn glyph_index(&self, codepoint: char) -> Option { let codepoint = match self.variant { - font_variant::T::small_caps => codepoint.to_uppercase().next().unwrap(), //FIXME: #5938 - font_variant::T::normal => codepoint, + font_variant_caps::T::small_caps => codepoint.to_uppercase().next().unwrap(), //FIXME: #5938 + font_variant_caps::T::normal => codepoint, }; self.handle.glyph_index(codepoint) } diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs index f5a7b9659a5..b1b9bbc6838 100644 --- a/components/gfx/font_context.rs +++ b/components/gfx/font_context.rs @@ -19,7 +19,7 @@ use std::hash::{BuildHasherDefault, Hash, Hasher}; use std::rc::Rc; use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; -use style::computed_values::{font_style, font_variant}; +use style::computed_values::{font_style, font_variant_caps}; use style::properties::style_structs; use webrender_traits; @@ -77,14 +77,14 @@ impl FontContext { template: Arc, descriptor: FontTemplateDescriptor, pt_size: Au, - variant: font_variant::T, + variant: font_variant_caps::T, font_key: webrender_traits::FontKey) -> Result { // TODO: (Bug #3463): Currently we only support fake small-caps // painting. We should also support true small-caps (where the // font supports it) in the future. let actual_pt_size = match variant { - font_variant::T::small_caps => pt_size.scale_by(SMALL_CAPS_SCALE_FACTOR), - font_variant::T::normal => pt_size, + font_variant_caps::T::small_caps => pt_size.scale_by(SMALL_CAPS_SCALE_FACTOR), + font_variant_caps::T::normal => pt_size, }; let handle = try!(FontHandle::new_from_template(&self.platform_handle, @@ -146,7 +146,7 @@ impl FontContext { let cached_font = (*cached_font_ref).borrow(); if cached_font.descriptor == desc && cached_font.requested_pt_size == style.font_size && - cached_font.variant == style.font_variant { + cached_font.variant == style.font_variant_caps { fonts.push((*cached_font_ref).clone()); cache_hit = true; break; @@ -164,7 +164,7 @@ impl FontContext { let layout_font = self.create_layout_font(template_info.font_template, desc.clone(), style.font_size, - style.font_variant, + style.font_variant_caps, template_info.font_key .expect("No font key present!")); let font = match layout_font { @@ -198,7 +198,7 @@ impl FontContext { let cached_font = cached_font_entry.font.borrow(); if cached_font.descriptor == desc && cached_font.requested_pt_size == style.font_size && - cached_font.variant == style.font_variant { + cached_font.variant == style.font_variant_caps { fonts.push(cached_font_entry.font.clone()); cache_hit = true; break; @@ -210,7 +210,7 @@ impl FontContext { let layout_font = self.create_layout_font(template_info.font_template, desc.clone(), style.font_size, - style.font_variant, + style.font_variant_caps, template_info.font_key.expect("No font key present!")); match layout_font { Ok(layout_font) => { diff --git a/components/script/dom/webidls/CSSStyleDeclaration.webidl b/components/script/dom/webidls/CSSStyleDeclaration.webidl index 498d4a634d4..aebe2b5f7c6 100644 --- a/components/script/dom/webidls/CSSStyleDeclaration.webidl +++ b/components/script/dom/webidls/CSSStyleDeclaration.webidl @@ -281,6 +281,8 @@ partial interface CSSStyleDeclaration { [SetterThrows, TreatNullAs=EmptyString] attribute DOMString font-style; [SetterThrows, TreatNullAs=EmptyString] attribute DOMString fontVariant; [SetterThrows, TreatNullAs=EmptyString] attribute DOMString font-variant; + [SetterThrows, TreatNullAs=EmptyString] attribute DOMString fontVariantCaps; + [SetterThrows, TreatNullAs=EmptyString] attribute DOMString font-variant-caps; [SetterThrows, TreatNullAs=EmptyString] attribute DOMString fontWeight; [SetterThrows, TreatNullAs=EmptyString] attribute DOMString font-weight; diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index 87ca62981a4..8c72cd2c122 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -1916,6 +1916,13 @@ extern "C" { pub fn Servo_DeclarationBlock_SetTextDecorationColorOverride(declarations: RawServoDeclarationBlockBorrowed); } +extern "C" { + pub fn Servo_DeclarationBlock_SetBackgroundImage(declarations: + RawServoDeclarationBlockBorrowed, + value: *const nsAString, + extra_data: + *mut RawGeckoURLExtraData); +} extern "C" { pub fn Servo_MediaList_Create() -> RawServoMediaListStrong; } diff --git a/components/style/gecko_bindings/structs_debug.rs b/components/style/gecko_bindings/structs_debug.rs index 019b92cad9b..799bda4c233 100644 --- a/components/style/gecko_bindings/structs_debug.rs +++ b/components/style/gecko_bindings/structs_debug.rs @@ -68,6 +68,27 @@ pub mod root { 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_ALTERNATES_NORMAL: ::std::os::raw::c_uint = 0; + pub const NS_FONT_VARIANT_ALTERNATES_HISTORICAL: ::std::os::raw::c_uint = + 1; + pub const NS_FONT_VARIANT_ALTERNATES_STYLISTIC: ::std::os::raw::c_uint = + 2; + pub const NS_FONT_VARIANT_ALTERNATES_STYLESET: ::std::os::raw::c_uint = 4; + pub const NS_FONT_VARIANT_ALTERNATES_CHARACTER_VARIANT: + ::std::os::raw::c_uint = + 8; + pub const NS_FONT_VARIANT_ALTERNATES_SWASH: ::std::os::raw::c_uint = 16; + pub const NS_FONT_VARIANT_ALTERNATES_ORNAMENTS: ::std::os::raw::c_uint = + 32; + pub const NS_FONT_VARIANT_ALTERNATES_ANNOTATION: ::std::os::raw::c_uint = + 64; + pub const NS_FONT_VARIANT_ALTERNATES_COUNT: ::std::os::raw::c_uint = 7; + pub const NS_FONT_VARIANT_ALTERNATES_ENUMERATED_MASK: + ::std::os::raw::c_uint = + 1; + pub const NS_FONT_VARIANT_ALTERNATES_FUNCTIONAL_MASK: + ::std::os::raw::c_uint = + 126; 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; @@ -75,6 +96,78 @@ pub mod root { 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_EAST_ASIAN_NORMAL: ::std::os::raw::c_uint = 0; + pub const NS_FONT_VARIANT_EAST_ASIAN_JIS78: ::std::os::raw::c_uint = 1; + pub const NS_FONT_VARIANT_EAST_ASIAN_JIS83: ::std::os::raw::c_uint = 2; + pub const NS_FONT_VARIANT_EAST_ASIAN_JIS90: ::std::os::raw::c_uint = 4; + pub const NS_FONT_VARIANT_EAST_ASIAN_JIS04: ::std::os::raw::c_uint = 8; + pub const NS_FONT_VARIANT_EAST_ASIAN_SIMPLIFIED: ::std::os::raw::c_uint = + 16; + pub const NS_FONT_VARIANT_EAST_ASIAN_TRADITIONAL: ::std::os::raw::c_uint = + 32; + pub const NS_FONT_VARIANT_EAST_ASIAN_FULL_WIDTH: ::std::os::raw::c_uint = + 64; + pub const NS_FONT_VARIANT_EAST_ASIAN_PROP_WIDTH: ::std::os::raw::c_uint = + 128; + pub const NS_FONT_VARIANT_EAST_ASIAN_RUBY: ::std::os::raw::c_uint = 256; + pub const NS_FONT_VARIANT_EAST_ASIAN_COUNT: ::std::os::raw::c_uint = 9; + pub const NS_FONT_VARIANT_EAST_ASIAN_VARIANT_MASK: ::std::os::raw::c_uint + = + 63; + pub const NS_FONT_VARIANT_EAST_ASIAN_WIDTH_MASK: ::std::os::raw::c_uint = + 192; + pub const NS_FONT_VARIANT_LIGATURES_NORMAL: ::std::os::raw::c_uint = 0; + pub const NS_FONT_VARIANT_LIGATURES_NONE: ::std::os::raw::c_uint = 1; + pub const NS_FONT_VARIANT_LIGATURES_COMMON: ::std::os::raw::c_uint = 2; + pub const NS_FONT_VARIANT_LIGATURES_NO_COMMON: ::std::os::raw::c_uint = 4; + pub const NS_FONT_VARIANT_LIGATURES_DISCRETIONARY: ::std::os::raw::c_uint + = + 8; + pub const NS_FONT_VARIANT_LIGATURES_NO_DISCRETIONARY: + ::std::os::raw::c_uint = + 16; + pub const NS_FONT_VARIANT_LIGATURES_HISTORICAL: ::std::os::raw::c_uint = + 32; + pub const NS_FONT_VARIANT_LIGATURES_NO_HISTORICAL: ::std::os::raw::c_uint + = + 64; + pub const NS_FONT_VARIANT_LIGATURES_CONTEXTUAL: ::std::os::raw::c_uint = + 128; + pub const NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL: ::std::os::raw::c_uint + = + 256; + pub const NS_FONT_VARIANT_LIGATURES_COUNT: ::std::os::raw::c_uint = 9; + pub const NS_FONT_VARIANT_LIGATURES_COMMON_MASK: ::std::os::raw::c_uint = + 6; + pub const NS_FONT_VARIANT_LIGATURES_DISCRETIONARY_MASK: + ::std::os::raw::c_uint = + 24; + pub const NS_FONT_VARIANT_LIGATURES_HISTORICAL_MASK: + ::std::os::raw::c_uint = + 96; + pub const NS_FONT_VARIANT_LIGATURES_CONTEXTUAL_MASK: + ::std::os::raw::c_uint = + 384; + pub const NS_FONT_VARIANT_NUMERIC_NORMAL: ::std::os::raw::c_uint = 0; + pub const NS_FONT_VARIANT_NUMERIC_LINING: ::std::os::raw::c_uint = 1; + pub const NS_FONT_VARIANT_NUMERIC_OLDSTYLE: ::std::os::raw::c_uint = 2; + pub const NS_FONT_VARIANT_NUMERIC_PROPORTIONAL: ::std::os::raw::c_uint = + 4; + pub const NS_FONT_VARIANT_NUMERIC_TABULAR: ::std::os::raw::c_uint = 8; + pub const NS_FONT_VARIANT_NUMERIC_DIAGONAL_FRACTIONS: + ::std::os::raw::c_uint = + 16; + pub const NS_FONT_VARIANT_NUMERIC_STACKED_FRACTIONS: + ::std::os::raw::c_uint = + 32; + pub const NS_FONT_VARIANT_NUMERIC_SLASHZERO: ::std::os::raw::c_uint = 64; + pub const NS_FONT_VARIANT_NUMERIC_ORDINAL: ::std::os::raw::c_uint = 128; + pub const NS_FONT_VARIANT_NUMERIC_COUNT: ::std::os::raw::c_uint = 8; + pub const NS_FONT_VARIANT_NUMERIC_FIGURE_MASK: ::std::os::raw::c_uint = 3; + pub const NS_FONT_VARIANT_NUMERIC_SPACING_MASK: ::std::os::raw::c_uint = + 12; + pub const NS_FONT_VARIANT_NUMERIC_FRACTION_MASK: ::std::os::raw::c_uint = + 48; 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; @@ -1831,9 +1924,6 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct Event([u8; 0]); - #[repr(C)] pub struct DispatcherTrait__bindgen_vtable { } #[repr(C)] @@ -1881,26 +1971,16 @@ pub mod root { pub struct AddEventListenerOptionsOrBoolean([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] + pub struct Event([u8; 0]); + #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct EventListener([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct EventListenerOptionsOrBoolean([u8; 0]); #[repr(C)] - #[derive(Debug)] - pub struct EventHandlerNonNull { - pub _base: root::mozilla::dom::CallbackFunction, - } - #[test] - fn bindgen_test_layout_EventHandlerNonNull() { - assert_eq!(::std::mem::size_of::() , - 56usize , concat ! ( - "Size of: " , stringify ! ( EventHandlerNonNull ) - )); - assert_eq! (::std::mem::align_of::() , - 8usize , concat ! ( - "Alignment of " , stringify ! ( - EventHandlerNonNull ) )); - } + #[derive(Debug, Copy, Clone)] + pub struct EventHandlerNonNull([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AudioContext([u8; 0]); @@ -2207,21 +2287,6 @@ pub mod root { impl Clone for CallbackObjectHolderBase { fn clone(&self) -> Self { *self } } - #[repr(C)] - #[derive(Debug)] - pub struct CallbackFunction { - pub _base: root::mozilla::dom::CallbackObject, - } - #[test] - fn bindgen_test_layout_CallbackFunction() { - assert_eq!(::std::mem::size_of::() , 56usize - , concat ! ( - "Size of: " , stringify ! ( CallbackFunction ) )); - assert_eq! (::std::mem::align_of::() , - 8usize , concat ! ( - "Alignment of " , stringify ! ( CallbackFunction ) - )); - } pub mod prototypes { #[allow(unused_imports)] use self::super::super::super::super::root; @@ -3061,6 +3126,21 @@ pub mod root { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct Selection([u8; 0]); + #[repr(C)] + #[derive(Debug)] + pub struct CallbackFunction { + pub _base: root::mozilla::dom::CallbackObject, + } + #[test] + fn bindgen_test_layout_CallbackFunction() { + assert_eq!(::std::mem::size_of::() , 56usize + , concat ! ( + "Size of: " , stringify ! ( CallbackFunction ) )); + assert_eq! (::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( CallbackFunction ) + )); + } #[repr(u8)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum ScrollBehavior { @@ -5315,7 +5395,8 @@ pub mod root { pub mString: root::RefPtr, pub mExtraData: root::RefPtr, pub mURIResolved: bool, - pub mIsLocalRef: bool, + pub mIsLocalRef: [u8; 2usize], + pub mMightHaveRef: [u8; 2usize], } pub type URLValueData_HasThreadSafeRefCnt = root::mozilla::TrueType; @@ -5364,6 +5445,13 @@ pub mod root { "Alignment of field: " , stringify ! ( URLValueData ) , "::" , stringify ! ( mIsLocalRef ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const URLValueData ) ) . + mMightHaveRef as * const _ as usize } , 43usize , + concat ! ( + "Alignment of field: " , stringify ! ( + URLValueData ) , "::" , stringify ! ( + mMightHaveRef ) )); } #[repr(C)] #[derive(Debug)] @@ -6028,13 +6116,6 @@ pub mod root { "Alignment of field: " , stringify ! ( URLExtraData ) , "::" , stringify ! ( mPrincipal ) )); } - pub mod dmd { - #[allow(unused_imports)] - use self::super::super::super::root; - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct JSONWriteFunc([u8; 0]); #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum ArenaObjectID { @@ -12008,67 +12089,6 @@ pub mod root { "::" , stringify ! ( mFlags ) )); } #[repr(C)] - pub struct TraceCallbacks__bindgen_vtable { - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct TraceCallbacks { - pub vtable_: *const TraceCallbacks__bindgen_vtable, - } - #[test] - fn bindgen_test_layout_TraceCallbacks() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( "Size of: " , stringify ! ( TraceCallbacks ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat - ! ( "Alignment of " , stringify ! ( TraceCallbacks ) )); - } - impl Clone for TraceCallbacks { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsScriptObjectTracer { - pub _base: root::nsCycleCollectionParticipant, - } - #[test] - fn bindgen_test_layout_nsScriptObjectTracer() { - assert_eq!(::std::mem::size_of::() , 16usize , - concat ! ( - "Size of: " , stringify ! ( nsScriptObjectTracer ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( nsScriptObjectTracer ) )); - } - impl Clone for nsScriptObjectTracer { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsXPCOMCycleCollectionParticipant { - pub _base: root::nsScriptObjectTracer, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsXPCOMCycleCollectionParticipant_COMTypeInfo { - pub _address: u8, - pub _phantom_0: ::std::marker::PhantomData, - pub _phantom_1: ::std::marker::PhantomData, - } - #[test] - fn bindgen_test_layout_nsXPCOMCycleCollectionParticipant() { - assert_eq!(::std::mem::size_of::() - , 16usize , concat ! ( - "Size of: " , stringify ! ( - nsXPCOMCycleCollectionParticipant ) )); - assert_eq! (::std::mem::align_of::() - , 8usize , concat ! ( - "Alignment of " , stringify ! ( - nsXPCOMCycleCollectionParticipant ) )); - } - impl Clone for nsXPCOMCycleCollectionParticipant { - fn clone(&self) -> Self { *self } - } - #[repr(C)] #[derive(Debug, Copy)] pub struct JSErrorFormatString { /** The error message name in ASCII. */ @@ -12221,6 +12241,386 @@ pub mod root { "::" , stringify ! ( notes_ ) )); } #[repr(C)] + pub struct TraceCallbacks__bindgen_vtable { + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct TraceCallbacks { + pub vtable_: *const TraceCallbacks__bindgen_vtable, + } + #[test] + fn bindgen_test_layout_TraceCallbacks() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( "Size of: " , stringify ! ( TraceCallbacks ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of " , stringify ! ( TraceCallbacks ) )); + } + impl Clone for TraceCallbacks { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsScriptObjectTracer { + pub _base: root::nsCycleCollectionParticipant, + } + #[test] + fn bindgen_test_layout_nsScriptObjectTracer() { + assert_eq!(::std::mem::size_of::() , 16usize , + concat ! ( + "Size of: " , stringify ! ( nsScriptObjectTracer ) )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( nsScriptObjectTracer ) )); + } + impl Clone for nsScriptObjectTracer { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsXPCOMCycleCollectionParticipant { + pub _base: root::nsScriptObjectTracer, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsXPCOMCycleCollectionParticipant_COMTypeInfo { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData, + pub _phantom_1: ::std::marker::PhantomData, + } + #[test] + fn bindgen_test_layout_nsXPCOMCycleCollectionParticipant() { + assert_eq!(::std::mem::size_of::() + , 16usize , concat ! ( + "Size of: " , stringify ! ( + nsXPCOMCycleCollectionParticipant ) )); + assert_eq! (::std::mem::align_of::() + , 8usize , concat ! ( + "Alignment of " , stringify ! ( + nsXPCOMCycleCollectionParticipant ) )); + } + impl Clone for nsXPCOMCycleCollectionParticipant { + fn clone(&self) -> Self { *self } + } + pub type PLDHashNumber = u32; + #[repr(C)] + #[derive(Debug)] + pub struct PLDHashTable { + pub mOps: *const root::PLDHashTableOps, + pub mHashShift: i16, + pub mEntrySize: u32, + pub mEntryCount: u32, + pub mRemovedCount: u32, + pub mEntryStore: root::PLDHashTable_EntryStore, + pub mChecker: root::Checker, + } + #[repr(C)] + #[derive(Debug)] + pub struct PLDHashTable_EntryStore { + pub mEntryStore: *mut ::std::os::raw::c_char, + pub mGeneration: u32, + } + #[test] + fn bindgen_test_layout_PLDHashTable_EntryStore() { + assert_eq!(::std::mem::size_of::() , 16usize + , concat ! ( + "Size of: " , stringify ! ( PLDHashTable_EntryStore ) )); + assert_eq! (::std::mem::align_of::() , 8usize + , concat ! ( + "Alignment of " , stringify ! ( PLDHashTable_EntryStore ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_EntryStore ) ) . + mEntryStore as * const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_EntryStore ) , "::" , stringify ! ( + mEntryStore ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_EntryStore ) ) . + mGeneration as * const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_EntryStore ) , "::" , stringify ! ( + mGeneration ) )); + } + #[repr(C)] + #[derive(Debug)] + pub struct PLDHashTable_Iterator { + pub mTable: *mut root::PLDHashTable, + pub mStart: *mut ::std::os::raw::c_char, + pub mLimit: *mut ::std::os::raw::c_char, + pub mCurrent: *mut ::std::os::raw::c_char, + pub mNexts: u32, + pub mNextsLimit: u32, + pub mHaveRemoved: bool, + } + #[test] + fn bindgen_test_layout_PLDHashTable_Iterator() { + assert_eq!(::std::mem::size_of::() , 48usize , + concat ! ( + "Size of: " , stringify ! ( PLDHashTable_Iterator ) )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( PLDHashTable_Iterator ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mTable as + * const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mTable ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mStart as + * const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mStart ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mLimit as + * const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mLimit ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mCurrent + as * const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mCurrent ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mNexts as + * const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mNexts ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . + mNextsLimit as * const _ as usize } , 36usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mNextsLimit + ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . + mHaveRemoved as * const _ as usize } , 40usize , concat ! + ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( + mHaveRemoved ) )); + } + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } + pub const PLDHashTable_kMaxCapacity: u32 = 67108864; + pub const PLDHashTable_kMinCapacity: u32 = 8; + pub const PLDHashTable_kMaxInitialLength: u32 = 33554432; + pub const PLDHashTable_kDefaultInitialLength: u32 = 4; + pub const PLDHashTable_kHashBits: u32 = 32; + pub const PLDHashTable_kGoldenRatio: u32 = 2654435769; + pub const PLDHashTable_kCollisionFlag: root::PLDHashNumber = 1; + #[test] + fn bindgen_test_layout_PLDHashTable() { + assert_eq!(::std::mem::size_of::() , 48usize , concat ! + ( "Size of: " , stringify ! ( PLDHashTable ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat ! + ( "Alignment of " , stringify ! ( PLDHashTable ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mOps as * const _ + as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mOps ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mHashShift as * + const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mHashShift ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mEntrySize as * + const _ as usize } , 12usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mEntrySize ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mEntryCount as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mEntryCount ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mRemovedCount as * + const _ as usize } , 20usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mRemovedCount ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mEntryStore as * + const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mEntryStore ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mChecker as * + const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mChecker ) )); + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct PLDHashTableOps { + pub hashKey: root::PLDHashHashKey, + pub matchEntry: root::PLDHashMatchEntry, + pub moveEntry: root::PLDHashMoveEntry, + pub clearEntry: root::PLDHashClearEntry, + pub initEntry: root::PLDHashInitEntry, + } + #[test] + fn bindgen_test_layout_PLDHashTableOps() { + assert_eq!(::std::mem::size_of::() , 40usize , concat + ! ( "Size of: " , stringify ! ( PLDHashTableOps ) )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( PLDHashTableOps ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . hashKey as * + const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( hashKey ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . matchEntry as * + const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( matchEntry ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . moveEntry as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( moveEntry ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . clearEntry as * + const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( clearEntry ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . initEntry as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( initEntry ) )); + } + impl Clone for PLDHashTableOps { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct PLDHashEntryHdr { + pub mKeyHash: root::PLDHashNumber, + } + #[test] + fn bindgen_test_layout_PLDHashEntryHdr() { + assert_eq!(::std::mem::size_of::() , 4usize , concat + ! ( "Size of: " , stringify ! ( PLDHashEntryHdr ) )); + assert_eq! (::std::mem::align_of::() , 4usize , + concat ! ( + "Alignment of " , stringify ! ( PLDHashEntryHdr ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashEntryHdr ) ) . mKeyHash as * + const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashEntryHdr ) , + "::" , stringify ! ( mKeyHash ) )); + } + impl Clone for PLDHashEntryHdr { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct Checker { + pub mState: u32, + pub mIsWritable: u32, + } + pub const Checker_kIdle: u32 = 0; + pub const Checker_kRead1: u32 = 1; + pub const Checker_kReadMax: u32 = 9999; + pub const Checker_kWrite: u32 = 10000; + #[test] + fn bindgen_test_layout_Checker() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of: " , stringify ! ( Checker ) )); + assert_eq! (::std::mem::align_of::() , 4usize , concat ! ( + "Alignment of " , stringify ! ( Checker ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const Checker ) ) . mState as * const _ as + usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( Checker ) , "::" , + stringify ! ( mState ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const Checker ) ) . mIsWritable as * const + _ as usize } , 4usize , concat ! ( + "Alignment of field: " , stringify ! ( Checker ) , "::" , + stringify ! ( mIsWritable ) )); + } + impl Clone for Checker { + fn clone(&self) -> Self { *self } + } + pub type PLDHashHashKey = + ::std::option::Option ::std::os::raw::c_uint>; + pub type PLDHashMatchEntry = + ::std::option::Option bool>; + pub type PLDHashMoveEntry = + ::std::option::Option; + pub type PLDHashClearEntry = + ::std::option::Option; + pub type PLDHashInitEntry = + ::std::option::Option; + /** + * hashkey wrapper using T* KeyType + * + * @see nsTHashtable::EntryType for specification + */ + #[repr(C)] + #[derive(Debug)] + pub struct nsPtrHashKey { + pub _base: root::PLDHashEntryHdr, + pub mKey: *mut T, + } + pub type nsPtrHashKey_KeyType = *mut T; + pub type nsPtrHashKey_KeyTypePointer = *mut T; + pub const nsPtrHashKey_ALLOW_MEMMOVE: root::nsPtrHashKey__bindgen_ty_1 = + nsPtrHashKey__bindgen_ty_1::ALLOW_MEMMOVE; + #[repr(i32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum nsPtrHashKey__bindgen_ty_1 { ALLOW_MEMMOVE = 0, } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIRunnable { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIRunnable_COMTypeInfo { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData, + pub _phantom_1: ::std::marker::PhantomData, + } + #[test] + fn bindgen_test_layout_nsIRunnable() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of: " , stringify ! ( nsIRunnable ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat ! + ( "Alignment of " , stringify ! ( nsIRunnable ) )); + } + impl Clone for nsIRunnable { + fn clone(&self) -> Self { *self } + } + #[repr(C)] #[derive(Debug, Copy)] pub struct nsIEventTarget { pub _base: root::nsISupports, @@ -12259,28 +12659,6 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsIRunnable { - pub _base: root::nsISupports, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsIRunnable_COMTypeInfo { - pub _address: u8, - pub _phantom_0: ::std::marker::PhantomData, - pub _phantom_1: ::std::marker::PhantomData, - } - #[test] - fn bindgen_test_layout_nsIRunnable() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of: " , stringify ! ( nsIRunnable ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat ! - ( "Alignment of " , stringify ! ( nsIRunnable ) )); - } - impl Clone for nsIRunnable { - fn clone(&self) -> Self { *self } - } - #[repr(C)] #[derive(Debug)] pub struct nsIGlobalObject { pub _base: root::nsISupports, @@ -14019,303 +14397,6 @@ pub mod root { concat ! ( "Alignment of " , stringify ! ( nsPIDOMWindowOuter ) )); } - pub type PLDHashNumber = u32; - #[repr(C)] - #[derive(Debug)] - pub struct PLDHashTable { - pub mOps: *const root::PLDHashTableOps, - pub mHashShift: i16, - pub mEntrySize: u32, - pub mEntryCount: u32, - pub mRemovedCount: u32, - pub mEntryStore: root::PLDHashTable_EntryStore, - pub mChecker: root::Checker, - } - #[repr(C)] - #[derive(Debug)] - pub struct PLDHashTable_EntryStore { - pub mEntryStore: *mut ::std::os::raw::c_char, - pub mGeneration: u32, - } - #[test] - fn bindgen_test_layout_PLDHashTable_EntryStore() { - assert_eq!(::std::mem::size_of::() , 16usize - , concat ! ( - "Size of: " , stringify ! ( PLDHashTable_EntryStore ) )); - assert_eq! (::std::mem::align_of::() , 8usize - , concat ! ( - "Alignment of " , stringify ! ( PLDHashTable_EntryStore ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_EntryStore ) ) . - mEntryStore as * const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_EntryStore ) , "::" , stringify ! ( - mEntryStore ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_EntryStore ) ) . - mGeneration as * const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_EntryStore ) , "::" , stringify ! ( - mGeneration ) )); - } - #[repr(C)] - #[derive(Debug)] - pub struct PLDHashTable_Iterator { - pub mTable: *mut root::PLDHashTable, - pub mStart: *mut ::std::os::raw::c_char, - pub mLimit: *mut ::std::os::raw::c_char, - pub mCurrent: *mut ::std::os::raw::c_char, - pub mNexts: u32, - pub mNextsLimit: u32, - pub mHaveRemoved: bool, - } - #[test] - fn bindgen_test_layout_PLDHashTable_Iterator() { - assert_eq!(::std::mem::size_of::() , 48usize , - concat ! ( - "Size of: " , stringify ! ( PLDHashTable_Iterator ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( PLDHashTable_Iterator ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mTable as - * const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mTable ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mStart as - * const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mStart ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mLimit as - * const _ as usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mLimit ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mCurrent - as * const _ as usize } , 24usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mCurrent ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mNexts as - * const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mNexts ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . - mNextsLimit as * const _ as usize } , 36usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mNextsLimit - ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . - mHaveRemoved as * const _ as usize } , 40usize , concat ! - ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( - mHaveRemoved ) )); - } - #[repr(u32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } - pub const PLDHashTable_kMaxCapacity: u32 = 67108864; - pub const PLDHashTable_kMinCapacity: u32 = 8; - pub const PLDHashTable_kMaxInitialLength: u32 = 33554432; - pub const PLDHashTable_kDefaultInitialLength: u32 = 4; - pub const PLDHashTable_kHashBits: u32 = 32; - pub const PLDHashTable_kGoldenRatio: u32 = 2654435769; - pub const PLDHashTable_kCollisionFlag: root::PLDHashNumber = 1; - #[test] - fn bindgen_test_layout_PLDHashTable() { - assert_eq!(::std::mem::size_of::() , 48usize , concat ! - ( "Size of: " , stringify ! ( PLDHashTable ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat ! - ( "Alignment of " , stringify ! ( PLDHashTable ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mOps as * const _ - as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mOps ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mHashShift as * - const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mHashShift ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mEntrySize as * - const _ as usize } , 12usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mEntrySize ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mEntryCount as * - const _ as usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mEntryCount ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mRemovedCount as * - const _ as usize } , 20usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mRemovedCount ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mEntryStore as * - const _ as usize } , 24usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mEntryStore ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mChecker as * - const _ as usize } , 40usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mChecker ) )); - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct PLDHashTableOps { - pub hashKey: root::PLDHashHashKey, - pub matchEntry: root::PLDHashMatchEntry, - pub moveEntry: root::PLDHashMoveEntry, - pub clearEntry: root::PLDHashClearEntry, - pub initEntry: root::PLDHashInitEntry, - } - #[test] - fn bindgen_test_layout_PLDHashTableOps() { - assert_eq!(::std::mem::size_of::() , 40usize , concat - ! ( "Size of: " , stringify ! ( PLDHashTableOps ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( PLDHashTableOps ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . hashKey as * - const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( hashKey ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . matchEntry as * - const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( matchEntry ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . moveEntry as * - const _ as usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( moveEntry ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . clearEntry as * - const _ as usize } , 24usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( clearEntry ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . initEntry as * - const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( initEntry ) )); - } - impl Clone for PLDHashTableOps { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct PLDHashEntryHdr { - pub mKeyHash: root::PLDHashNumber, - } - #[test] - fn bindgen_test_layout_PLDHashEntryHdr() { - assert_eq!(::std::mem::size_of::() , 4usize , concat - ! ( "Size of: " , stringify ! ( PLDHashEntryHdr ) )); - assert_eq! (::std::mem::align_of::() , 4usize , - concat ! ( - "Alignment of " , stringify ! ( PLDHashEntryHdr ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashEntryHdr ) ) . mKeyHash as * - const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashEntryHdr ) , - "::" , stringify ! ( mKeyHash ) )); - } - impl Clone for PLDHashEntryHdr { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct Checker { - pub mState: u32, - pub mIsWritable: u32, - } - pub const Checker_kIdle: u32 = 0; - pub const Checker_kRead1: u32 = 1; - pub const Checker_kReadMax: u32 = 9999; - pub const Checker_kWrite: u32 = 10000; - #[test] - fn bindgen_test_layout_Checker() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of: " , stringify ! ( Checker ) )); - assert_eq! (::std::mem::align_of::() , 4usize , concat ! ( - "Alignment of " , stringify ! ( Checker ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const Checker ) ) . mState as * const _ as - usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( Checker ) , "::" , - stringify ! ( mState ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const Checker ) ) . mIsWritable as * const - _ as usize } , 4usize , concat ! ( - "Alignment of field: " , stringify ! ( Checker ) , "::" , - stringify ! ( mIsWritable ) )); - } - impl Clone for Checker { - fn clone(&self) -> Self { *self } - } - pub type PLDHashHashKey = - ::std::option::Option ::std::os::raw::c_uint>; - pub type PLDHashMatchEntry = - ::std::option::Option bool>; - pub type PLDHashMoveEntry = - ::std::option::Option; - pub type PLDHashClearEntry = - ::std::option::Option; - pub type PLDHashInitEntry = - ::std::option::Option; - /** - * hashkey wrapper using T* KeyType - * - * @see nsTHashtable::EntryType for specification - */ - #[repr(C)] - #[derive(Debug)] - pub struct nsPtrHashKey { - pub _base: root::PLDHashEntryHdr, - pub mKey: *mut T, - } - pub type nsPtrHashKey_KeyType = *mut T; - pub type nsPtrHashKey_KeyTypePointer = *mut T; - pub const nsPtrHashKey_ALLOW_MEMMOVE: root::nsPtrHashKey__bindgen_ty_1 = - nsPtrHashKey__bindgen_ty_1::ALLOW_MEMMOVE; - #[repr(i32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum nsPtrHashKey__bindgen_ty_1 { ALLOW_MEMMOVE = 0, } /** * A node of content in a document's content model. This interface * is supported by all content objects. @@ -16411,66 +16492,66 @@ pub mod root { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsDOMMutationObserver([u8; 0]); - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_SHARED_RESTYLE_BIT_1; - pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_SHARED_RESTYLE_BIT_2; - pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_SHARED_RESTYLE_BIT_1; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_SHARED_RESTYLE_BIT_1; + pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_SHARED_RESTYLE_BIT_2; + pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_SHARED_RESTYLE_BIT_1; pub const NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_SHARED_RESTYLE_BIT_2; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_108 = - _bindgen_ty_108::NODE_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_SHARED_RESTYLE_BIT_2; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_104 = + _bindgen_ty_104::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_108 { + pub enum _bindgen_ty_104 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -23848,7 +23929,7 @@ pub mod root { pub mImage: root::__BindgenUnionField<*mut root::nsStyleImageRequest>, pub mGradient: root::__BindgenUnionField<*mut root::nsStyleGradient>, pub mURLValue: root::__BindgenUnionField<*mut root::nsStyleImage_URLValue>, - pub mElementId: root::__BindgenUnionField<*mut u16>, + pub mElementId: root::__BindgenUnionField<*mut root::nsIAtom>, pub bindgen_union_field: u64, } #[test] @@ -27359,40 +27440,6 @@ pub mod root { impl Clone for nsMediaFeatures { fn clone(&self) -> Self { *self } } - #[repr(C)] - #[derive(Debug)] - pub struct nsMediaExpression { - pub mFeature: *const root::nsMediaFeature, - pub mRange: root::nsMediaExpression_Range, - pub mValue: root::nsCSSValue, - } - #[repr(u32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum nsMediaExpression_Range { eMin = 0, eMax = 1, eEqual = 2, } - #[test] - fn bindgen_test_layout_nsMediaExpression() { - assert_eq!(::std::mem::size_of::() , 32usize , - concat ! ( "Size of: " , stringify ! ( nsMediaExpression ) - )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( nsMediaExpression ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsMediaExpression ) ) . mFeature as * - const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( nsMediaExpression ) - , "::" , stringify ! ( mFeature ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsMediaExpression ) ) . mRange as * - const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( nsMediaExpression ) - , "::" , stringify ! ( mRange ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsMediaExpression ) ) . mValue as * - const _ as usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( nsMediaExpression ) - , "::" , stringify ! ( mValue ) )); - } /** * An nsMediaQueryResultCacheKey records what feature/value combinations * a set of media query results are valid for. This allows the caller @@ -27511,6 +27558,40 @@ pub mod root { } #[repr(C)] #[derive(Debug)] + pub struct nsMediaExpression { + pub mFeature: *const root::nsMediaFeature, + pub mRange: root::nsMediaExpression_Range, + pub mValue: root::nsCSSValue, + } + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum nsMediaExpression_Range { eMin = 0, eMax = 1, eEqual = 2, } + #[test] + fn bindgen_test_layout_nsMediaExpression() { + assert_eq!(::std::mem::size_of::() , 32usize , + concat ! ( "Size of: " , stringify ! ( nsMediaExpression ) + )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( nsMediaExpression ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsMediaExpression ) ) . mFeature as * + const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( nsMediaExpression ) + , "::" , stringify ! ( mFeature ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsMediaExpression ) ) . mRange as * + const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( nsMediaExpression ) + , "::" , stringify ! ( mRange ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsMediaExpression ) ) . mValue as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( nsMediaExpression ) + , "::" , stringify ! ( mValue ) )); + } + #[repr(C)] + #[derive(Debug)] pub struct nsMediaQuery { pub mNegated: bool, pub mHasOnly: bool, @@ -27732,6 +27813,16 @@ pub mod root { } #[test] fn __bindgen_test_layout_template_17() { + assert_eq!(::std::mem::size_of::<[u8; 2usize]>() , 2usize , concat ! ( + "Size of template specialization: " , stringify ! ( + [u8; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u8; 2usize]>() , 1usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u8; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_template_18() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27742,7 +27833,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_template_18() { + fn __bindgen_test_layout_template_19() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27753,7 +27844,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_template_19() { + fn __bindgen_test_layout_template_20() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27764,7 +27855,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_template_20() { + fn __bindgen_test_layout_template_21() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27775,7 +27866,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_template_21() { + fn __bindgen_test_layout_template_22() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27786,7 +27877,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_template_22() { + fn __bindgen_test_layout_template_23() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -27803,7 +27894,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_23() { + fn __bindgen_test_layout_template_24() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27814,7 +27905,7 @@ pub mod root { root::JS::TenuredHeap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_template_24() { + fn __bindgen_test_layout_template_25() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27825,7 +27916,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_template_25() { + fn __bindgen_test_layout_template_26() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27836,7 +27927,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_template_26() { + fn __bindgen_test_layout_template_27() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27849,7 +27940,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_27() { + fn __bindgen_test_layout_template_28() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27862,7 +27953,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_28() { + fn __bindgen_test_layout_template_29() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27873,7 +27964,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_template_29() { + fn __bindgen_test_layout_template_30() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27886,7 +27977,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_30() { + fn __bindgen_test_layout_template_31() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27897,7 +27988,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_31() { + fn __bindgen_test_layout_template_32() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27908,7 +27999,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_32() { + fn __bindgen_test_layout_template_33() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27919,7 +28010,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_template_33() { + fn __bindgen_test_layout_template_34() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -27936,7 +28027,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_34() { + fn __bindgen_test_layout_template_35() { assert_eq!(::std::mem::size_of::>, @@ -27977,7 +28068,18 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_35() { + fn __bindgen_test_layout_template_36() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_template_37() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27988,7 +28090,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_36() { + fn __bindgen_test_layout_template_38() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27999,7 +28101,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_template_37() { + fn __bindgen_test_layout_template_39() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28010,7 +28112,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_template_38() { + fn __bindgen_test_layout_template_40() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28021,7 +28123,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_39() { + fn __bindgen_test_layout_template_41() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28034,7 +28136,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_40() { + fn __bindgen_test_layout_template_42() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28045,7 +28147,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_template_41() { + fn __bindgen_test_layout_template_43() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28056,7 +28158,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_template_42() { + fn __bindgen_test_layout_template_44() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28069,7 +28171,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_template_43() { + fn __bindgen_test_layout_template_45() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28080,7 +28182,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_template_44() { + fn __bindgen_test_layout_template_46() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28091,7 +28193,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_template_45() { + fn __bindgen_test_layout_template_47() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28102,7 +28204,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_46() { + fn __bindgen_test_layout_template_48() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28113,7 +28215,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_47() { + fn __bindgen_test_layout_template_49() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28124,7 +28226,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_48() { + fn __bindgen_test_layout_template_50() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28135,7 +28237,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_template_49() { + fn __bindgen_test_layout_template_51() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -28144,7 +28246,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_template_50() { + fn __bindgen_test_layout_template_52() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28155,7 +28257,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_template_51() { + fn __bindgen_test_layout_template_53() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28166,7 +28268,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_template_52() { + fn __bindgen_test_layout_template_54() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28177,7 +28279,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_template_53() { + fn __bindgen_test_layout_template_55() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28188,7 +28290,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_54() { + fn __bindgen_test_layout_template_56() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28201,7 +28303,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_55() { + fn __bindgen_test_layout_template_57() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28212,18 +28314,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_56() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_template_57() { + fn __bindgen_test_layout_template_58() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28234,7 +28325,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_58() { + fn __bindgen_test_layout_template_59() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28245,7 +28336,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_template_59() { + fn __bindgen_test_layout_template_60() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28256,17 +28347,6 @@ pub mod root { root::mozilla::OwningNonNull ) )); } #[test] - fn __bindgen_test_layout_template_60() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] fn __bindgen_test_layout_template_61() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( @@ -28290,17 +28370,6 @@ pub mod root { } #[test] fn __bindgen_test_layout_template_63() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_template_64() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28311,6 +28380,17 @@ pub mod root { [u32; 2usize] ) )); } #[test] + fn __bindgen_test_layout_template_64() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] fn __bindgen_test_layout_template_65() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( @@ -28323,14 +28403,14 @@ pub mod root { } #[test] fn __bindgen_test_layout_template_66() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); + [u32; 2usize] ) )); } #[test] fn __bindgen_test_layout_template_67() { @@ -28356,6 +28436,17 @@ pub mod root { } #[test] fn __bindgen_test_layout_template_69() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_template_70() { assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -28364,17 +28455,6 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_template_70() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] fn __bindgen_test_layout_template_71() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( @@ -28398,6 +28478,17 @@ pub mod root { } #[test] fn __bindgen_test_layout_template_73() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_template_74() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28408,7 +28499,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_template_74() { + fn __bindgen_test_layout_template_75() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28421,7 +28512,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_75() { + fn __bindgen_test_layout_template_76() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28434,7 +28525,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_76() { + fn __bindgen_test_layout_template_77() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -28451,7 +28542,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_77() { + fn __bindgen_test_layout_template_78() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28462,7 +28553,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_template_78() { + fn __bindgen_test_layout_template_79() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28473,7 +28564,7 @@ pub mod root { root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_template_79() { + fn __bindgen_test_layout_template_80() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28486,7 +28577,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_80() { + fn __bindgen_test_layout_template_81() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28497,7 +28588,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_template_81() { + fn __bindgen_test_layout_template_82() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28508,7 +28599,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_template_82() { + fn __bindgen_test_layout_template_83() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28521,7 +28612,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_83() { + fn __bindgen_test_layout_template_84() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28532,7 +28623,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_template_84() { + fn __bindgen_test_layout_template_85() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28543,7 +28634,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_85() { + fn __bindgen_test_layout_template_86() { assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28554,7 +28645,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_template_86() { + fn __bindgen_test_layout_template_87() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28565,7 +28656,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_template_87() { + fn __bindgen_test_layout_template_88() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -28582,7 +28673,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_88() { + fn __bindgen_test_layout_template_89() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28595,7 +28686,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_template_89() { + fn __bindgen_test_layout_template_90() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -28612,7 +28703,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_90() { + fn __bindgen_test_layout_template_91() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28623,7 +28714,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_template_91() { + fn __bindgen_test_layout_template_92() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -28632,7 +28723,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_template_92() { + fn __bindgen_test_layout_template_93() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28643,7 +28734,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_template_93() { + fn __bindgen_test_layout_template_94() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28654,7 +28745,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_94() { + fn __bindgen_test_layout_template_95() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28665,7 +28756,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_template_95() { + fn __bindgen_test_layout_template_96() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -28682,7 +28773,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_96() { + fn __bindgen_test_layout_template_97() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28695,7 +28786,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_template_97() { + fn __bindgen_test_layout_template_98() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28706,7 +28797,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_template_98() { + fn __bindgen_test_layout_template_99() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -28721,7 +28812,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_99() { + fn __bindgen_test_layout_template_100() { assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28732,7 +28823,7 @@ pub mod root { [u64; 18usize] ) )); } #[test] - fn __bindgen_test_layout_template_100() { + fn __bindgen_test_layout_template_101() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28745,7 +28836,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_101() { + fn __bindgen_test_layout_template_102() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28758,7 +28849,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_102() { + fn __bindgen_test_layout_template_103() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28769,7 +28860,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_template_103() { + fn __bindgen_test_layout_template_104() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -28778,7 +28869,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_template_104() { + fn __bindgen_test_layout_template_105() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28789,7 +28880,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_template_105() { + fn __bindgen_test_layout_template_106() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko_bindings/structs_release.rs b/components/style/gecko_bindings/structs_release.rs index 61e77ea4d96..59cbf3c54b5 100644 --- a/components/style/gecko_bindings/structs_release.rs +++ b/components/style/gecko_bindings/structs_release.rs @@ -68,6 +68,27 @@ pub mod root { 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_ALTERNATES_NORMAL: ::std::os::raw::c_uint = 0; + pub const NS_FONT_VARIANT_ALTERNATES_HISTORICAL: ::std::os::raw::c_uint = + 1; + pub const NS_FONT_VARIANT_ALTERNATES_STYLISTIC: ::std::os::raw::c_uint = + 2; + pub const NS_FONT_VARIANT_ALTERNATES_STYLESET: ::std::os::raw::c_uint = 4; + pub const NS_FONT_VARIANT_ALTERNATES_CHARACTER_VARIANT: + ::std::os::raw::c_uint = + 8; + pub const NS_FONT_VARIANT_ALTERNATES_SWASH: ::std::os::raw::c_uint = 16; + pub const NS_FONT_VARIANT_ALTERNATES_ORNAMENTS: ::std::os::raw::c_uint = + 32; + pub const NS_FONT_VARIANT_ALTERNATES_ANNOTATION: ::std::os::raw::c_uint = + 64; + pub const NS_FONT_VARIANT_ALTERNATES_COUNT: ::std::os::raw::c_uint = 7; + pub const NS_FONT_VARIANT_ALTERNATES_ENUMERATED_MASK: + ::std::os::raw::c_uint = + 1; + pub const NS_FONT_VARIANT_ALTERNATES_FUNCTIONAL_MASK: + ::std::os::raw::c_uint = + 126; 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; @@ -75,6 +96,78 @@ pub mod root { 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_EAST_ASIAN_NORMAL: ::std::os::raw::c_uint = 0; + pub const NS_FONT_VARIANT_EAST_ASIAN_JIS78: ::std::os::raw::c_uint = 1; + pub const NS_FONT_VARIANT_EAST_ASIAN_JIS83: ::std::os::raw::c_uint = 2; + pub const NS_FONT_VARIANT_EAST_ASIAN_JIS90: ::std::os::raw::c_uint = 4; + pub const NS_FONT_VARIANT_EAST_ASIAN_JIS04: ::std::os::raw::c_uint = 8; + pub const NS_FONT_VARIANT_EAST_ASIAN_SIMPLIFIED: ::std::os::raw::c_uint = + 16; + pub const NS_FONT_VARIANT_EAST_ASIAN_TRADITIONAL: ::std::os::raw::c_uint = + 32; + pub const NS_FONT_VARIANT_EAST_ASIAN_FULL_WIDTH: ::std::os::raw::c_uint = + 64; + pub const NS_FONT_VARIANT_EAST_ASIAN_PROP_WIDTH: ::std::os::raw::c_uint = + 128; + pub const NS_FONT_VARIANT_EAST_ASIAN_RUBY: ::std::os::raw::c_uint = 256; + pub const NS_FONT_VARIANT_EAST_ASIAN_COUNT: ::std::os::raw::c_uint = 9; + pub const NS_FONT_VARIANT_EAST_ASIAN_VARIANT_MASK: ::std::os::raw::c_uint + = + 63; + pub const NS_FONT_VARIANT_EAST_ASIAN_WIDTH_MASK: ::std::os::raw::c_uint = + 192; + pub const NS_FONT_VARIANT_LIGATURES_NORMAL: ::std::os::raw::c_uint = 0; + pub const NS_FONT_VARIANT_LIGATURES_NONE: ::std::os::raw::c_uint = 1; + pub const NS_FONT_VARIANT_LIGATURES_COMMON: ::std::os::raw::c_uint = 2; + pub const NS_FONT_VARIANT_LIGATURES_NO_COMMON: ::std::os::raw::c_uint = 4; + pub const NS_FONT_VARIANT_LIGATURES_DISCRETIONARY: ::std::os::raw::c_uint + = + 8; + pub const NS_FONT_VARIANT_LIGATURES_NO_DISCRETIONARY: + ::std::os::raw::c_uint = + 16; + pub const NS_FONT_VARIANT_LIGATURES_HISTORICAL: ::std::os::raw::c_uint = + 32; + pub const NS_FONT_VARIANT_LIGATURES_NO_HISTORICAL: ::std::os::raw::c_uint + = + 64; + pub const NS_FONT_VARIANT_LIGATURES_CONTEXTUAL: ::std::os::raw::c_uint = + 128; + pub const NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL: ::std::os::raw::c_uint + = + 256; + pub const NS_FONT_VARIANT_LIGATURES_COUNT: ::std::os::raw::c_uint = 9; + pub const NS_FONT_VARIANT_LIGATURES_COMMON_MASK: ::std::os::raw::c_uint = + 6; + pub const NS_FONT_VARIANT_LIGATURES_DISCRETIONARY_MASK: + ::std::os::raw::c_uint = + 24; + pub const NS_FONT_VARIANT_LIGATURES_HISTORICAL_MASK: + ::std::os::raw::c_uint = + 96; + pub const NS_FONT_VARIANT_LIGATURES_CONTEXTUAL_MASK: + ::std::os::raw::c_uint = + 384; + pub const NS_FONT_VARIANT_NUMERIC_NORMAL: ::std::os::raw::c_uint = 0; + pub const NS_FONT_VARIANT_NUMERIC_LINING: ::std::os::raw::c_uint = 1; + pub const NS_FONT_VARIANT_NUMERIC_OLDSTYLE: ::std::os::raw::c_uint = 2; + pub const NS_FONT_VARIANT_NUMERIC_PROPORTIONAL: ::std::os::raw::c_uint = + 4; + pub const NS_FONT_VARIANT_NUMERIC_TABULAR: ::std::os::raw::c_uint = 8; + pub const NS_FONT_VARIANT_NUMERIC_DIAGONAL_FRACTIONS: + ::std::os::raw::c_uint = + 16; + pub const NS_FONT_VARIANT_NUMERIC_STACKED_FRACTIONS: + ::std::os::raw::c_uint = + 32; + pub const NS_FONT_VARIANT_NUMERIC_SLASHZERO: ::std::os::raw::c_uint = 64; + pub const NS_FONT_VARIANT_NUMERIC_ORDINAL: ::std::os::raw::c_uint = 128; + pub const NS_FONT_VARIANT_NUMERIC_COUNT: ::std::os::raw::c_uint = 8; + pub const NS_FONT_VARIANT_NUMERIC_FIGURE_MASK: ::std::os::raw::c_uint = 3; + pub const NS_FONT_VARIANT_NUMERIC_SPACING_MASK: ::std::os::raw::c_uint = + 12; + pub const NS_FONT_VARIANT_NUMERIC_FRACTION_MASK: ::std::os::raw::c_uint = + 48; 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; @@ -1820,9 +1913,6 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct Event([u8; 0]); - #[repr(C)] pub struct DispatcherTrait__bindgen_vtable { } #[repr(C)] @@ -1870,26 +1960,16 @@ pub mod root { pub struct AddEventListenerOptionsOrBoolean([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] + pub struct Event([u8; 0]); + #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct EventListener([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct EventListenerOptionsOrBoolean([u8; 0]); #[repr(C)] - #[derive(Debug)] - pub struct EventHandlerNonNull { - pub _base: root::mozilla::dom::CallbackFunction, - } - #[test] - fn bindgen_test_layout_EventHandlerNonNull() { - assert_eq!(::std::mem::size_of::() , - 48usize , concat ! ( - "Size of: " , stringify ! ( EventHandlerNonNull ) - )); - assert_eq! (::std::mem::align_of::() , - 8usize , concat ! ( - "Alignment of " , stringify ! ( - EventHandlerNonNull ) )); - } + #[derive(Debug, Copy, Clone)] + pub struct EventHandlerNonNull([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct AudioContext([u8; 0]); @@ -2188,21 +2268,6 @@ pub mod root { impl Clone for CallbackObjectHolderBase { fn clone(&self) -> Self { *self } } - #[repr(C)] - #[derive(Debug)] - pub struct CallbackFunction { - pub _base: root::mozilla::dom::CallbackObject, - } - #[test] - fn bindgen_test_layout_CallbackFunction() { - assert_eq!(::std::mem::size_of::() , 48usize - , concat ! ( - "Size of: " , stringify ! ( CallbackFunction ) )); - assert_eq! (::std::mem::align_of::() , - 8usize , concat ! ( - "Alignment of " , stringify ! ( CallbackFunction ) - )); - } pub mod prototypes { #[allow(unused_imports)] use self::super::super::super::super::root; @@ -3032,6 +3097,21 @@ pub mod root { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct Selection([u8; 0]); + #[repr(C)] + #[derive(Debug)] + pub struct CallbackFunction { + pub _base: root::mozilla::dom::CallbackObject, + } + #[test] + fn bindgen_test_layout_CallbackFunction() { + assert_eq!(::std::mem::size_of::() , 48usize + , concat ! ( + "Size of: " , stringify ! ( CallbackFunction ) )); + assert_eq! (::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( CallbackFunction ) + )); + } #[repr(u8)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum ScrollBehavior { @@ -5249,7 +5329,8 @@ pub mod root { pub mString: root::RefPtr, pub mExtraData: root::RefPtr, pub mURIResolved: bool, - pub mIsLocalRef: bool, + pub mIsLocalRef: [u8; 2usize], + pub mMightHaveRef: [u8; 2usize], } pub type URLValueData_HasThreadSafeRefCnt = root::mozilla::TrueType; @@ -5298,6 +5379,13 @@ pub mod root { "Alignment of field: " , stringify ! ( URLValueData ) , "::" , stringify ! ( mIsLocalRef ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const URLValueData ) ) . + mMightHaveRef as * const _ as usize } , 43usize , + concat ! ( + "Alignment of field: " , stringify ! ( + URLValueData ) , "::" , stringify ! ( + mMightHaveRef ) )); } #[repr(C)] #[derive(Debug)] @@ -5931,13 +6019,6 @@ pub mod root { "Alignment of field: " , stringify ! ( URLExtraData ) , "::" , stringify ! ( mPrincipal ) )); } - pub mod dmd { - #[allow(unused_imports)] - use self::super::super::super::root; - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct JSONWriteFunc([u8; 0]); #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum ArenaObjectID { @@ -11543,67 +11624,6 @@ pub mod root { "::" , stringify ! ( mFlags ) )); } #[repr(C)] - pub struct TraceCallbacks__bindgen_vtable { - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct TraceCallbacks { - pub vtable_: *const TraceCallbacks__bindgen_vtable, - } - #[test] - fn bindgen_test_layout_TraceCallbacks() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( "Size of: " , stringify ! ( TraceCallbacks ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat - ! ( "Alignment of " , stringify ! ( TraceCallbacks ) )); - } - impl Clone for TraceCallbacks { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsScriptObjectTracer { - pub _base: root::nsCycleCollectionParticipant, - } - #[test] - fn bindgen_test_layout_nsScriptObjectTracer() { - assert_eq!(::std::mem::size_of::() , 16usize , - concat ! ( - "Size of: " , stringify ! ( nsScriptObjectTracer ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( nsScriptObjectTracer ) )); - } - impl Clone for nsScriptObjectTracer { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsXPCOMCycleCollectionParticipant { - pub _base: root::nsScriptObjectTracer, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsXPCOMCycleCollectionParticipant_COMTypeInfo { - pub _address: u8, - pub _phantom_0: ::std::marker::PhantomData, - pub _phantom_1: ::std::marker::PhantomData, - } - #[test] - fn bindgen_test_layout_nsXPCOMCycleCollectionParticipant() { - assert_eq!(::std::mem::size_of::() - , 16usize , concat ! ( - "Size of: " , stringify ! ( - nsXPCOMCycleCollectionParticipant ) )); - assert_eq! (::std::mem::align_of::() - , 8usize , concat ! ( - "Alignment of " , stringify ! ( - nsXPCOMCycleCollectionParticipant ) )); - } - impl Clone for nsXPCOMCycleCollectionParticipant { - fn clone(&self) -> Self { *self } - } - #[repr(C)] #[derive(Debug, Copy)] pub struct JSErrorFormatString { /** The error message name in ASCII. */ @@ -11756,6 +11776,350 @@ pub mod root { "::" , stringify ! ( notes_ ) )); } #[repr(C)] + pub struct TraceCallbacks__bindgen_vtable { + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct TraceCallbacks { + pub vtable_: *const TraceCallbacks__bindgen_vtable, + } + #[test] + fn bindgen_test_layout_TraceCallbacks() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( "Size of: " , stringify ! ( TraceCallbacks ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of " , stringify ! ( TraceCallbacks ) )); + } + impl Clone for TraceCallbacks { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsScriptObjectTracer { + pub _base: root::nsCycleCollectionParticipant, + } + #[test] + fn bindgen_test_layout_nsScriptObjectTracer() { + assert_eq!(::std::mem::size_of::() , 16usize , + concat ! ( + "Size of: " , stringify ! ( nsScriptObjectTracer ) )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( nsScriptObjectTracer ) )); + } + impl Clone for nsScriptObjectTracer { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsXPCOMCycleCollectionParticipant { + pub _base: root::nsScriptObjectTracer, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsXPCOMCycleCollectionParticipant_COMTypeInfo { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData, + pub _phantom_1: ::std::marker::PhantomData, + } + #[test] + fn bindgen_test_layout_nsXPCOMCycleCollectionParticipant() { + assert_eq!(::std::mem::size_of::() + , 16usize , concat ! ( + "Size of: " , stringify ! ( + nsXPCOMCycleCollectionParticipant ) )); + assert_eq! (::std::mem::align_of::() + , 8usize , concat ! ( + "Alignment of " , stringify ! ( + nsXPCOMCycleCollectionParticipant ) )); + } + impl Clone for nsXPCOMCycleCollectionParticipant { + fn clone(&self) -> Self { *self } + } + pub type PLDHashNumber = u32; + #[repr(C)] + #[derive(Debug)] + pub struct PLDHashTable { + pub mOps: *const root::PLDHashTableOps, + pub mHashShift: i16, + pub mEntrySize: u32, + pub mEntryCount: u32, + pub mRemovedCount: u32, + pub mEntryStore: root::PLDHashTable_EntryStore, + } + #[repr(C)] + #[derive(Debug)] + pub struct PLDHashTable_EntryStore { + pub mEntryStore: *mut ::std::os::raw::c_char, + pub mGeneration: u32, + } + #[test] + fn bindgen_test_layout_PLDHashTable_EntryStore() { + assert_eq!(::std::mem::size_of::() , 16usize + , concat ! ( + "Size of: " , stringify ! ( PLDHashTable_EntryStore ) )); + assert_eq! (::std::mem::align_of::() , 8usize + , concat ! ( + "Alignment of " , stringify ! ( PLDHashTable_EntryStore ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_EntryStore ) ) . + mEntryStore as * const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_EntryStore ) , "::" , stringify ! ( + mEntryStore ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_EntryStore ) ) . + mGeneration as * const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_EntryStore ) , "::" , stringify ! ( + mGeneration ) )); + } + #[repr(C)] + #[derive(Debug)] + pub struct PLDHashTable_Iterator { + pub mTable: *mut root::PLDHashTable, + pub mStart: *mut ::std::os::raw::c_char, + pub mLimit: *mut ::std::os::raw::c_char, + pub mCurrent: *mut ::std::os::raw::c_char, + pub mNexts: u32, + pub mNextsLimit: u32, + pub mHaveRemoved: bool, + } + #[test] + fn bindgen_test_layout_PLDHashTable_Iterator() { + assert_eq!(::std::mem::size_of::() , 48usize , + concat ! ( + "Size of: " , stringify ! ( PLDHashTable_Iterator ) )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( PLDHashTable_Iterator ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mTable as + * const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mTable ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mStart as + * const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mStart ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mLimit as + * const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mLimit ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mCurrent + as * const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mCurrent ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mNexts as + * const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mNexts ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . + mNextsLimit as * const _ as usize } , 36usize , concat ! ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( mNextsLimit + ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable_Iterator ) ) . + mHaveRemoved as * const _ as usize } , 40usize , concat ! + ( + "Alignment of field: " , stringify ! ( + PLDHashTable_Iterator ) , "::" , stringify ! ( + mHaveRemoved ) )); + } + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } + pub const PLDHashTable_kMaxCapacity: u32 = 67108864; + pub const PLDHashTable_kMinCapacity: u32 = 8; + pub const PLDHashTable_kMaxInitialLength: u32 = 33554432; + pub const PLDHashTable_kDefaultInitialLength: u32 = 4; + pub const PLDHashTable_kHashBits: u32 = 32; + pub const PLDHashTable_kGoldenRatio: u32 = 2654435769; + pub const PLDHashTable_kCollisionFlag: root::PLDHashNumber = 1; + #[test] + fn bindgen_test_layout_PLDHashTable() { + assert_eq!(::std::mem::size_of::() , 40usize , concat ! + ( "Size of: " , stringify ! ( PLDHashTable ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat ! + ( "Alignment of " , stringify ! ( PLDHashTable ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mOps as * const _ + as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mOps ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mHashShift as * + const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mHashShift ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mEntrySize as * + const _ as usize } , 12usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mEntrySize ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mEntryCount as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mEntryCount ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mRemovedCount as * + const _ as usize } , 20usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mRemovedCount ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTable ) ) . mEntryStore as * + const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTable ) , + "::" , stringify ! ( mEntryStore ) )); + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct PLDHashTableOps { + pub hashKey: root::PLDHashHashKey, + pub matchEntry: root::PLDHashMatchEntry, + pub moveEntry: root::PLDHashMoveEntry, + pub clearEntry: root::PLDHashClearEntry, + pub initEntry: root::PLDHashInitEntry, + } + #[test] + fn bindgen_test_layout_PLDHashTableOps() { + assert_eq!(::std::mem::size_of::() , 40usize , concat + ! ( "Size of: " , stringify ! ( PLDHashTableOps ) )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( PLDHashTableOps ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . hashKey as * + const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( hashKey ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . matchEntry as * + const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( matchEntry ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . moveEntry as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( moveEntry ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . clearEntry as * + const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( clearEntry ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashTableOps ) ) . initEntry as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashTableOps ) , + "::" , stringify ! ( initEntry ) )); + } + impl Clone for PLDHashTableOps { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct PLDHashEntryHdr { + pub mKeyHash: root::PLDHashNumber, + } + #[test] + fn bindgen_test_layout_PLDHashEntryHdr() { + assert_eq!(::std::mem::size_of::() , 4usize , concat + ! ( "Size of: " , stringify ! ( PLDHashEntryHdr ) )); + assert_eq! (::std::mem::align_of::() , 4usize , + concat ! ( + "Alignment of " , stringify ! ( PLDHashEntryHdr ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const PLDHashEntryHdr ) ) . mKeyHash as * + const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( PLDHashEntryHdr ) , + "::" , stringify ! ( mKeyHash ) )); + } + impl Clone for PLDHashEntryHdr { + fn clone(&self) -> Self { *self } + } + pub type PLDHashHashKey = + ::std::option::Option ::std::os::raw::c_uint>; + pub type PLDHashMatchEntry = + ::std::option::Option bool>; + pub type PLDHashMoveEntry = + ::std::option::Option; + pub type PLDHashClearEntry = + ::std::option::Option; + pub type PLDHashInitEntry = + ::std::option::Option; + /** + * hashkey wrapper using T* KeyType + * + * @see nsTHashtable::EntryType for specification + */ + #[repr(C)] + #[derive(Debug)] + pub struct nsPtrHashKey { + pub _base: root::PLDHashEntryHdr, + pub mKey: *mut T, + } + pub type nsPtrHashKey_KeyType = *mut T; + pub type nsPtrHashKey_KeyTypePointer = *mut T; + pub const nsPtrHashKey_ALLOW_MEMMOVE: root::nsPtrHashKey__bindgen_ty_1 = + nsPtrHashKey__bindgen_ty_1::ALLOW_MEMMOVE; + #[repr(i32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum nsPtrHashKey__bindgen_ty_1 { ALLOW_MEMMOVE = 0, } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIRunnable { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIRunnable_COMTypeInfo { + pub _address: u8, + pub _phantom_0: ::std::marker::PhantomData, + pub _phantom_1: ::std::marker::PhantomData, + } + #[test] + fn bindgen_test_layout_nsIRunnable() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of: " , stringify ! ( nsIRunnable ) )); + assert_eq! (::std::mem::align_of::() , 8usize , concat ! + ( "Alignment of " , stringify ! ( nsIRunnable ) )); + } + impl Clone for nsIRunnable { + fn clone(&self) -> Self { *self } + } + #[repr(C)] #[derive(Debug, Copy)] pub struct nsIEventTarget { pub _base: root::nsISupports, @@ -11794,28 +12158,6 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] - #[derive(Debug, Copy)] - pub struct nsIRunnable { - pub _base: root::nsISupports, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct nsIRunnable_COMTypeInfo { - pub _address: u8, - pub _phantom_0: ::std::marker::PhantomData, - pub _phantom_1: ::std::marker::PhantomData, - } - #[test] - fn bindgen_test_layout_nsIRunnable() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of: " , stringify ! ( nsIRunnable ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat ! - ( "Alignment of " , stringify ! ( nsIRunnable ) )); - } - impl Clone for nsIRunnable { - fn clone(&self) -> Self { *self } - } - #[repr(C)] #[derive(Debug)] pub struct nsIGlobalObject { pub _base: root::nsISupports, @@ -13525,267 +13867,6 @@ pub mod root { concat ! ( "Alignment of " , stringify ! ( nsPIDOMWindowOuter ) )); } - pub type PLDHashNumber = u32; - #[repr(C)] - #[derive(Debug)] - pub struct PLDHashTable { - pub mOps: *const root::PLDHashTableOps, - pub mHashShift: i16, - pub mEntrySize: u32, - pub mEntryCount: u32, - pub mRemovedCount: u32, - pub mEntryStore: root::PLDHashTable_EntryStore, - } - #[repr(C)] - #[derive(Debug)] - pub struct PLDHashTable_EntryStore { - pub mEntryStore: *mut ::std::os::raw::c_char, - pub mGeneration: u32, - } - #[test] - fn bindgen_test_layout_PLDHashTable_EntryStore() { - assert_eq!(::std::mem::size_of::() , 16usize - , concat ! ( - "Size of: " , stringify ! ( PLDHashTable_EntryStore ) )); - assert_eq! (::std::mem::align_of::() , 8usize - , concat ! ( - "Alignment of " , stringify ! ( PLDHashTable_EntryStore ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_EntryStore ) ) . - mEntryStore as * const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_EntryStore ) , "::" , stringify ! ( - mEntryStore ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_EntryStore ) ) . - mGeneration as * const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_EntryStore ) , "::" , stringify ! ( - mGeneration ) )); - } - #[repr(C)] - #[derive(Debug)] - pub struct PLDHashTable_Iterator { - pub mTable: *mut root::PLDHashTable, - pub mStart: *mut ::std::os::raw::c_char, - pub mLimit: *mut ::std::os::raw::c_char, - pub mCurrent: *mut ::std::os::raw::c_char, - pub mNexts: u32, - pub mNextsLimit: u32, - pub mHaveRemoved: bool, - } - #[test] - fn bindgen_test_layout_PLDHashTable_Iterator() { - assert_eq!(::std::mem::size_of::() , 48usize , - concat ! ( - "Size of: " , stringify ! ( PLDHashTable_Iterator ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( PLDHashTable_Iterator ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mTable as - * const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mTable ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mStart as - * const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mStart ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mLimit as - * const _ as usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mLimit ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mCurrent - as * const _ as usize } , 24usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mCurrent ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . mNexts as - * const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mNexts ) - )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . - mNextsLimit as * const _ as usize } , 36usize , concat ! ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( mNextsLimit - ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable_Iterator ) ) . - mHaveRemoved as * const _ as usize } , 40usize , concat ! - ( - "Alignment of field: " , stringify ! ( - PLDHashTable_Iterator ) , "::" , stringify ! ( - mHaveRemoved ) )); - } - #[repr(u32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum PLDHashTable_SearchReason { ForSearchOrRemove = 0, ForAdd = 1, } - pub const PLDHashTable_kMaxCapacity: u32 = 67108864; - pub const PLDHashTable_kMinCapacity: u32 = 8; - pub const PLDHashTable_kMaxInitialLength: u32 = 33554432; - pub const PLDHashTable_kDefaultInitialLength: u32 = 4; - pub const PLDHashTable_kHashBits: u32 = 32; - pub const PLDHashTable_kGoldenRatio: u32 = 2654435769; - pub const PLDHashTable_kCollisionFlag: root::PLDHashNumber = 1; - #[test] - fn bindgen_test_layout_PLDHashTable() { - assert_eq!(::std::mem::size_of::() , 40usize , concat ! - ( "Size of: " , stringify ! ( PLDHashTable ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat ! - ( "Alignment of " , stringify ! ( PLDHashTable ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mOps as * const _ - as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mOps ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mHashShift as * - const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mHashShift ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mEntrySize as * - const _ as usize } , 12usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mEntrySize ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mEntryCount as * - const _ as usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mEntryCount ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mRemovedCount as * - const _ as usize } , 20usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mRemovedCount ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTable ) ) . mEntryStore as * - const _ as usize } , 24usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTable ) , - "::" , stringify ! ( mEntryStore ) )); - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct PLDHashTableOps { - pub hashKey: root::PLDHashHashKey, - pub matchEntry: root::PLDHashMatchEntry, - pub moveEntry: root::PLDHashMoveEntry, - pub clearEntry: root::PLDHashClearEntry, - pub initEntry: root::PLDHashInitEntry, - } - #[test] - fn bindgen_test_layout_PLDHashTableOps() { - assert_eq!(::std::mem::size_of::() , 40usize , concat - ! ( "Size of: " , stringify ! ( PLDHashTableOps ) )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( PLDHashTableOps ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . hashKey as * - const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( hashKey ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . matchEntry as * - const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( matchEntry ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . moveEntry as * - const _ as usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( moveEntry ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . clearEntry as * - const _ as usize } , 24usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( clearEntry ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashTableOps ) ) . initEntry as * - const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashTableOps ) , - "::" , stringify ! ( initEntry ) )); - } - impl Clone for PLDHashTableOps { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct PLDHashEntryHdr { - pub mKeyHash: root::PLDHashNumber, - } - #[test] - fn bindgen_test_layout_PLDHashEntryHdr() { - assert_eq!(::std::mem::size_of::() , 4usize , concat - ! ( "Size of: " , stringify ! ( PLDHashEntryHdr ) )); - assert_eq! (::std::mem::align_of::() , 4usize , - concat ! ( - "Alignment of " , stringify ! ( PLDHashEntryHdr ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const PLDHashEntryHdr ) ) . mKeyHash as * - const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( PLDHashEntryHdr ) , - "::" , stringify ! ( mKeyHash ) )); - } - impl Clone for PLDHashEntryHdr { - fn clone(&self) -> Self { *self } - } - pub type PLDHashHashKey = - ::std::option::Option ::std::os::raw::c_uint>; - pub type PLDHashMatchEntry = - ::std::option::Option bool>; - pub type PLDHashMoveEntry = - ::std::option::Option; - pub type PLDHashClearEntry = - ::std::option::Option; - pub type PLDHashInitEntry = - ::std::option::Option; - /** - * hashkey wrapper using T* KeyType - * - * @see nsTHashtable::EntryType for specification - */ - #[repr(C)] - #[derive(Debug)] - pub struct nsPtrHashKey { - pub _base: root::PLDHashEntryHdr, - pub mKey: *mut T, - } - pub type nsPtrHashKey_KeyType = *mut T; - pub type nsPtrHashKey_KeyTypePointer = *mut T; - pub const nsPtrHashKey_ALLOW_MEMMOVE: root::nsPtrHashKey__bindgen_ty_1 = - nsPtrHashKey__bindgen_ty_1::ALLOW_MEMMOVE; - #[repr(i32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum nsPtrHashKey__bindgen_ty_1 { ALLOW_MEMMOVE = 0, } /** * A node of content in a document's content model. This interface * is supported by all content objects. @@ -15853,66 +15934,66 @@ pub mod root { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsDOMMutationObserver([u8; 0]); - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_SHARED_RESTYLE_BIT_1; - pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_SHARED_RESTYLE_BIT_2; - pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_SHARED_RESTYLE_BIT_1; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_SHARED_RESTYLE_BIT_1; + pub const NODE_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_SHARED_RESTYLE_BIT_2; + pub const NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_SHARED_RESTYLE_BIT_1; pub const NODE_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_SHARED_RESTYLE_BIT_2; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_103 = - _bindgen_ty_103::NODE_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_SHARED_RESTYLE_BIT_2; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_99 = + _bindgen_ty_99::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_103 { + pub enum _bindgen_ty_99 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -23189,7 +23270,7 @@ pub mod root { pub mImage: root::__BindgenUnionField<*mut root::nsStyleImageRequest>, pub mGradient: root::__BindgenUnionField<*mut root::nsStyleGradient>, pub mURLValue: root::__BindgenUnionField<*mut root::nsStyleImage_URLValue>, - pub mElementId: root::__BindgenUnionField<*mut u16>, + pub mElementId: root::__BindgenUnionField<*mut root::nsIAtom>, pub bindgen_union_field: u64, } #[test] @@ -26700,40 +26781,6 @@ pub mod root { impl Clone for nsMediaFeatures { fn clone(&self) -> Self { *self } } - #[repr(C)] - #[derive(Debug)] - pub struct nsMediaExpression { - pub mFeature: *const root::nsMediaFeature, - pub mRange: root::nsMediaExpression_Range, - pub mValue: root::nsCSSValue, - } - #[repr(u32)] - #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum nsMediaExpression_Range { eMin = 0, eMax = 1, eEqual = 2, } - #[test] - fn bindgen_test_layout_nsMediaExpression() { - assert_eq!(::std::mem::size_of::() , 32usize , - concat ! ( "Size of: " , stringify ! ( nsMediaExpression ) - )); - assert_eq! (::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of " , stringify ! ( nsMediaExpression ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsMediaExpression ) ) . mFeature as * - const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( nsMediaExpression ) - , "::" , stringify ! ( mFeature ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsMediaExpression ) ) . mRange as * - const _ as usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( nsMediaExpression ) - , "::" , stringify ! ( mRange ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const nsMediaExpression ) ) . mValue as * - const _ as usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( nsMediaExpression ) - , "::" , stringify ! ( mValue ) )); - } /** * An nsMediaQueryResultCacheKey records what feature/value combinations * a set of media query results are valid for. This allows the caller @@ -26852,6 +26899,40 @@ pub mod root { } #[repr(C)] #[derive(Debug)] + pub struct nsMediaExpression { + pub mFeature: *const root::nsMediaFeature, + pub mRange: root::nsMediaExpression_Range, + pub mValue: root::nsCSSValue, + } + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum nsMediaExpression_Range { eMin = 0, eMax = 1, eEqual = 2, } + #[test] + fn bindgen_test_layout_nsMediaExpression() { + assert_eq!(::std::mem::size_of::() , 32usize , + concat ! ( "Size of: " , stringify ! ( nsMediaExpression ) + )); + assert_eq! (::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( nsMediaExpression ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsMediaExpression ) ) . mFeature as * + const _ as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( nsMediaExpression ) + , "::" , stringify ! ( mFeature ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsMediaExpression ) ) . mRange as * + const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( nsMediaExpression ) + , "::" , stringify ! ( mRange ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsMediaExpression ) ) . mValue as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( nsMediaExpression ) + , "::" , stringify ! ( mValue ) )); + } + #[repr(C)] + #[derive(Debug)] pub struct nsMediaQuery { pub mNegated: bool, pub mHasOnly: bool, @@ -27073,6 +27154,16 @@ pub mod root { } #[test] fn __bindgen_test_layout_template_17() { + assert_eq!(::std::mem::size_of::<[u8; 2usize]>() , 2usize , concat ! ( + "Size of template specialization: " , stringify ! ( + [u8; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u8; 2usize]>() , 1usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u8; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_template_18() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27083,7 +27174,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_template_18() { + fn __bindgen_test_layout_template_19() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27094,7 +27185,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_template_19() { + fn __bindgen_test_layout_template_20() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27105,7 +27196,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_template_20() { + fn __bindgen_test_layout_template_21() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27116,7 +27207,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_template_21() { + fn __bindgen_test_layout_template_22() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27127,7 +27218,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_template_22() { + fn __bindgen_test_layout_template_23() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -27144,7 +27235,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_23() { + fn __bindgen_test_layout_template_24() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27155,7 +27246,7 @@ pub mod root { root::JS::TenuredHeap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_template_24() { + fn __bindgen_test_layout_template_25() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27166,7 +27257,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_template_25() { + fn __bindgen_test_layout_template_26() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27179,7 +27270,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_26() { + fn __bindgen_test_layout_template_27() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27192,7 +27283,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_27() { + fn __bindgen_test_layout_template_28() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27203,7 +27294,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_template_28() { + fn __bindgen_test_layout_template_29() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27216,7 +27307,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_29() { + fn __bindgen_test_layout_template_30() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27227,7 +27318,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_30() { + fn __bindgen_test_layout_template_31() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27238,17 +27329,6 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_31() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Heap ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Heap ) )); - } - #[test] fn __bindgen_test_layout_template_32() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( @@ -27319,6 +27399,17 @@ pub mod root { } #[test] fn __bindgen_test_layout_template_35() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_template_36() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27329,7 +27420,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_36() { + fn __bindgen_test_layout_template_37() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27340,7 +27431,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_template_37() { + fn __bindgen_test_layout_template_38() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27351,7 +27442,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_template_38() { + fn __bindgen_test_layout_template_39() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27362,7 +27453,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_39() { + fn __bindgen_test_layout_template_40() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27375,7 +27466,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_40() { + fn __bindgen_test_layout_template_41() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27386,7 +27477,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_template_41() { + fn __bindgen_test_layout_template_42() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27397,7 +27488,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_template_42() { + fn __bindgen_test_layout_template_43() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27410,7 +27501,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_template_43() { + fn __bindgen_test_layout_template_44() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27421,7 +27512,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_template_44() { + fn __bindgen_test_layout_template_45() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27432,7 +27523,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_template_45() { + fn __bindgen_test_layout_template_46() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27443,7 +27534,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_46() { + fn __bindgen_test_layout_template_47() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27454,7 +27545,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_47() { + fn __bindgen_test_layout_template_48() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27465,7 +27556,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_48() { + fn __bindgen_test_layout_template_49() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27476,7 +27567,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_template_49() { + fn __bindgen_test_layout_template_50() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -27485,7 +27576,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_template_50() { + fn __bindgen_test_layout_template_51() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27496,7 +27587,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_template_51() { + fn __bindgen_test_layout_template_52() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27507,7 +27598,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_template_52() { + fn __bindgen_test_layout_template_53() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27518,7 +27609,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_template_53() { + fn __bindgen_test_layout_template_54() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27529,7 +27620,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_54() { + fn __bindgen_test_layout_template_55() { assert_eq!(::std::mem::size_of::>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27542,7 +27633,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_template_55() { + fn __bindgen_test_layout_template_56() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -27553,17 +27644,6 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_template_56() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] fn __bindgen_test_layout_template_57() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index bf8a2b5f19b..0bf94e849f6 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -293,6 +293,26 @@ def set_gecko_property(ffi_name, expr): } +<%def name="impl_bitflags_setter(ident, gecko_ffi_name, bit_map, gecko_bit_prefix, cast_type='u8')"> + #[allow(non_snake_case)] + pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) { + % for gecko_bit in bit_map.values(): + use gecko_bindings::structs::${gecko_bit_prefix}${gecko_bit}; + % endfor + + let mut bits: ${cast_type} = 0; + // FIXME: if we ensure that the Servo bitflags storage is the same + // as Gecko's one, we can just copy it. + % for servo_bit, gecko_bit in bit_map.iteritems(): + if v.contains(longhands::${ident}::${servo_bit}) { + bits |= ${gecko_bit_prefix}${gecko_bit} as ${cast_type}; + } + % endfor + + self.gecko.${gecko_ffi_name} = bits as ${cast_type}; + } + + /// Convert a Servo color into an nscolor; with currentColor as 0 /// @@ -646,8 +666,6 @@ impl Debug for ${style_struct.gecko_struct_name} { # Make a list of types we can't auto-generate. # force_stub = []; - # These live in an nsFont member in Gecko. Should be straightforward to do manually. - force_stub += ["font-variant"] # These have unusual representations in gecko. force_stub += ["list-style-type"] @@ -1262,7 +1280,9 @@ fn static_assert() { <% skip_font_longhands = """font-family font-size font-size-adjust font-weight - font-synthesis -x-lang font-language-override""" + font-synthesis -x-lang font-variant-alternates + font-variant-east-asian font-variant-ligatures + font-variant-numeric font-language-override""" %> <%self:impl_trait style_struct_name="Font" skip_longhands="${skip_font_longhands}" @@ -1408,6 +1428,76 @@ fn static_assert() { self.gecko.mFont.languageOverride = v.0; } ${impl_simple_copy('font_language_override', 'mFont.languageOverride')} + + <% font_variant_alternates_map = { "HISTORICAL_FORMS": "HISTORICAL", + "STYLISTIC": "STYLISTIC", + "STYLESET": "STYLESET", + "CHARACTER_VARIANT": "CHARACTER_VARIANT", + "SWASH": "SWASH", + "ORNAMENTS": "ORNAMENTS", + "ANNOTATION": "ANNOTATION" } %> + // FIXME: Set alternateValues as well. + // self.gecko.mFont.alternateValues = xxx; + ${impl_bitflags_setter('font_variant_alternates', + 'mFont.variantAlternates', + font_variant_alternates_map, + 'NS_FONT_VARIANT_ALTERNATES_', + cast_type='u16')} + #[allow(non_snake_case)] + pub fn copy_font_variant_alternates_from(&mut self, other: &Self) { + self.gecko.mFont.variantAlternates = other.gecko.mFont.variantAlternates; + // FIXME: Copy alternateValues as well. + // self.gecko.mFont.alternateValues = other.gecko.mFont.alternateValues; + } + + // servo_bit: gecko_bit + <% font_variant_ligatures_map = { "NONE": "NONE", + "COMMON_LIGATURES": "COMMON", + "NO_COMMON_LIGATURES": "NO_COMMON", + "DISCRETIONARY_LIGATURES": "DISCRETIONARY", + "NO_DISCRETIONARY_LIGATURES": "NO_DISCRETIONARY", + "HISTORICAL_LIGATURES": "HISTORICAL", + "NO_HISTORICAL_LIGATURES": "NO_HISTORICAL", + "CONTEXTUAL": "CONTEXTUAL", + "NO_CONTEXTUAL": "NO_CONTEXTUAL" } %> + ${impl_bitflags_setter('font_variant_ligatures', + 'mFont.variantLigatures', + font_variant_ligatures_map, + 'NS_FONT_VARIANT_LIGATURES_', + cast_type='u16')} + ${impl_simple_copy('font_variant_ligatures', 'mFont.variantLigatures')} + + // servo_bit: gecko_bit + <% font_variant_east_asian_map = { "JIS78": "JIS78", + "JIS83": "JIS83", + "JIS90": "JIS90", + "JIS04": "JIS04", + "SIMPLIFIED": "SIMPLIFIED", + "TRADITIONAL": "TRADITIONAL", + "FULL_WIDTH": "FULL_WIDTH", + "PROPORTIONAL_WIDTH": "PROP_WIDTH", + "RUBY": "RUBY" } %> + ${impl_bitflags_setter('font_variant_east_asian', + 'mFont.variantEastAsian', + font_variant_east_asian_map, + 'NS_FONT_VARIANT_EAST_ASIAN_', + cast_type='u16')} + ${impl_simple_copy('font_variant_east_asian', 'mFont.variantEastAsian')} + + // servo_bit: gecko_bit + <% font_variant_numeric_map = { "LINING_NUMS": "LINING", + "OLDSTYLE_NUMS": "OLDSTYLE", + "PROPORTIONAL_NUMS": "PROPORTIONAL", + "TABULAR_NUMS": "TABULAR", + "DIAGONAL_FRACTIONS": "DIAGONAL_FRACTIONS", + "STACKED_FRACTIONS": "STACKED_FRACTIONS", + "SLASHED_ZERO": "SLASHZERO", + "ORDINAL": "ORDINAL" } %> + ${impl_bitflags_setter('font_variant_numeric', + 'mFont.variantNumeric', + font_variant_numeric_map, + 'NS_FONT_VARIANT_NUMERIC_')} + ${impl_simple_copy('font_variant_numeric', 'mFont.variantNumeric')} <%def name="impl_copy_animation_or_transition_value(type, ident, gecko_ffi_name)"> diff --git a/components/style/properties/longhand/font.mako.rs b/components/style/properties/longhand/font.mako.rs index 1e5cc783bd3..df95d9f464c 100644 --- a/components/style/properties/longhand/font.mako.rs +++ b/components/style/properties/longhand/font.mako.rs @@ -228,11 +228,6 @@ ${helpers.single_keyword("font-style", animation_type="none", needs_conversion=True)} -${helpers.single_keyword("font-variant", - "normal small-caps", - spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant", - animation_type="none")} - <% font_variant_caps_custom_consts= { "small-caps": "SMALLCAPS", "all-small": "ALLSMALL", @@ -241,10 +236,10 @@ ${helpers.single_keyword("font-variant", "titling-caps": "TITLING" } %> ${helpers.single_keyword("font-variant-caps", - "normal small-caps all-small petite-caps unicase titling-caps", + "normal small-caps", + extra_gecko_values="all-small petite-caps unicase titling-caps", gecko_constant_prefix="NS_FONT_VARIANT_CAPS", gecko_ffi_name="mFont.variantCaps", - products="gecko", spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-caps", custom_consts=font_variant_caps_custom_consts, animation_type="none")} @@ -893,6 +888,495 @@ ${helpers.single_keyword("font-kerning", spec="https://drafts.csswg.org/css-fonts/#propdef-font-stretch", animation_type="none")} +/// FIXME: Implement proper handling of each values. +/// https://github.com/servo/servo/issues/15957 +<%helpers:longhand name="font-variant-alternates" products="gecko" animation_type="none" + spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-alternates"> + use std::fmt; + use style_traits::ToCss; + use values::HasViewportPercentage; + use values::computed::ComputedValueAsSpecified; + + impl ComputedValueAsSpecified for SpecifiedValue {} + no_viewport_percentage!(SpecifiedValue); + + bitflags! { + #[cfg_attr(feature = "servo", derive(HeapSizeOf))] + pub flags SpecifiedValue: u8 { + const NORMAL = 0, + const HISTORICAL_FORMS = 0x01, + const STYLISTIC = 0x02, + const STYLESET = 0x04, + const CHARACTER_VARIANT = 0x08, + const SWASH = 0x10, + const ORNAMENTS = 0x20, + const ANNOTATION = 0x40, + } + } + + impl ToCss for SpecifiedValue { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + if self.is_empty() { + return dest.write_str("normal") + } + + let mut has_any = false; + + macro_rules! write_value { + ($ident:ident => $str:expr) => { + if self.intersects($ident) { + if has_any { + try!(dest.write_str(" ")); + } + has_any = true; + try!(dest.write_str($str)); + } + } + } + + write_value!(HISTORICAL_FORMS => "historical-forms"); + write_value!(STYLISTIC => "stylistic"); + write_value!(STYLESET => "styleset"); + write_value!(CHARACTER_VARIANT => "character-variant"); + write_value!(SWASH => "swash"); + write_value!(ORNAMENTS => "ornaments"); + write_value!(ANNOTATION => "annotation"); + + debug_assert!(has_any); + Ok(()) + } + } + + pub mod computed_value { + pub type T = super::SpecifiedValue; + } + #[inline] + pub fn get_initial_value() -> computed_value::T { + computed_value::T::empty() + } + #[inline] + pub fn get_initial_specified_value() -> SpecifiedValue { + SpecifiedValue::empty() + } + + /// normal | + /// [ stylistic() || + /// historical-forms || + /// styleset( #) || + /// character-variant( #) || + /// swash() || + /// ornaments() || + /// annotation() ] + pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result { + let mut result = SpecifiedValue::empty(); + + if input.try(|input| input.expect_ident_matching("normal")).is_ok() { + return Ok(result) + } + + while let Ok(ident) = input.try(|input| input.expect_ident()) { + let flag = match_ignore_ascii_case! { &ident, + "stylistic" => STYLISTIC, + "historical-forms" => HISTORICAL_FORMS, + "styleset" => STYLESET, + "character-variant" => CHARACTER_VARIANT, + "swash" => SWASH, + "ornaments" => ORNAMENTS, + "annotation" => ANNOTATION, + _ => return Err(()), + }; + if result.intersects(flag) { + return Err(()) + } + result.insert(flag); + } + + if !result.is_empty() { + Ok(result) + } else { + Err(()) + } + } + + +macro_rules! exclusive_value { + (($value:ident, $set:expr) => $ident:ident) => { + if $value.intersects($set) { + return Err(()) + } else { + $ident + } + } +} + +<%helpers:longhand name="font-variant-east-asian" products="gecko" animation_type="none" + spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-east-asian"> + use std::fmt; + use style_traits::ToCss; + use values::HasViewportPercentage; + use values::computed::ComputedValueAsSpecified; + + impl ComputedValueAsSpecified for SpecifiedValue {} + no_viewport_percentage!(SpecifiedValue); + + bitflags! { + #[cfg_attr(feature = "servo", derive(HeapSizeOf))] + pub flags SpecifiedValue: u16 { + const NORMAL = 0, + const JIS78 = 0x01, + const JIS83 = 0x02, + const JIS90 = 0x04, + const JIS04 = 0x08, + const SIMPLIFIED = 0x10, + const TRADITIONAL = 0x20, + const FULL_WIDTH = 0x40, + const PROPORTIONAL_WIDTH = 0x80, + const RUBY = 0x100, + } + } + + impl ToCss for SpecifiedValue { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + if self.is_empty() { + return dest.write_str("normal") + } + + let mut has_any = false; + + macro_rules! write_value { + ($ident:ident => $str:expr) => { + if self.intersects($ident) { + if has_any { + try!(dest.write_str(" ")); + } + has_any = true; + try!(dest.write_str($str)); + } + } + } + + write_value!(JIS78 => "jis78"); + write_value!(JIS83 => "jis83"); + write_value!(JIS90 => "jis90"); + write_value!(JIS04 => "jis04"); + write_value!(SIMPLIFIED => "simplified"); + write_value!(TRADITIONAL => "traditional"); + write_value!(FULL_WIDTH => "full-width"); + write_value!(PROPORTIONAL_WIDTH => "proportional-width"); + write_value!(RUBY => "ruby"); + + debug_assert!(has_any); + Ok(()) + } + } + + pub mod computed_value { + pub type T = super::SpecifiedValue; + } + #[inline] + pub fn get_initial_value() -> computed_value::T { + computed_value::T::empty() + } + #[inline] + pub fn get_initial_specified_value() -> SpecifiedValue { + SpecifiedValue::empty() + } + + /// normal | [ || || ruby ] + /// = [ jis78 | jis83 | jis90 | jis04 | simplified | traditional ] + /// = [ full-width | proportional-width ] + <% east_asian_variant_values = "JIS78 | JIS83 | JIS90 | JIS04 | SIMPLIFIED | TRADITIONAL" %> + <% east_asian_width_values = "FULL_WIDTH | PROPORTIONAL_WIDTH" %> + pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result { + let mut result = SpecifiedValue::empty(); + + if input.try(|input| input.expect_ident_matching("normal")).is_ok() { + return Ok(result) + } + + while let Ok(ident) = input.try(|input| input.expect_ident()) { + let flag = match_ignore_ascii_case! { &ident, + "jis78" => + exclusive_value!((result, ${east_asian_variant_values}) => JIS78), + "jis83" => + exclusive_value!((result, ${east_asian_variant_values}) => JIS83), + "jis90" => + exclusive_value!((result, ${east_asian_variant_values}) => JIS90), + "jis04" => + exclusive_value!((result, ${east_asian_variant_values}) => JIS04), + "simplified" => + exclusive_value!((result, ${east_asian_variant_values}) => SIMPLIFIED), + "traditional" => + exclusive_value!((result, ${east_asian_variant_values}) => TRADITIONAL), + "full-width" => + exclusive_value!((result, ${east_asian_width_values}) => FULL_WIDTH), + "proportional-width" => + exclusive_value!((result, ${east_asian_width_values}) => PROPORTIONAL_WIDTH), + "ruby" => + exclusive_value!((result, RUBY) => RUBY), + _ => return Err(()), + }; + result.insert(flag); + } + + if !result.is_empty() { + Ok(result) + } else { + Err(()) + } + } + + +<%helpers:longhand name="font-variant-ligatures" products="gecko" animation_type="none" + spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-ligatures"> + use std::fmt; + use style_traits::ToCss; + use values::HasViewportPercentage; + use values::computed::ComputedValueAsSpecified; + + impl ComputedValueAsSpecified for SpecifiedValue {} + no_viewport_percentage!(SpecifiedValue); + + bitflags! { + #[cfg_attr(feature = "servo", derive(HeapSizeOf))] + pub flags SpecifiedValue: u16 { + const NORMAL = 0, + const NONE = 0x01, + const COMMON_LIGATURES = 0x02, + const NO_COMMON_LIGATURES = 0x04, + const DISCRETIONARY_LIGATURES = 0x08, + const NO_DISCRETIONARY_LIGATURES = 0x10, + const HISTORICAL_LIGATURES = 0x20, + const NO_HISTORICAL_LIGATURES = 0x40, + const CONTEXTUAL = 0x80, + const NO_CONTEXTUAL = 0x100, + } + } + + impl ToCss for SpecifiedValue { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + if self.is_empty() { + return dest.write_str("normal") + } + if self.contains(NONE) { + return dest.write_str("none") + } + + let mut has_any = false; + + macro_rules! write_value { + ($ident:ident => $str:expr) => { + if self.intersects($ident) { + if has_any { + try!(dest.write_str(" ")); + } + has_any = true; + try!(dest.write_str($str)); + } + } + } + + write_value!(COMMON_LIGATURES => "common-ligatures"); + write_value!(NO_COMMON_LIGATURES => "no-common-ligatures"); + write_value!(DISCRETIONARY_LIGATURES => "discretionary-ligatures"); + write_value!(NO_DISCRETIONARY_LIGATURES => "no-discretionary-ligatures"); + write_value!(HISTORICAL_LIGATURES => "historical-ligatures"); + write_value!(NO_HISTORICAL_LIGATURES => "no-historical-ligatures"); + write_value!(CONTEXTUAL => "contextual"); + write_value!(NO_CONTEXTUAL => "no-contextual"); + + debug_assert!(has_any); + Ok(()) + } + } + + pub mod computed_value { + pub type T = super::SpecifiedValue; + } + #[inline] + pub fn get_initial_value() -> computed_value::T { + computed_value::T::empty() + } + #[inline] + pub fn get_initial_specified_value() -> SpecifiedValue { + SpecifiedValue::empty() + } + + /// normal | none | + /// [ || + /// || + /// || + /// ] + /// = [ common-ligatures | no-common-ligatures ] + /// = [ discretionary-ligatures | no-discretionary-ligatures ] + /// = [ historical-ligatures | no-historical-ligatures ] + /// = [ contextual | no-contextual ] + <% common_lig_values = "COMMON_LIGATURES | NO_COMMON_LIGATURES" %> + <% discretionary_lig_values = "DISCRETIONARY_LIGATURES | NO_DISCRETIONARY_LIGATURES" %> + <% historical_lig_values = "HISTORICAL_LIGATURES | NO_HISTORICAL_LIGATURES" %> + <% contextual_alt_values = "CONTEXTUAL | NO_CONTEXTUAL" %> + pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result { + let mut result = SpecifiedValue::empty(); + + if input.try(|input| input.expect_ident_matching("normal")).is_ok() { + return Ok(result) + } + if input.try(|input| input.expect_ident_matching("none")).is_ok() { + return Ok(NONE) + } + + while let Ok(ident) = input.try(|input| input.expect_ident()) { + let flag = match_ignore_ascii_case! { &ident, + "common-ligatures" => + exclusive_value!((result, ${common_lig_values}) => COMMON_LIGATURES), + "no-common-ligatures" => + exclusive_value!((result, ${common_lig_values}) => NO_COMMON_LIGATURES), + "discretionary-ligatures" => + exclusive_value!((result, ${discretionary_lig_values}) => DISCRETIONARY_LIGATURES), + "no-discretionary-ligatures" => + exclusive_value!((result, ${discretionary_lig_values}) => NO_DISCRETIONARY_LIGATURES), + "historical-ligatures" => + exclusive_value!((result, ${historical_lig_values}) => HISTORICAL_LIGATURES), + "no-historical-ligatures" => + exclusive_value!((result, ${historical_lig_values}) => NO_HISTORICAL_LIGATURES), + "contextual" => + exclusive_value!((result, ${contextual_alt_values}) => CONTEXTUAL), + "no-contextual" => + exclusive_value!((result, ${contextual_alt_values}) => NO_CONTEXTUAL), + _ => return Err(()), + }; + result.insert(flag); + } + + if !result.is_empty() { + Ok(result) + } else { + Err(()) + } + } + + +<%helpers:longhand name="font-variant-numeric" products="gecko" animation_type="none" + spec="https://drafts.csswg.org/css-fonts/#propdef-font-variant-numeric"> + use std::fmt; + use style_traits::ToCss; + use values::HasViewportPercentage; + use values::computed::ComputedValueAsSpecified; + + impl ComputedValueAsSpecified for SpecifiedValue {} + no_viewport_percentage!(SpecifiedValue); + + bitflags! { + #[cfg_attr(feature = "servo", derive(HeapSizeOf))] + pub flags SpecifiedValue: u8 { + const NORMAL = 0, + const LINING_NUMS = 0x01, + const OLDSTYLE_NUMS = 0x02, + const PROPORTIONAL_NUMS = 0x04, + const TABULAR_NUMS = 0x08, + const DIAGONAL_FRACTIONS = 0x10, + const STACKED_FRACTIONS = 0x20, + const SLASHED_ZERO = 0x40, + const ORDINAL = 0x80, + } + } + + impl ToCss for SpecifiedValue { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + if self.is_empty() { + return dest.write_str("normal") + } + + let mut has_any = false; + + macro_rules! write_value { + ($ident:ident => $str:expr) => { + if self.intersects($ident) { + if has_any { + try!(dest.write_str(" ")); + } + has_any = true; + try!(dest.write_str($str)); + } + } + } + + write_value!(LINING_NUMS => "lining-nums"); + write_value!(OLDSTYLE_NUMS => "oldstyle-nums"); + write_value!(PROPORTIONAL_NUMS => "proportional-nums"); + write_value!(TABULAR_NUMS => "tabular-nums"); + write_value!(DIAGONAL_FRACTIONS => "diagonal-fractions"); + write_value!(STACKED_FRACTIONS => "stacked-fractions"); + write_value!(SLASHED_ZERO => "slashed-zero"); + write_value!(ORDINAL => "ordinal"); + + debug_assert!(has_any); + Ok(()) + } + } + + pub mod computed_value { + pub type T = super::SpecifiedValue; + } + #[inline] + pub fn get_initial_value() -> computed_value::T { + computed_value::T::empty() + } + #[inline] + pub fn get_initial_specified_value() -> SpecifiedValue { + SpecifiedValue::empty() + } + + /// normal | + /// [ || + /// || + /// || + /// ordinal || + /// slashed-zero ] + /// = [ lining-nums | oldstyle-nums ] + /// = [ proportional-nums | tabular-nums ] + /// = [ diagonal-fractions | stacked-fractions ] + <% numeric_figure_values = "LINING_NUMS | OLDSTYLE_NUMS" %> + <% numeric_spacing_values = "PROPORTIONAL_NUMS | TABULAR_NUMS" %> + <% numeric_fraction_values = "DIAGONAL_FRACTIONS | STACKED_FRACTIONS" %> + pub fn parse(_context: &ParserContext, input: &mut Parser) -> Result { + let mut result = SpecifiedValue::empty(); + + if input.try(|input| input.expect_ident_matching("normal")).is_ok() { + return Ok(result) + } + + while let Ok(ident) = input.try(|input| input.expect_ident()) { + let flag = match_ignore_ascii_case! { &ident, + "ordinal" => + exclusive_value!((result, ORDINAL) => ORDINAL), + "slashed-zero" => + exclusive_value!((result, SLASHED_ZERO) => SLASHED_ZERO), + "lining-nums" => + exclusive_value!((result, ${numeric_figure_values}) => LINING_NUMS ), + "oldstyle-nums" => + exclusive_value!((result, ${numeric_figure_values}) => OLDSTYLE_NUMS ), + "proportional-nums" => + exclusive_value!((result, ${numeric_spacing_values}) => PROPORTIONAL_NUMS ), + "tabular-nums" => + exclusive_value!((result, ${numeric_spacing_values}) => TABULAR_NUMS ), + "diagonal-fractions" => + exclusive_value!((result, ${numeric_fraction_values}) => DIAGONAL_FRACTIONS ), + "stacked-fractions" => + exclusive_value!((result, ${numeric_fraction_values}) => STACKED_FRACTIONS ), + _ => return Err(()), + }; + result.insert(flag); + } + + if !result.is_empty() { + Ok(result) + } else { + Err(()) + } + } + + ${helpers.single_keyword("font-variant-position", "normal sub super", products="gecko", diff --git a/components/style/properties/shorthand/font.mako.rs b/components/style/properties/shorthand/font.mako.rs index 1b68ea6afe1..6459d2c68c9 100644 --- a/components/style/properties/shorthand/font.mako.rs +++ b/components/style/properties/shorthand/font.mako.rs @@ -5,26 +5,36 @@ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="font" - sub_properties="font-style font-variant font-weight font-stretch + sub_properties="font-style font-variant-caps font-weight font-stretch font-size line-height font-family ${'font-size-adjust' if product == 'gecko' or data.testing else ''} ${'font-kerning' if product == 'gecko' or data.testing else ''} - ${'font-variant-caps' if product == 'gecko' or data.testing else ''} + ${'font-variant-alternates' if product == 'gecko' or data.testing else ''} + ${'font-variant-east-asian' if product == 'gecko' or data.testing else ''} + ${'font-variant-ligatures' if product == 'gecko' or data.testing else ''} + ${'font-variant-numeric' if product == 'gecko' or data.testing else ''} ${'font-variant-position' if product == 'gecko' or data.testing else ''} ${'font-language-override' if product == 'gecko' or data.testing else ''}" spec="https://drafts.csswg.org/css-fonts-3/#propdef-font"> - use properties::longhands::{font_style, font_variant, font_weight, font_stretch}; + use properties::longhands::{font_style, font_variant_caps, font_weight, font_stretch}; use properties::longhands::{font_size, line_height}; + <% + gecko_sub_properties = "kerning language_override size_adjust \ + variant_alternates variant_east_asian \ + variant_ligatures variant_numeric \ + variant_position".split() + %> % if product == "gecko" or data.testing: - use properties::longhands::{font_size_adjust, font_kerning, font_variant_caps, font_variant_position, - font_language_override}; + % for prop in gecko_sub_properties: + use properties::longhands::font_${prop}; + % endfor % endif use properties::longhands::font_family::SpecifiedValue as FontFamily; pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result { let mut nb_normals = 0; let mut style = None; - let mut variant = None; + let mut variant_caps = None; let mut weight = None; let mut stretch = None; let size; @@ -48,9 +58,9 @@ continue } } - if variant.is_none() { - if let Ok(value) = input.try(|input| font_variant::parse(context, input)) { - variant = Some(value); + if variant_caps.is_none() { + if let Ok(value) = input.try(|input| font_variant_caps::parse(context, input)) { + variant_caps = Some(value); continue } } @@ -67,7 +77,8 @@ fn count(opt: &Option) -> u8 { if opt.is_some() { 1 } else { 0 } } - if size.is_none() || (count(&style) + count(&weight) + count(&variant) + count(&stretch) + nb_normals) > 4 { + if size.is_none() || + (count(&style) + count(&weight) + count(&variant_caps) + count(&stretch) + nb_normals) > 4 { return Err(()) } let line_height = if input.try(|input| input.expect_delim('/')).is_ok() { @@ -77,13 +88,13 @@ }; let family = FontFamily::parse(input)?; Ok(Longhands { - % for name in "style variant weight stretch size".split(): + % for name in "style variant_caps weight stretch size".split(): font_${name}: unwrap_or_initial!(font_${name}, ${name}), % endfor line_height: unwrap_or_initial!(line_height), font_family: family, % if product == "gecko" or data.testing: - % for name in "size_adjust kerning variant_caps variant_position language_override".split(): + % for name in gecko_sub_properties: font_${name}: font_${name}::get_initial_specified_value(), % endfor % endif @@ -95,14 +106,14 @@ fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { % if product == "gecko" or data.testing: - % for name in "size_adjust kerning variant_caps variant_position language_override".split(): + % for name in gecko_sub_properties: if self.font_${name} != &font_${name}::get_initial_specified_value() { return Ok(()); } % endfor % endif - % for name in "style variant weight stretch".split(): + % for name in "style variant_caps weight stretch".split(): self.font_${name}.to_css(dest)?; dest.write_str(" ")?; % endfor @@ -124,3 +135,76 @@ } } + +<%helpers:shorthand name="font-variant" + sub_properties="font-variant-caps + ${'font-variant-alternates' if product == 'gecko' or data.testing else ''} + ${'font-variant-east-asian' if product == 'gecko' or data.testing else ''} + ${'font-variant-ligatures' if product == 'gecko' or data.testing else ''} + ${'font-variant-numeric' if product == 'gecko' or data.testing else ''} + ${'font-variant-position' if product == 'gecko' or data.testing else ''}" + spec="https://drafts.csswg.org/css-fonts-3/#propdef-font-variant"> + use properties::longhands::font_variant_caps; + <% gecko_sub_properties = "alternates east_asian ligatures numeric position".split() %> + % if product == "gecko" or data.testing: + % for prop in gecko_sub_properties: + use properties::longhands::font_variant_${prop}; + % endfor + % endif + + pub fn parse_value(context: &ParserContext, input: &mut Parser) -> Result { + let mut nb_normals = 0; + let mut caps = None; + loop { + // Special-case 'normal' because it is valid in each of + // all sub properties. + // Leaves the values to None, 'normal' is the initial value for each of them. + if input.try(|input| input.expect_ident_matching("normal")).is_ok() { + nb_normals += 1; + continue; + } + if caps.is_none() { + if let Ok(value) = input.try(|input| font_variant_caps::parse(context, input)) { + caps = Some(value); + continue + } + } + break + } + #[inline] + fn count(opt: &Option) -> u8 { + if opt.is_some() { 1 } else { 0 } + } + let count = count(&caps) + nb_normals; + if count == 0 || count > 1 { + return Err(()) + } + Ok(Longhands { + font_variant_caps: unwrap_or_initial!(font_variant_caps, caps), + // FIXME: Bug 1356134 - parse all sub properties. + % if product == "gecko" or data.testing: + % for name in gecko_sub_properties: + font_variant_${name}: font_variant_${name}::get_initial_specified_value(), + % endfor + % endif + }) + } + + impl<'a> ToCss for LonghandsToSerialize<'a> { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + + % if product == "gecko" or data.testing: + % for name in gecko_sub_properties: + // FIXME: Bug 1356134 - handle all sub properties. + if self.font_variant_${name} != &font_variant_${name}::get_initial_specified_value() { + return Ok(()); + } + % endfor + % endif + + self.font_variant_caps.to_css(dest)?; + + Ok(()) + } + } + diff --git a/components/style/servo/restyle_damage.rs b/components/style/servo/restyle_damage.rs index aad16730126..0ad934278c1 100644 --- a/components/style/servo/restyle_damage.rs +++ b/components/style/servo/restyle_damage.rs @@ -201,7 +201,7 @@ fn compute_damage(old: &ServoComputedValues, new: &ServoComputedValues) -> Servo get_inheritedtext.text_transform, get_inheritedtext.word_spacing, get_inheritedtext.overflow_wrap, get_inheritedtext.text_justify, get_inheritedtext.white_space, get_inheritedtext.word_break, get_text.text_overflow, - get_font.font_family, get_font.font_style, get_font.font_variant, get_font.font_weight, + get_font.font_family, get_font.font_style, get_font.font_variant_caps, get_font.font_weight, get_font.font_size, get_font.font_stretch, get_inheritedbox.direction, get_inheritedbox.writing_mode, get_text.text_decoration_line, get_text.unicode_bidi,