diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-05-16 01:17:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-16 01:17:07 -0500 |
commit | 1afc89e944c7ea7e4510b4b678a95a8faaa309b1 (patch) | |
tree | 94de53bbab90c35f5996d2408ba5c5d2ba54267b | |
parent | 7ca393a9603d7fa72e58a36bd53c29db396f6ea4 (diff) | |
parent | 21e0c10995ecc6c497a4c507b8a9852d769a571f (diff) | |
download | servo-1afc89e944c7ea7e4510b4b678a95a8faaa309b1.tar.gz servo-1afc89e944c7ea7e4510b4b678a95a8faaa309b1.zip |
Auto merge of #16888 - upsuper:bug1328319, r=heycam,Manishearth,SimonSapin
Implement @counter-style for stylo
Servo side change of [bug 1328319](https://bugzilla.mozilla.org/show_bug.cgi?id=1328319).
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16888)
<!-- Reviewable:end -->
22 files changed, 1500 insertions, 916 deletions
diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index b4c26cb4f6d..d32b3a9f62f 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -319,6 +319,7 @@ mod bindings { .include(add_include("mozilla/dom/NameSpaceConstants.h")) .include(add_include("mozilla/LookAndFeel.h")) .include(add_include("mozilla/ServoBindings.h")) + .include(add_include("nsCSSCounterStyleRule.h")) .include(add_include("nsCSSFontFaceRule.h")) .include(add_include("nsMediaFeatures.h")) .include(add_include("nsMediaList.h")) @@ -402,6 +403,7 @@ mod bindings { "nsBorderColors", "nscolor", "nsChangeHint", + "nsCSSCounterStyleRule", "nsCSSFontFaceRule", "nsCSSKeyword", "nsCSSPropertyID", @@ -691,6 +693,7 @@ mod bindings { "StyleBasicShapeType", "StyleShapeSource", "StyleTransition", + "nsCSSCounterStyleRule", "nsCSSFontFaceRule", "nsCSSKeyword", "nsCSSPropertyID", diff --git a/components/style/counter_style/mod.rs b/components/style/counter_style/mod.rs index ca27a650334..b1c461b4301 100644 --- a/components/style/counter_style/mod.rs +++ b/components/style/counter_style/mod.rs @@ -49,9 +49,9 @@ pub fn parse_counter_style_name(input: &mut Parser) -> Result<CustomIdent, ()> { /// Parse the body (inside `{}`) of an @counter-style rule pub fn parse_counter_style_body(name: CustomIdent, context: &ParserContext, input: &mut Parser) - -> Result<CounterStyleRule, ()> { + -> Result<CounterStyleRuleData, ()> { let start = input.position(); - let mut rule = CounterStyleRule::empty(name); + let mut rule = CounterStyleRuleData::empty(name); { let parser = CounterStyleRuleParser { context: context, @@ -108,7 +108,7 @@ pub fn parse_counter_style_body(name: CustomIdent, context: &ParserContext, inpu struct CounterStyleRuleParser<'a, 'b: 'a> { context: &'a ParserContext<'b>, - rule: &'a mut CounterStyleRule, + rule: &'a mut CounterStyleRuleData, } /// Default methods reject all at rules. @@ -143,7 +143,7 @@ macro_rules! counter_style_descriptors { ) => { /// An @counter-style rule #[derive(Debug)] - pub struct CounterStyleRule { + pub struct CounterStyleRuleData { name: CustomIdent, $( #[$doc] @@ -151,9 +151,9 @@ macro_rules! counter_style_descriptors { )+ } - impl CounterStyleRule { + impl CounterStyleRuleData { fn empty(name: CustomIdent) -> Self { - CounterStyleRule { + CounterStyleRuleData { name: name, $( $ident: None, @@ -161,15 +161,20 @@ macro_rules! counter_style_descriptors { } } + /// Get the name of the counter style rule. + pub fn name(&self) -> &CustomIdent { + &self.name + } + $( accessor!(#[$doc] $name $ident: $ty = $initial); )+ /// Convert to Gecko types #[cfg(feature = "gecko")] - pub fn set_descriptors(&self, descriptors: &mut CounterStyleDescriptors) { + pub fn set_descriptors(self, descriptors: &mut CounterStyleDescriptors) { $( - if let Some(ref value) = self.$ident { + if let Some(value) = self.$ident { descriptors[nsCSSCounterDesc::$gecko_ident as usize].set_from(value) } )* @@ -197,7 +202,7 @@ macro_rules! counter_style_descriptors { } } - impl ToCssWithGuard for CounterStyleRule { + impl ToCssWithGuard for CounterStyleRuleData { fn to_css<W>(&self, _guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result where W: fmt::Write { dest.write_str("@counter-style ")?; @@ -531,7 +536,7 @@ impl Parse for AdditiveSymbols { fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> { let tuples = Vec::<AdditiveTuple>::parse(context, input)?; // FIXME maybe? https://github.com/w3c/csswg-drafts/issues/1220 - if tuples.windows(2).any(|window| window[0].value <= window[1].value) { + if tuples.windows(2).any(|window| window[0].weight <= window[1].weight) { return Err(()) } Ok(AdditiveSymbols(tuples)) @@ -547,8 +552,10 @@ impl ToCss for AdditiveSymbols { /// <integer> && <symbol> #[derive(Debug, Clone)] pub struct AdditiveTuple { - value: u32, - symbol: Symbol, + /// <integer> + pub weight: u32, + /// <symbol> + pub symbol: Symbol, } impl OneOrMoreCommaSeparated for AdditiveTuple {} @@ -556,13 +563,13 @@ impl OneOrMoreCommaSeparated for AdditiveTuple {} impl Parse for AdditiveTuple { fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> { let symbol = input.try(|input| Symbol::parse(context, input)); - let value = input.expect_integer()?; - if value < 0 { + let weight = input.expect_integer()?; + if weight < 0 { return Err(()) } let symbol = symbol.or_else(|()| Symbol::parse(context, input))?; Ok(AdditiveTuple { - value: value as u32, + weight: weight as u32, symbol: symbol, }) } @@ -570,7 +577,7 @@ impl Parse for AdditiveTuple { impl ToCss for AdditiveTuple { fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - write!(dest, "{} ", self.value)?; + write!(dest, "{} ", self.weight)?; self.symbol.to_css(dest) } } diff --git a/components/style/font_face.rs b/components/style/font_face.rs index 0bd6640488e..3d81476fd12 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -208,9 +208,9 @@ macro_rules! font_face_descriptors_common { /// Convert to Gecko types #[cfg(feature = "gecko")] - pub fn set_descriptors(&self, descriptors: &mut CSSFontFaceDescriptors) { + pub fn set_descriptors(self, descriptors: &mut CSSFontFaceDescriptors) { $( - if let Some(ref value) = self.$ident { + if let Some(value) = self.$ident { descriptors.$gecko_ident.set_from(value) } )* diff --git a/components/style/gecko/data.rs b/components/style/gecko/data.rs index bf71114da37..4108e073945 100644 --- a/components/style/gecko/data.rs +++ b/components/style/gecko/data.rs @@ -4,9 +4,11 @@ //! Data needed to style a Gecko document. +use Atom; use animation::Animation; use atomic_refcell::{AtomicRef, AtomicRefCell, AtomicRefMut}; use dom::OpaqueNode; +use gecko::rules::{CounterStyleRule, FontFaceRule}; use gecko_bindings::bindings::RawServoStyleSet; use gecko_bindings::structs::RawGeckoPresContextOwned; use gecko_bindings::structs::nsIDocument; @@ -19,7 +21,7 @@ use std::collections::HashMap; use std::sync::mpsc::{Receiver, Sender, channel}; use stylearc::Arc; use stylesheet_set::StylesheetSet; -use stylesheets::{FontFaceRule, Origin}; +use stylesheets::Origin; use stylist::{ExtraStyleData, Stylist}; /// The container for data that a Servo-backed Gecko document needs to style @@ -47,6 +49,8 @@ pub struct PerDocumentStyleDataImpl { /// List of effective font face rules. pub font_faces: Vec<(Arc<Locked<FontFaceRule>>, Origin)>, + /// Map for effective counter style rules. + pub counter_styles: HashMap<Atom, Arc<Locked<CounterStyleRule>>>, } /// The data itself is an `AtomicRefCell`, which guarantees the proper semantics @@ -71,6 +75,7 @@ impl PerDocumentStyleData { running_animations: Arc::new(RwLock::new(HashMap::new())), expired_animations: Arc::new(RwLock::new(HashMap::new())), font_faces: vec![], + counter_styles: HashMap::new(), })) } @@ -103,6 +108,7 @@ impl PerDocumentStyleDataImpl { let mut extra_data = ExtraStyleData { font_faces: &mut self.font_faces, + counter_styles: &mut self.counter_styles, }; let author_style_disabled = self.stylesheets.author_style_disabled(); diff --git a/components/style/gecko/generated/atom_macro.rs b/components/style/gecko/generated/atom_macro.rs index 24771760f2b..bba0c7bc817 100644 --- a/components/style/gecko/generated/atom_macro.rs +++ b/components/style/gecko/generated/atom_macro.rs @@ -2382,6 +2382,8 @@ cfg_if! { pub static nsGkAtoms_splitter: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms6springE"] pub static nsGkAtoms_spring: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms6squareE"] + pub static nsGkAtoms_square: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms3srcE"] pub static nsGkAtoms_src: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms6srcdocE"] @@ -7395,6 +7397,8 @@ cfg_if! { pub static nsGkAtoms_splitter: *mut nsIAtom; #[link_name = "?spring@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_spring: *mut nsIAtom; + #[link_name = "?square@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_square: *mut nsIAtom; #[link_name = "?src@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_src: *mut nsIAtom; #[link_name = "?srcdoc@nsGkAtoms@@2PEAVnsIAtom@@EA"] @@ -12408,6 +12412,8 @@ cfg_if! { pub static nsGkAtoms_splitter: *mut nsIAtom; #[link_name = "\x01?spring@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_spring: *mut nsIAtom; + #[link_name = "\x01?square@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_square: *mut nsIAtom; #[link_name = "\x01?src@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_src: *mut nsIAtom; #[link_name = "\x01?srcdoc@nsGkAtoms@@2PAVnsIAtom@@A"] @@ -17424,6 +17430,8 @@ macro_rules! atom { { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_splitter as *mut _) } }; ("spring") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_spring as *mut _) } }; +("square") => + { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_square as *mut _) } }; ("src") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_src as *mut _) } }; ("srcdoc") => diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 79987dba6f9..439a3cd9ed0 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -43,6 +43,7 @@ use gecko_bindings::structs::StyleBasicShape; use gecko_bindings::structs::StyleBasicShapeType; use gecko_bindings::structs::StyleShapeSource; use gecko_bindings::structs::StyleTransition; +use gecko_bindings::structs::nsCSSCounterStyleRule; use gecko_bindings::structs::nsCSSFontFaceRule; use gecko_bindings::structs::nsCSSKeyword; use gecko_bindings::structs::nsCSSPropertyID; @@ -813,7 +814,8 @@ extern "C" { aSrc: *const nsStyleVisibility); } extern "C" { - pub fn Gecko_SetListStyleType(style_struct: *mut nsStyleList, type_: u32); + pub fn Gecko_SetListStyleType(style_struct: *mut nsStyleList, + name: *mut nsIAtom); } extern "C" { pub fn Gecko_CopyListStyleTypeFrom(dst: *mut nsStyleList, @@ -833,11 +835,15 @@ extern "C" { pub fn Gecko_ReleaseImageValueArbitraryThread(aPtr: *mut ImageValue); } extern "C" { - pub fn Gecko_ImageValue_Create(uri: ServoBundledURI) -> *mut ImageValue; + pub fn Gecko_ImageValue_Create(aURI: ServoBundledURI) -> *mut ImageValue; } extern "C" { pub fn Gecko_SetLayerImageImageValue(image: *mut nsStyleImage, - imageValue: *mut ImageValue); + aImageValue: *mut ImageValue); +} +extern "C" { + pub fn Gecko_SetUrlImageValue(image: *mut nsStyleImage, + uri: ServoBundledURI); } extern "C" { pub fn Gecko_SetImageElement(image: *mut nsStyleImage, @@ -860,7 +866,11 @@ extern "C" { } extern "C" { pub fn Gecko_SetListStyleImageImageValue(style_struct: *mut nsStyleList, - imageValue: *mut ImageValue); + aImageValue: *mut ImageValue); +} +extern "C" { + pub fn Gecko_SetListStyleImage(style_struct: *mut nsStyleList, + uri: ServoBundledURI); } extern "C" { pub fn Gecko_CopyListStyleImageFrom(dest: *mut nsStyleList, @@ -871,16 +881,24 @@ extern "C" { len: usize); } extern "C" { - pub fn Gecko_SetCursorImageValue(cursor: *mut nsCursorImage, - imageValue: *mut ImageValue); + pub fn Gecko_SetCursorImageValue(aCursor: *mut nsCursorImage, + aImageValue: *mut ImageValue); +} +extern "C" { + pub fn Gecko_SetCursorImage(cursor: *mut nsCursorImage, + uri: ServoBundledURI); } extern "C" { pub fn Gecko_CopyCursorArrayFrom(dest: *mut nsStyleUserInterface, src: *const nsStyleUserInterface); } extern "C" { - pub fn Gecko_SetContentDataImageValue(content_data: *mut nsStyleContentData, - imageValue: *mut ImageValue); + pub fn Gecko_SetContentDataImageValue(aList: *mut nsStyleContentData, + aImageValue: *mut ImageValue); +} +extern "C" { + pub fn Gecko_SetContentDataImage(content_data: *mut nsStyleContentData, + uri: ServoBundledURI); } extern "C" { pub fn Gecko_SetContentDataArray(content_data: *mut nsStyleContentData, @@ -1158,9 +1176,6 @@ extern "C" { len: nscoord); } extern "C" { - pub fn Gecko_CSSValue_SetNormal(css_value: nsCSSValueBorrowedMut); -} -extern "C" { pub fn Gecko_CSSValue_SetNumber(css_value: nsCSSValueBorrowedMut, number: f32); } @@ -1207,6 +1222,18 @@ extern "C" { integer: i32, unit: nsCSSUnit); } extern "C" { + pub fn Gecko_CSSValue_SetPair(css_value: nsCSSValueBorrowedMut, + xvalue: nsCSSValueBorrowed, + yvalue: nsCSSValueBorrowed); +} +extern "C" { + pub fn Gecko_CSSValue_SetList(css_value: nsCSSValueBorrowedMut, len: u32); +} +extern "C" { + pub fn Gecko_CSSValue_SetPairList(css_value: nsCSSValueBorrowedMut, + len: u32); +} +extern "C" { pub fn Gecko_CSSValue_Drop(css_value: nsCSSValueBorrowedMut); } extern "C" { @@ -1273,6 +1300,22 @@ extern "C" { pub fn Gecko_CSSFontFaceRule_Release(aPtr: *mut nsCSSFontFaceRule); } extern "C" { + pub fn Gecko_CSSCounterStyle_Create(name: *mut nsIAtom) + -> *mut nsCSSCounterStyleRule; +} +extern "C" { + pub fn Gecko_CSSCounterStyle_GetCssText(rule: + *const nsCSSCounterStyleRule, + result: *mut nsAString); +} +extern "C" { + pub fn Gecko_CSSCounterStyleRule_AddRef(aPtr: *mut nsCSSCounterStyleRule); +} +extern "C" { + pub fn Gecko_CSSCounterStyleRule_Release(aPtr: + *mut nsCSSCounterStyleRule); +} +extern "C" { pub fn Gecko_GetBody(pres_context: RawGeckoPresContextBorrowed) -> RawGeckoElementBorrowedOrNull; } @@ -1707,6 +1750,11 @@ extern "C" { RawGeckoFontFaceRuleListBorrowedMut); } extern "C" { + pub fn Servo_StyleSet_GetCounterStyleRule(set: RawServoStyleSetBorrowed, + name: *mut nsIAtom) + -> *mut nsCSSCounterStyleRule; +} +extern "C" { pub fn Servo_StyleSet_ResolveForDeclarations(set: RawServoStyleSetBorrowed, parent_style: @@ -1833,6 +1881,11 @@ extern "C" { -> *mut nsCSSFontFaceRule; } extern "C" { + pub fn Servo_CssRules_GetCounterStyleRuleAt(rules: ServoCssRulesBorrowed, + index: u32) + -> *mut nsCSSCounterStyleRule; +} +extern "C" { pub fn Servo_StyleRule_GetStyle(rule: RawServoStyleRuleBorrowed) -> RawServoDeclarationBlockStrong; } diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index 851f05c1172..901630d6290 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -974,7 +974,6 @@ pub mod root { pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; - pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; pub const NS_THEME_NONE: ::std::os::raw::c_uint = 0; pub const NS_THEME_BUTTON: ::std::os::raw::c_uint = 1; pub const NS_THEME_RADIO: ::std::os::raw::c_uint = 2; @@ -1181,8 +1180,6 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; - pub type pair__PCCP = u8; - pub type pair__PCCFP = u8; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1212,17 +1209,10 @@ pub mod root { pub type iterator_pointer<_Pointer> = _Pointer; pub type iterator_reference<_Reference> = _Reference; #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct __iterator_traits { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct iterator_traits { pub _address: u8, } #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct reverse_iterator<_Iterator> { pub current: _Iterator, pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>, @@ -1240,7 +1230,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_61524() { + fn __bindgen_test_layout_atomic_instantiation_89754() { assert_eq!(::std::mem::size_of::<u32>() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1249,7 +1239,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_61532() { + fn __bindgen_test_layout_atomic_instantiation_89762() { assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -1310,9 +1300,8 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type>; - pub type nsStringRepr_iterator = - root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type>; + root::nsReadingIterator<u16>; + pub type nsStringRepr_iterator = root::nsWritingIterator<u16>; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1402,9 +1391,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type>; + root::nsReadingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_iterator = - root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type>; + root::nsWritingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -1479,6 +1468,11 @@ pub mod root { impl Clone for nsCStringRepr { fn clone(&self) -> Self { *self } } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct AllocPolicyBasedFreePolicy { + pub _address: u8, + } /** * LinkedList supports refcounted elements using this adapter class. Clients * using LinkedList<RefPtr<T>> will get a data structure that holds a strong @@ -6901,7 +6895,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_118207() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_141650() { assert_eq!(::std::mem::size_of::<root::mozilla::StaticRefPtr<root::mozilla::URLExtraData>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -8047,7 +8041,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct ImageCacheKey { - pub mURI: root::RefPtr<root::imgRequestProxy_ImageURL>, + pub mURI: root::RefPtr<root::mozilla::image::ImageURL>, pub mBlobSerial: [u64; 2usize], pub mOriginAttributes: root::mozilla::OriginAttributes, pub mControlledDocument: *mut ::std::os::raw::c_void, @@ -9141,10 +9135,8 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } - pub type ComputedKeyframeValues = - root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>; #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_155943() { + fn __bindgen_test_layout_DefaultDelete_instantiation_178959() { assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11459,6 +11451,22 @@ pub mod root { "Alignment of " , stringify ! ( nsCString ) )); } #[repr(C)] + #[derive(Debug)] + pub struct nsDependentCSubstring { + pub _base: root::nsACString, + } + pub type nsDependentCSubstring_self_type = root::nsDependentCSubstring; + #[test] + fn bindgen_test_layout_nsDependentCSubstring() { + assert_eq!(::std::mem::size_of::<nsDependentCSubstring>() , 16usize , + concat ! ( + "Size of: " , stringify ! ( nsDependentCSubstring ) )); + assert_eq! (::std::mem::align_of::<nsDependentCSubstring>() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( nsDependentCSubstring ) + )); + } + #[repr(C)] pub struct nsCStringComparator__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug, Copy)] @@ -11583,7 +11591,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_51368() { + fn __bindgen_test_layout_nsCharTraits_instantiation_55138() { assert_eq!(::std::mem::size_of::<root::nsCharTraits>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11594,7 +11602,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_51372() { + fn __bindgen_test_layout_nsCharTraits_instantiation_55142() { assert_eq!(::std::mem::size_of::<root::nsCharTraits>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -12514,6 +12522,26 @@ pub mod root { pub type MutableHandleValue = root::JS::MutableHandle<root::JS::Value>; pub type RootedObject = [u64; 3usize]; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct DeletePolicy { + pub _address: u8, + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct FreePolicy { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_FreePolicy() { + assert_eq!(::std::mem::size_of::<FreePolicy>() , 1usize , concat ! + ( "Size of: " , stringify ! ( FreePolicy ) )); + assert_eq! (::std::mem::align_of::<FreePolicy>() , 1usize , concat + ! ( "Alignment of " , stringify ! ( FreePolicy ) )); + } + impl Clone for FreePolicy { + fn clone(&self) -> Self { *self } + } /** * A GC pointer, tagged with the trace kind. * @@ -12821,11 +12849,6 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } - pub type WarningReporter = - ::std::option::Option<unsafe extern "C" fn(cx: - *mut root::JSContext, - report: - *mut root::JSErrorReport)>; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -12987,96 +13010,6 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } - /** - * Describes a single error or warning that occurs in the execution of script. - */ - #[repr(C)] - pub struct JSErrorReport { - pub _base: root::JSErrorBase, - pub linebuf_: *const u16, - pub linebufLength_: usize, - pub tokenOffset_: usize, - pub notes: root::mozilla::UniquePtr<root::JSErrorNotes>, - pub flags: ::std::os::raw::c_uint, - pub exnType: i16, - pub _bitfield_1: u8, - pub __bindgen_padding_0: u8, - } - #[test] - fn bindgen_test_layout_JSErrorReport() { - assert_eq!(::std::mem::size_of::<JSErrorReport>() , 72usize , concat ! - ( "Size of: " , stringify ! ( JSErrorReport ) )); - assert_eq! (::std::mem::align_of::<JSErrorReport>() , 8usize , concat - ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * - const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebuf_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as - * const _ as usize } , 40usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebufLength_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * - const _ as usize } , 48usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( tokenOffset_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . notes as * const - _ as usize } , 56usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( notes ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . flags as * const - _ as usize } , 64usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( flags ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . exnType as * - const _ as usize } , 68usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( exnType ) )); - } - impl JSErrorReport { - #[inline] - pub fn isMuted(&self) -> bool { - let mask = 1usize as u8; - let field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (field_val & mask) >> 0usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_isMuted(&mut self, val: bool) { - let mask = 1usize as u8; - let val = val as u8 as u8; - let mut field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - field_val &= !mask; - field_val |= (val << 0usize) & mask; - self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; - } - #[inline] - pub fn ownsLinebuf_(&self) -> bool { - let mask = 2usize as u8; - let field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (field_val & mask) >> 1usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_ownsLinebuf_(&mut self, val: bool) { - let mask = 2usize as u8; - let val = val as u8 as u8; - let mut field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - field_val &= !mask; - field_val |= (val << 1usize) & mask; - self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; - } - } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -13142,7 +13075,7 @@ pub mod root { } pub type nsCOMPtr_element_type<T> = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_64813() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_92969() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsISupports>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -13890,7 +13823,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<u32>, + pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -13995,7 +13928,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<u32>, + pub mValues: root::nsTArray<::std::os::raw::c_uint>, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -14105,7 +14038,7 @@ pub mod root { pub alternateValues: root::nsTArray<root::gfxAlternateValue>, pub featureValueLookup: root::RefPtr<root::gfxFontFeatureValueSet>, pub fontFeatureSettings: root::nsTArray<root::gfxFontFeature>, - pub fontVariationSettings: root::nsTArray<root::gfxFontVariation>, + pub fontVariationSettings: root::nsTArray<root::mozilla::gfx::FontVariation>, pub languageOverride: u32, } #[test] @@ -16505,7 +16438,7 @@ pub mod root { */ pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray<root::nsWeakPtr>, + pub mBlockedTrackingNodes: root::nsTArray<root::nsCOMPtr<root::nsIWeakReference>>, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr<root::nsIDocumentEncoder>, pub mFrameRequestCallbacks: root::nsTArray<root::nsIDocument_FrameRequest>, @@ -17622,6 +17555,32 @@ pub mod root { } #[repr(C)] #[derive(Debug)] + pub struct nsCSSCounterStyleRule { + pub _base: root::mozilla::css::Rule, + pub _base_1: root::nsIDOMCSSCounterStyleRule, + pub mName: root::nsCOMPtr<root::nsIAtom>, + pub mValues: [root::nsCSSValue; 10usize], + pub mGeneration: u32, + } + pub type nsCSSCounterStyleRule_Getter = + ::std::option::Option<unsafe extern "C" fn() -> root::nsresult>; + extern "C" { + #[link_name = "_ZN21nsCSSCounterStyleRule8kGettersE"] + pub static mut nsCSSCounterStyleRule_kGetters: + [root::nsCSSCounterStyleRule_Getter; 0usize]; + } + #[test] + fn bindgen_test_layout_nsCSSCounterStyleRule() { + assert_eq!(::std::mem::size_of::<nsCSSCounterStyleRule>() , 256usize , + concat ! ( + "Size of: " , stringify ! ( nsCSSCounterStyleRule ) )); + assert_eq! (::std::mem::align_of::<nsCSSCounterStyleRule>() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( nsCSSCounterStyleRule ) + )); + } + #[repr(C)] + #[derive(Debug)] pub struct nsFontFaceRuleContainer { pub mRule: root::RefPtr<root::nsCSSFontFaceRule>, pub mSheetType: root::mozilla::SheetType, @@ -19792,7 +19751,7 @@ pub mod root { pub _base_1: root::nsWrapperCache, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, - pub mContent: root::nsCOMPtr<root::nsDOMAttributeMap_Element>, + pub mContent: root::nsCOMPtr<root::mozilla::dom::Element>, /** * Cache of Attrs. */ @@ -20825,57 +20784,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_77 = - _bindgen_ty_77::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_84 = + _bindgen_ty_84::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_77 { + pub enum _bindgen_ty_84 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -26028,7 +25987,7 @@ pub mod root { pub mRefCnt: root::nsAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBehaviour: root::mozilla::UniquePtr<root::ProxyBehaviour>, - pub mURI: root::RefPtr<root::imgRequestProxy_ImageURL>, + pub mURI: root::RefPtr<root::mozilla::image::ImageURL>, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr<root::nsILoadGroup>, pub mLoadFlags: root::nsLoadFlags, @@ -27260,7 +27219,7 @@ pub mod root { pub _mOwningThread: root::nsAutoOwningThread, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr<root::nsIRequest>, - pub mURI: root::RefPtr<root::imgRequestProxy_ImageURL>, + pub mURI: root::RefPtr<root::mozilla::image::ImageURL>, pub mCurrentURI: root::nsCOMPtr<root::nsIURI>, pub mLoadingPrincipal: root::nsCOMPtr<root::nsIPrincipal>, pub mPrincipal: root::nsCOMPtr<root::nsIPrincipal>, @@ -27287,8 +27246,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr<root::imgRequest_ProgressTracker>, - pub mImage: root::RefPtr<root::imgRequest_Image>, + pub mProgressTracker: root::RefPtr<root::mozilla::image::ProgressTracker>, + pub mImage: root::RefPtr<root::mozilla::image::Image>, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -28718,7 +28677,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_151935() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_174951() { assert_eq!(::std::mem::size_of::<root::mozilla::StaticRefPtr<root::nsStyleQuoteValues>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28733,6 +28692,7 @@ pub mod root { pub struct nsStyleList { pub mListStylePosition: u8, pub mListStyleImage: root::RefPtr<root::nsStyleImageRequest>, + pub mListStyleType: root::nsCOMPtr<root::nsIAtom>, pub mCounterStyle: root::mozilla::CounterStylePtr, pub mQuotes: root::RefPtr<root::nsStyleQuoteValues>, pub mImageRegion: root::nsRect, @@ -28749,7 +28709,7 @@ pub mod root { } #[test] fn bindgen_test_layout_nsStyleList() { - assert_eq!(::std::mem::size_of::<nsStyleList>() , 48usize , concat ! ( + assert_eq!(::std::mem::size_of::<nsStyleList>() , 56usize , concat ! ( "Size of: " , stringify ! ( nsStyleList ) )); assert_eq! (::std::mem::align_of::<nsStyleList>() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsStyleList ) )); @@ -28764,18 +28724,23 @@ pub mod root { "Alignment of field: " , stringify ! ( nsStyleList ) , "::" , stringify ! ( mListStyleImage ) )); assert_eq! (unsafe { - & ( * ( 0 as * const nsStyleList ) ) . mCounterStyle as * + & ( * ( 0 as * const nsStyleList ) ) . mListStyleType as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( nsStyleList ) , + "::" , stringify ! ( mListStyleType ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsStyleList ) ) . mCounterStyle as * + const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( nsStyleList ) , "::" , stringify ! ( mCounterStyle ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStyleList ) ) . mQuotes as * const - _ as usize } , 24usize , concat ! ( + _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( nsStyleList ) , "::" , stringify ! ( mQuotes ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStyleList ) ) . mImageRegion as * - const _ as usize } , 32usize , concat ! ( + const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( nsStyleList ) , "::" , stringify ! ( mImageRegion ) )); } @@ -30817,7 +30782,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray<root::mozilla::Keyframe>; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray<root::mozilla::ComputedKeyframeValues>; + root::nsTArray<root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>>; pub type RawGeckoAnimationValueList = root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>; pub type RawGeckoStyleAnimationList = @@ -31180,48 +31145,48 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_79 + root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_86 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_HAS_SCROLLGRAB; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_79 = - _bindgen_ty_79::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_86 = + _bindgen_ty_86::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_79 { + pub enum _bindgen_ty_86 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -31633,6 +31598,29 @@ pub mod root { pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder: u32 = 8; pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch: u32 = 12; #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIDOMCSSCounterStyleRule { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIDOMCSSCounterStyleRule_COMTypeInfo { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_nsIDOMCSSCounterStyleRule() { + assert_eq!(::std::mem::size_of::<nsIDOMCSSCounterStyleRule>() , 8usize + , concat ! ( + "Size of: " , stringify ! ( nsIDOMCSSCounterStyleRule ) )); + assert_eq! (::std::mem::align_of::<nsIDOMCSSCounterStyleRule>() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( nsIDOMCSSCounterStyleRule + ) )); + } + impl Clone for nsIDOMCSSCounterStyleRule { + fn clone(&self) -> Self { *self } + } + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsROCSSPrimitiveValue { _unused: [u8; 0], @@ -31967,7 +31955,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_179789() { + fn __bindgen_test_layout_IntegralConstant_instantiation_202803() { assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31976,7 +31964,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_179793() { + fn __bindgen_test_layout_IntegralConstant_instantiation_202807() { assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31985,59 +31973,69 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_180625() { - assert_eq!(::std::mem::size_of::<root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type>>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsReadingIterator_instantiation_203634() { + assert_eq!(::std::mem::size_of::<root::nsReadingIterator<u16>>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type> - ) )); - assert_eq!(::std::mem::align_of::<root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type>>() - , 8usize , concat ! ( + root::nsReadingIterator<u16> ) )); + assert_eq!(::std::mem::align_of::<root::nsReadingIterator<u16>>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type> - ) )); + root::nsReadingIterator<u16> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_180628() { - assert_eq!(::std::mem::size_of::<root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type>>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsWritingIterator_instantiation_203638() { + assert_eq!(::std::mem::size_of::<root::nsWritingIterator<u16>>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type> - ) )); - assert_eq!(::std::mem::align_of::<root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type>>() - , 8usize , concat ! ( + root::nsWritingIterator<u16> ) )); + assert_eq!(::std::mem::align_of::<root::nsWritingIterator<u16>>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type> - ) )); + root::nsWritingIterator<u16> ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_180700() { - assert_eq!(::std::mem::size_of::<root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type>>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_203711() { + assert_eq!(::std::mem::size_of::<root::nsReadingIterator<::std::os::raw::c_char>>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type> - ) )); - assert_eq!(::std::mem::align_of::<root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type>>() + root::nsReadingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::<root::nsReadingIterator<::std::os::raw::c_char>>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type> - ) )); + root::nsReadingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_180703() { - assert_eq!(::std::mem::size_of::<root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type>>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_203715() { + assert_eq!(::std::mem::size_of::<root::nsWritingIterator<::std::os::raw::c_char>>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type> - ) )); - assert_eq!(::std::mem::align_of::<root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type>>() + root::nsWritingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::<root::nsWritingIterator<::std::os::raw::c_char>>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type> + root::nsWritingIterator<::std::os::raw::c_char> ) )); + } + #[test] + fn __bindgen_test_layout__bindgen_ty_id_209541_instantiation_209538() { + assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( u8 ) + )); + assert_eq!(::std::mem::align_of::<u8>() , 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( u8 + ) )); + } + #[test] + fn __bindgen_test_layout__bindgen_ty_id_209574_instantiation_209571() { + assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( u8 ) + )); + assert_eq!(::std::mem::align_of::<u8>() , 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( u8 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_185110() { + fn __bindgen_test_layout_nsTArray_instantiation_209842() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsCString>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32048,7 +32046,7 @@ pub mod root { root::nsTArray<root::nsCString> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_185961() { + fn __bindgen_test_layout_Handle_instantiation_210801() { assert_eq!(::std::mem::size_of::<root::JS::Handle<*mut root::JSObject>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32059,7 +32057,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_185977() { + fn __bindgen_test_layout_Handle_instantiation_210817() { assert_eq!(::std::mem::size_of::<root::JS::Handle<root::JS::Value>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32070,7 +32068,7 @@ pub mod root { root::JS::Handle<root::JS::Value> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_185987() { + fn __bindgen_test_layout_MutableHandle_instantiation_210827() { assert_eq!(::std::mem::size_of::<root::JS::MutableHandle<*mut root::JSObject>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32081,7 +32079,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_186003() { + fn __bindgen_test_layout_MutableHandle_instantiation_210843() { assert_eq!(::std::mem::size_of::<root::JS::MutableHandle<root::JS::Value>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32092,7 +32090,7 @@ pub mod root { root::JS::MutableHandle<root::JS::Value> ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_186006() { + fn __bindgen_test_layout_Rooted_instantiation_210846() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32103,7 +32101,18 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_188553() { + fn __bindgen_test_layout_DeletePolicy_instantiation_211183() { + assert_eq!(::std::mem::size_of::<root::JS::DeletePolicy>() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::<root::JS::DeletePolicy>() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_213233() { assert_eq!(::std::mem::size_of::<root::nsTArray<::nsstring::nsStringRepr>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32114,7 +32123,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_188557() { + fn __bindgen_test_layout_nsTArray_instantiation_213237() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::FontFamilyName>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32125,18 +32134,18 @@ pub mod root { root::nsTArray<root::mozilla::FontFamilyName> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_188570() { - assert_eq!(::std::mem::size_of::<root::nsTArray<u32>>() , 8usize , - concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_213250() { + assert_eq!(::std::mem::size_of::<root::nsTArray<::std::os::raw::c_uint>>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<u32> ) )); - assert_eq!(::std::mem::align_of::<root::nsTArray<u32>>() , 8usize , - concat ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::<root::nsTArray<::std::os::raw::c_uint>>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<u32> ) )); + root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_189732() { + fn __bindgen_test_layout_TenuredHeap_instantiation_214375() { assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32147,7 +32156,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_189822() { + fn __bindgen_test_layout_Heap_instantiation_214465() { assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32158,7 +32167,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_189937() { + fn __bindgen_test_layout_Heap_instantiation_214580() { assert_eq!(::std::mem::size_of::<root::JS::Heap<root::JS::Value>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32169,7 +32178,7 @@ pub mod root { root::JS::Heap<root::JS::Value> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_189944() { + fn __bindgen_test_layout_TErrorResult_instantiation_214587() { assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32180,7 +32189,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_189960() { + fn __bindgen_test_layout_TErrorResult_instantiation_214603() { assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32191,7 +32200,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_189965() { + fn __bindgen_test_layout_already_AddRefed_instantiation_214608() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsStringBuffer>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32202,7 +32211,7 @@ pub mod root { root::already_AddRefed<root::nsStringBuffer> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_190017() { + fn __bindgen_test_layout_already_AddRefed_instantiation_214660() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIAtom>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32213,7 +32222,7 @@ pub mod root { root::already_AddRefed<root::nsIAtom> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_190500() { + fn __bindgen_test_layout_RefPtr_instantiation_215143() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::StyleSheet>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32224,7 +32233,7 @@ pub mod root { root::RefPtr<root::mozilla::StyleSheet> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_190846() { + fn __bindgen_test_layout_already_AddRefed_instantiation_215489() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::mozilla::dom::NodeInfo>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32235,7 +32244,7 @@ pub mod root { root::already_AddRefed<root::mozilla::dom::NodeInfo> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_191091() { + fn __bindgen_test_layout_already_AddRefed_instantiation_215734() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIURI>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32246,7 +32255,7 @@ pub mod root { root::already_AddRefed<root::nsIURI> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_191238() { + fn __bindgen_test_layout_already_AddRefed_instantiation_215881() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsINode>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32257,7 +32266,18 @@ pub mod root { root::already_AddRefed<root::nsINode> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_195342() { + fn __bindgen_test_layout_DeletePolicy_instantiation_220000() { + assert_eq!(::std::mem::size_of::<root::JS::DeletePolicy>() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::<root::JS::DeletePolicy>() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_219998() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::JSErrorNotes_Note>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32268,7 +32288,7 @@ pub mod root { root::mozilla::UniquePtr<root::JSErrorNotes_Note> ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_195374() { + fn __bindgen_test_layout_iterator_instantiation_220033() { assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32279,7 +32299,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_195943() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_220601() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIPrincipal>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32290,7 +32310,7 @@ pub mod root { root::nsCOMPtr<root::nsIPrincipal> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_197531() { + fn __bindgen_test_layout_nsTArray_instantiation_222194() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::AnonymousContent>>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32303,7 +32323,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_197804() { + fn __bindgen_test_layout_LinkedList_instantiation_222470() { assert_eq!(::std::mem::size_of::<root::mozilla::LinkedList>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32314,7 +32334,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_197820() { + fn __bindgen_test_layout_RefPtr_instantiation_222486() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Element>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32325,7 +32345,7 @@ pub mod root { root::RefPtr<root::mozilla::dom::Element> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_197819() { + fn __bindgen_test_layout_nsTArray_instantiation_222485() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::Element>>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32338,7 +32358,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_197849() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_222515() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIObserver>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32349,7 +32369,7 @@ pub mod root { root::nsCOMPtr<root::nsIObserver> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_197848() { + fn __bindgen_test_layout_nsTArray_instantiation_222514() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsCOMPtr<root::nsIObserver>>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32360,7 +32380,7 @@ pub mod root { root::nsTArray<root::nsCOMPtr<root::nsIObserver>> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_197894() { + fn __bindgen_test_layout_already_AddRefed_instantiation_222560() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIDocument>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32371,7 +32391,7 @@ pub mod root { root::already_AddRefed<root::nsIDocument> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_198059() { + fn __bindgen_test_layout_already_AddRefed_instantiation_222725() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsContentList>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32382,7 +32402,7 @@ pub mod root { root::already_AddRefed<root::nsContentList> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_198386() { + fn __bindgen_test_layout_already_AddRefed_instantiation_223052() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIRunnable>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32393,7 +32413,7 @@ pub mod root { root::already_AddRefed<root::nsIRunnable> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_198479() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_223145() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::mozilla::dom::Link>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32404,7 +32424,29 @@ pub mod root { root::nsCOMPtr<root::mozilla::dom::Link> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_198770() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_223182() { + assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIWeakReference>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr<root::nsIWeakReference> ) )); + assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIWeakReference>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr<root::nsIWeakReference> ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_223440() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_223438() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsISMILAttr>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32415,7 +32457,7 @@ pub mod root { root::mozilla::UniquePtr<root::nsISMILAttr> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_199317() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_223988() { assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::mozilla::dom::DOMIntersectionObserver>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32428,7 +32470,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_199316() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_223987() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32439,7 +32481,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199432() { + fn __bindgen_test_layout_nsTArray_instantiation_224194() { assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32450,7 +32492,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_199483() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_224245() { assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32459,7 +32501,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199663() { + fn __bindgen_test_layout_nsTArray_instantiation_224425() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsRect>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32470,7 +32512,18 @@ pub mod root { root::nsTArray<root::nsRect> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199941() { + fn __bindgen_test_layout_DefaultDelete_instantiation_224541() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_224710() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsCOMPtr<root::nsIAtom>>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32481,7 +32534,7 @@ pub mod root { root::nsTArray<root::nsCOMPtr<root::nsIAtom>> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_200728() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_225497() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32492,7 +32545,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_200820() { + fn __bindgen_test_layout_already_AddRefed_instantiation_225589() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIContent>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32503,7 +32556,7 @@ pub mod root { root::already_AddRefed<root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_201001() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_225770() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32514,7 +32567,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_201524() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_226293() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<::std::os::raw::c_void>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32525,7 +32578,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_201532() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_226301() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::WeakFrame>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32536,7 +32589,7 @@ pub mod root { root::nsPtrHashKey<root::WeakFrame> ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_201647() { + fn __bindgen_test_layout_OwningNonNull_instantiation_226416() { assert_eq!(::std::mem::size_of::<root::mozilla::OwningNonNull<root::nsINode>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32547,18 +32600,7 @@ pub mod root { root::mozilla::OwningNonNull<root::nsINode> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_201774() { - assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIWeakReference>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr<root::nsIWeakReference> ) )); - assert_eq!(::std::mem::align_of::<root::nsCOMPtr<root::nsIWeakReference>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr<root::nsIWeakReference> ) )); - } - #[test] - fn __bindgen_test_layout_PointTyped_instantiation_202726() { + fn __bindgen_test_layout_PointTyped_instantiation_227495() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32569,7 +32611,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_202729() { + fn __bindgen_test_layout_IntPointTyped_instantiation_227500() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32580,7 +32622,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_202732() { + fn __bindgen_test_layout_SizeTyped_instantiation_227503() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32591,7 +32633,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_202738() { + fn __bindgen_test_layout_RectTyped_instantiation_227511() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32602,7 +32644,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_202762() { + fn __bindgen_test_layout_IntPointTyped_instantiation_227543() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32613,7 +32655,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_202768() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_227551() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32624,7 +32666,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_202774() { + fn __bindgen_test_layout_IntRectTyped_instantiation_227559() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32635,7 +32677,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_202903() { + fn __bindgen_test_layout_MarginTyped_instantiation_227726() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32646,7 +32688,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_202930() { + fn __bindgen_test_layout_RectTyped_instantiation_227761() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32657,7 +32699,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_202933() { + fn __bindgen_test_layout_IntRectTyped_instantiation_227766() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32668,7 +32710,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_202969() { + fn __bindgen_test_layout_ScaleFactor_instantiation_227812() { assert_eq!(::std::mem::size_of::<u32>() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32677,7 +32719,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_203069() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_227912() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32688,7 +32730,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_203077() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_227920() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32699,7 +32741,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_203121() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_227964() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32710,7 +32752,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_203751() { + fn __bindgen_test_layout_nsTArray_instantiation_228594() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::FramePropertyTable_PropertyValue>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32723,7 +32765,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_203767() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_228610() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::nsIFrame>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32734,7 +32776,7 @@ pub mod root { root::nsPtrHashKey<root::nsIFrame> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_207030() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_231884() { assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32745,7 +32787,7 @@ pub mod root { [u64; 29usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_207663() { + fn __bindgen_test_layout_already_AddRefed_instantiation_232520() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::mozilla::dom::CSSValue>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32756,7 +32798,18 @@ pub mod root { root::already_AddRefed<root::mozilla::dom::CSSValue> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_207755() { + fn __bindgen_test_layout_DefaultDelete_instantiation_232611() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_232615() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32767,7 +32820,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_208944() { + fn __bindgen_test_layout_already_AddRefed_instantiation_233804() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsISupports>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32778,7 +32831,7 @@ pub mod root { root::already_AddRefed<root::nsISupports> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_209290() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_234090() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr<root::nsIRunnable>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32789,7 +32842,7 @@ pub mod root { root::nsCOMPtr<root::nsIRunnable> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_210870() { + fn __bindgen_test_layout_nsTArray_instantiation_235680() { assert_eq!(::std::mem::size_of::<root::nsTArray<f64>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32800,7 +32853,7 @@ pub mod root { root::nsTArray<f64> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_210882() { + fn __bindgen_test_layout_RefPtr_instantiation_235692() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32813,7 +32866,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_210881() { + fn __bindgen_test_layout_nsTArray_instantiation_235691() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32826,7 +32879,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_210915() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_235725() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::mozilla::dom::Element>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32837,7 +32890,7 @@ pub mod root { root::nsPtrHashKey<root::mozilla::dom::Element> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_211012() { + fn __bindgen_test_layout_UniquePtr_instantiation_235822() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::ProfilerBacktrace>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32848,7 +32901,7 @@ pub mod root { root::mozilla::UniquePtr<root::ProfilerBacktrace> ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_212783() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_237602() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32859,7 +32912,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_212822() { + fn __bindgen_test_layout_OwningNonNull_instantiation_237641() { assert_eq!(::std::mem::size_of::<root::mozilla::OwningNonNull<root::mozilla::EffectCompositor_AnimationStyleRuleProcessor>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32872,7 +32925,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_212845() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_237664() { assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsIAtom>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32883,7 +32936,7 @@ pub mod root { root::nsRefPtrHashKey<root::nsIAtom> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_212881() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_237700() { assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsIContent>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32894,7 +32947,18 @@ pub mod root { root::nsRefPtrHashKey<root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_213437() { + fn __bindgen_test_layout_DefaultDelete_instantiation_238245() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_238259() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::mozilla::URLExtraData>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32905,7 +32969,7 @@ pub mod root { root::already_AddRefed<root::mozilla::URLExtraData> ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_213441() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_238263() { assert_eq!(::std::mem::size_of::<root::nsMainThreadPtrHolder<root::nsIURI>>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32916,7 +32980,7 @@ pub mod root { root::nsMainThreadPtrHolder<root::nsIURI> ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_213515() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_238337() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::nsIDocument>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32927,7 +32991,18 @@ pub mod root { root::nsPtrHashKey<root::nsIDocument> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_213800() { + fn __bindgen_test_layout_DefaultDelete_instantiation_238624() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_238622() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValueList>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32938,7 +33013,18 @@ pub mod root { root::mozilla::UniquePtr<root::nsCSSValueList> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_213803() { + fn __bindgen_test_layout_DefaultDelete_instantiation_238630() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_238628() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32949,7 +33035,7 @@ pub mod root { root::mozilla::UniquePtr<root::nsCSSValuePairList> ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_214145() { + fn __bindgen_test_layout_Maybe_instantiation_238973() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32960,7 +33046,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_214311() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_239140() { assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32969,7 +33055,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_214472() { + fn __bindgen_test_layout_Maybe_instantiation_239301() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32980,7 +33066,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_214487() { + fn __bindgen_test_layout_already_AddRefed_instantiation_239316() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsStyleImageRequest>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32991,7 +33077,18 @@ pub mod root { root::already_AddRefed<root::nsStyleImageRequest> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_214493() { + fn __bindgen_test_layout_DefaultDelete_instantiation_239324() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_239322() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsStyleSides>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33002,7 +33099,18 @@ pub mod root { root::mozilla::UniquePtr<root::nsStyleSides> ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_214679() { + fn __bindgen_test_layout_DefaultDelete_instantiation_239363() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_pair_instantiation_239514() { assert_eq!(::std::mem::size_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33013,7 +33121,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_214678() { + fn __bindgen_test_layout_nsTArray_instantiation_239513() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>>() , 8usize , concat ! ( @@ -33028,7 +33136,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_215667() { + fn __bindgen_test_layout_RefPtr_instantiation_240507() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::RawServoAnimationValue>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33039,7 +33147,7 @@ pub mod root { root::RefPtr<root::RawServoAnimationValue> ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_219655() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_244499() { assert_eq!(::std::mem::size_of::<root::mozilla::BaseTimeDuration>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33050,7 +33158,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_220247() { + fn __bindgen_test_layout_nsTArray_instantiation_245091() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33063,7 +33171,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_220427() { + fn __bindgen_test_layout_Maybe_instantiation_245273() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33074,7 +33182,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_220602() { + fn __bindgen_test_layout_RefPtr_instantiation_245448() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33085,7 +33193,7 @@ pub mod root { root::RefPtr<root::mozilla::dom::DOMRect> ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_220846() { + fn __bindgen_test_layout_Sequence_instantiation_245692() { assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -33094,7 +33202,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_221145() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_245991() { assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::mozilla::dom::Element>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33105,7 +33213,7 @@ pub mod root { root::nsRefPtrHashKey<root::mozilla::dom::Element> ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_221144() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_245990() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33116,7 +33224,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_222311() { + fn __bindgen_test_layout_nsTArray_instantiation_247222() { assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33127,7 +33235,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_222349() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_247260() { assert_eq!(::std::mem::size_of::<root::nsAutoPtr<root::nsMediaQuery>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko/generated/structs_release.rs b/components/style/gecko/generated/structs_release.rs index 0f4e5e0b764..bbda62784dc 100644 --- a/components/style/gecko/generated/structs_release.rs +++ b/components/style/gecko/generated/structs_release.rs @@ -974,7 +974,6 @@ pub mod root { pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; - pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; pub const NS_THEME_NONE: ::std::os::raw::c_uint = 0; pub const NS_THEME_BUTTON: ::std::os::raw::c_uint = 1; pub const NS_THEME_RADIO: ::std::os::raw::c_uint = 2; @@ -1181,8 +1180,6 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; - pub type pair__PCCP = u8; - pub type pair__PCCFP = u8; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1212,17 +1209,10 @@ pub mod root { pub type iterator_pointer<_Pointer> = _Pointer; pub type iterator_reference<_Reference> = _Reference; #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct __iterator_traits { - pub _address: u8, - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct iterator_traits { pub _address: u8, } #[repr(C)] - #[derive(Debug, Copy, Clone)] pub struct reverse_iterator<_Iterator> { pub current: _Iterator, pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>, @@ -1240,7 +1230,7 @@ pub mod root { pub struct atomic { } #[test] - fn __bindgen_test_layout_atomic_instantiation_60373() { + fn __bindgen_test_layout_atomic_instantiation_88637() { assert_eq!(::std::mem::size_of::<u32>() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -1249,7 +1239,7 @@ pub mod root { ( u32 ) )); } #[test] - fn __bindgen_test_layout_atomic_instantiation_60381() { + fn __bindgen_test_layout_atomic_instantiation_88645() { assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -1304,9 +1294,8 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type>; - pub type nsStringRepr_iterator = - root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type>; + root::nsReadingIterator<u16>; + pub type nsStringRepr_iterator = root::nsWritingIterator<u16>; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1396,9 +1385,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type>; + root::nsReadingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_iterator = - root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type>; + root::nsWritingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -6366,6 +6355,24 @@ pub mod root { } #[repr(C)] #[derive(Debug, Copy)] + pub struct MallocAllocPolicy { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_MallocAllocPolicy() { + assert_eq!(::std::mem::size_of::<MallocAllocPolicy>() , 1usize , + concat ! ( + "Size of: " , stringify ! ( MallocAllocPolicy ) )); + assert_eq! (::std::mem::align_of::<MallocAllocPolicy>() , 1usize , + concat ! ( + "Alignment of " , stringify ! ( MallocAllocPolicy ) + )); + } + impl Clone for MallocAllocPolicy { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] pub struct ErrorResult { pub _bindgen_opaque_blob: [u64; 2usize], } @@ -6759,7 +6766,7 @@ pub mod root { _unused: [u8; 0], } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_114870() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_138533() { assert_eq!(::std::mem::size_of::<root::mozilla::StaticRefPtr<root::mozilla::URLExtraData>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -7795,7 +7802,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct ImageCacheKey { - pub mURI: root::RefPtr<root::imgRequestProxy_ImageURL>, + pub mURI: root::RefPtr<root::mozilla::image::ImageURL>, pub mBlobSerial: [u64; 2usize], pub mOriginAttributes: root::mozilla::OriginAttributes, pub mControlledDocument: *mut ::std::os::raw::c_void, @@ -8889,10 +8896,8 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } - pub type ComputedKeyframeValues = - root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>; #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_152265() { + fn __bindgen_test_layout_DefaultDelete_instantiation_175461() { assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -10985,6 +10990,22 @@ pub mod root { "Alignment of " , stringify ! ( nsCString ) )); } #[repr(C)] + #[derive(Debug)] + pub struct nsDependentCSubstring { + pub _base: root::nsACString, + } + pub type nsDependentCSubstring_self_type = root::nsDependentCSubstring; + #[test] + fn bindgen_test_layout_nsDependentCSubstring() { + assert_eq!(::std::mem::size_of::<nsDependentCSubstring>() , 16usize , + concat ! ( + "Size of: " , stringify ! ( nsDependentCSubstring ) )); + assert_eq! (::std::mem::align_of::<nsDependentCSubstring>() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( nsDependentCSubstring ) + )); + } + #[repr(C)] pub struct nsCStringComparator__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] #[derive(Debug, Copy)] @@ -11109,7 +11130,7 @@ pub mod root { pub _address: u8, } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_50107() { + fn __bindgen_test_layout_nsCharTraits_instantiation_53929() { assert_eq!(::std::mem::size_of::<root::nsCharTraits>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -11120,7 +11141,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_50111() { + fn __bindgen_test_layout_nsCharTraits_instantiation_53933() { assert_eq!(::std::mem::size_of::<root::nsCharTraits>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -12028,6 +12049,26 @@ pub mod root { pub type MutableHandleValue = root::JS::MutableHandle<root::JS::Value>; pub type RootedObject = [u64; 3usize]; + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct DeletePolicy { + pub _address: u8, + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct FreePolicy { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_FreePolicy() { + assert_eq!(::std::mem::size_of::<FreePolicy>() , 1usize , concat ! + ( "Size of: " , stringify ! ( FreePolicy ) )); + assert_eq! (::std::mem::align_of::<FreePolicy>() , 1usize , concat + ! ( "Alignment of " , stringify ! ( FreePolicy ) )); + } + impl Clone for FreePolicy { + fn clone(&self) -> Self { *self } + } /** * A GC pointer, tagged with the trace kind. * @@ -12335,11 +12376,6 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } - pub type WarningReporter = - ::std::option::Option<unsafe extern "C" fn(cx: - *mut root::JSContext, - report: - *mut root::JSErrorReport)>; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -12493,96 +12529,6 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } - /** - * Describes a single error or warning that occurs in the execution of script. - */ - #[repr(C)] - pub struct JSErrorReport { - pub _base: root::JSErrorBase, - pub linebuf_: *const u16, - pub linebufLength_: usize, - pub tokenOffset_: usize, - pub notes: root::mozilla::UniquePtr<root::JSErrorNotes>, - pub flags: ::std::os::raw::c_uint, - pub exnType: i16, - pub _bitfield_1: u8, - pub __bindgen_padding_0: u8, - } - #[test] - fn bindgen_test_layout_JSErrorReport() { - assert_eq!(::std::mem::size_of::<JSErrorReport>() , 72usize , concat ! - ( "Size of: " , stringify ! ( JSErrorReport ) )); - assert_eq! (::std::mem::align_of::<JSErrorReport>() , 8usize , concat - ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * - const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebuf_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as - * const _ as usize } , 40usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebufLength_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * - const _ as usize } , 48usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( tokenOffset_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . notes as * const - _ as usize } , 56usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( notes ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . flags as * const - _ as usize } , 64usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( flags ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . exnType as * - const _ as usize } , 68usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( exnType ) )); - } - impl JSErrorReport { - #[inline] - pub fn isMuted(&self) -> bool { - let mask = 1usize as u8; - let field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (field_val & mask) >> 0usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_isMuted(&mut self, val: bool) { - let mask = 1usize as u8; - let val = val as u8 as u8; - let mut field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - field_val &= !mask; - field_val |= (val << 0usize) & mask; - self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; - } - #[inline] - pub fn ownsLinebuf_(&self) -> bool { - let mask = 2usize as u8; - let field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (field_val & mask) >> 1usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_ownsLinebuf_(&mut self, val: bool) { - let mask = 2usize as u8; - let val = val as u8 as u8; - let mut field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - field_val &= !mask; - field_val |= (val << 1usize) & mask; - self._bitfield_1 = unsafe { ::std::mem::transmute(field_val) }; - } - } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -12832,7 +12778,7 @@ pub mod root { } pub type nsCOMPtr_element_type<T> = T; #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_63537() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_91725() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -13548,7 +13494,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<u32>, + pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -13653,7 +13599,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<u32>, + pub mValues: root::nsTArray<::std::os::raw::c_uint>, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -13756,7 +13702,7 @@ pub mod root { pub alternateValues: root::nsTArray<root::gfxAlternateValue>, pub featureValueLookup: root::RefPtr<root::gfxFontFeatureValueSet>, pub fontFeatureSettings: root::nsTArray<root::gfxFontFeature>, - pub fontVariationSettings: root::nsTArray<root::gfxFontVariation>, + pub fontVariationSettings: root::nsTArray<root::mozilla::gfx::FontVariation>, pub languageOverride: u32, } #[test] @@ -16129,7 +16075,7 @@ pub mod root { */ pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray<root::nsWeakPtr>, + pub mBlockedTrackingNodes: root::nsTArray<root::nsCOMPtr>, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray<root::nsIDocument_FrameRequest>, @@ -17246,6 +17192,32 @@ pub mod root { } #[repr(C)] #[derive(Debug)] + pub struct nsCSSCounterStyleRule { + pub _base: root::mozilla::css::Rule, + pub _base_1: root::nsIDOMCSSCounterStyleRule, + pub mName: root::nsCOMPtr, + pub mValues: [root::nsCSSValue; 10usize], + pub mGeneration: u32, + } + pub type nsCSSCounterStyleRule_Getter = + ::std::option::Option<unsafe extern "C" fn() -> root::nsresult>; + extern "C" { + #[link_name = "_ZN21nsCSSCounterStyleRule8kGettersE"] + pub static mut nsCSSCounterStyleRule_kGetters: + [root::nsCSSCounterStyleRule_Getter; 0usize]; + } + #[test] + fn bindgen_test_layout_nsCSSCounterStyleRule() { + assert_eq!(::std::mem::size_of::<nsCSSCounterStyleRule>() , 248usize , + concat ! ( + "Size of: " , stringify ! ( nsCSSCounterStyleRule ) )); + assert_eq! (::std::mem::align_of::<nsCSSCounterStyleRule>() , 8usize , + concat ! ( + "Alignment of " , stringify ! ( nsCSSCounterStyleRule ) + )); + } + #[repr(C)] + #[derive(Debug)] pub struct nsFontFaceRuleContainer { pub mRule: root::RefPtr<root::nsCSSFontFaceRule>, pub mSheetType: root::mozilla::SheetType, @@ -20396,57 +20368,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_72 = - _bindgen_ty_72::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_82 = + _bindgen_ty_82::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_72 { + pub enum _bindgen_ty_82 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -25597,7 +25569,7 @@ pub mod root { pub _base_4: root::nsITimedChannel, pub mRefCnt: root::nsAutoRefCnt, pub mBehaviour: root::mozilla::UniquePtr<root::ProxyBehaviour>, - pub mURI: root::RefPtr<root::imgRequestProxy_ImageURL>, + pub mURI: root::RefPtr<root::mozilla::image::ImageURL>, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mLoadFlags: root::nsLoadFlags, @@ -26737,7 +26709,7 @@ pub mod root { pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr<root::imgRequestProxy_ImageURL>, + pub mURI: root::RefPtr<root::mozilla::image::ImageURL>, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -26764,8 +26736,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr<root::imgRequest_ProgressTracker>, - pub mImage: root::RefPtr<root::imgRequest_Image>, + pub mProgressTracker: root::RefPtr<root::mozilla::image::ProgressTracker>, + pub mImage: root::RefPtr<root::mozilla::image::Image>, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -28195,7 +28167,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_148257() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_171453() { assert_eq!(::std::mem::size_of::<root::mozilla::StaticRefPtr<root::nsStyleQuoteValues>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -28210,6 +28182,7 @@ pub mod root { pub struct nsStyleList { pub mListStylePosition: u8, pub mListStyleImage: root::RefPtr<root::nsStyleImageRequest>, + pub mListStyleType: root::nsCOMPtr, pub mCounterStyle: root::mozilla::CounterStylePtr, pub mQuotes: root::RefPtr<root::nsStyleQuoteValues>, pub mImageRegion: root::nsRect, @@ -28226,7 +28199,7 @@ pub mod root { } #[test] fn bindgen_test_layout_nsStyleList() { - assert_eq!(::std::mem::size_of::<nsStyleList>() , 48usize , concat ! ( + assert_eq!(::std::mem::size_of::<nsStyleList>() , 56usize , concat ! ( "Size of: " , stringify ! ( nsStyleList ) )); assert_eq! (::std::mem::align_of::<nsStyleList>() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsStyleList ) )); @@ -28241,18 +28214,23 @@ pub mod root { "Alignment of field: " , stringify ! ( nsStyleList ) , "::" , stringify ! ( mListStyleImage ) )); assert_eq! (unsafe { - & ( * ( 0 as * const nsStyleList ) ) . mCounterStyle as * + & ( * ( 0 as * const nsStyleList ) ) . mListStyleType as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( nsStyleList ) , + "::" , stringify ! ( mListStyleType ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsStyleList ) ) . mCounterStyle as * + const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( nsStyleList ) , "::" , stringify ! ( mCounterStyle ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStyleList ) ) . mQuotes as * const - _ as usize } , 24usize , concat ! ( + _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( nsStyleList ) , "::" , stringify ! ( mQuotes ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStyleList ) ) . mImageRegion as * - const _ as usize } , 32usize , concat ! ( + const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( nsStyleList ) , "::" , stringify ! ( mImageRegion ) )); } @@ -30294,7 +30272,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray<root::mozilla::Keyframe>; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray<root::mozilla::ComputedKeyframeValues>; + root::nsTArray<root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>>; pub type RawGeckoAnimationValueList = root::nsTArray<root::mozilla::PropertyStyleAnimationValuePair>; pub type RawGeckoStyleAnimationList = @@ -30657,48 +30635,48 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_74 + root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_84 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_HAS_SCROLLGRAB; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_74 = - _bindgen_ty_74::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_84 = + _bindgen_ty_84::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_74 { + pub enum _bindgen_ty_84 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -31110,6 +31088,29 @@ pub mod root { pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_placeholder: u32 = 8; pub const SERVO_CSS_PSEUDO_ELEMENT_FLAGS_mozColorSwatch: u32 = 12; #[repr(C)] + #[derive(Debug, Copy)] + pub struct nsIDOMCSSCounterStyleRule { + pub _base: root::nsISupports, + } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct nsIDOMCSSCounterStyleRule_COMTypeInfo { + pub _address: u8, + } + #[test] + fn bindgen_test_layout_nsIDOMCSSCounterStyleRule() { + assert_eq!(::std::mem::size_of::<nsIDOMCSSCounterStyleRule>() , 8usize + , concat ! ( + "Size of: " , stringify ! ( nsIDOMCSSCounterStyleRule ) )); + assert_eq! (::std::mem::align_of::<nsIDOMCSSCounterStyleRule>() , + 8usize , concat ! ( + "Alignment of " , stringify ! ( nsIDOMCSSCounterStyleRule + ) )); + } + impl Clone for nsIDOMCSSCounterStyleRule { + fn clone(&self) -> Self { *self } + } + #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsROCSSPrimitiveValue { _unused: [u8; 0], @@ -31444,7 +31445,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_175992() { + fn __bindgen_test_layout_IntegralConstant_instantiation_199188() { assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31453,7 +31454,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_175996() { + fn __bindgen_test_layout_IntegralConstant_instantiation_199192() { assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -31462,59 +31463,69 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_176825() { - assert_eq!(::std::mem::size_of::<root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type>>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsReadingIterator_instantiation_200016() { + assert_eq!(::std::mem::size_of::<root::nsReadingIterator<u16>>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type> - ) )); - assert_eq!(::std::mem::align_of::<root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type>>() - , 8usize , concat ! ( + root::nsReadingIterator<u16> ) )); + assert_eq!(::std::mem::align_of::<root::nsReadingIterator<u16>>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<root::mozilla::detail::nsStringRepr_char_type> - ) )); + root::nsReadingIterator<u16> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_176828() { - assert_eq!(::std::mem::size_of::<root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type>>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsWritingIterator_instantiation_200020() { + assert_eq!(::std::mem::size_of::<root::nsWritingIterator<u16>>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type> - ) )); - assert_eq!(::std::mem::align_of::<root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type>>() - , 8usize , concat ! ( + root::nsWritingIterator<u16> ) )); + assert_eq!(::std::mem::align_of::<root::nsWritingIterator<u16>>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<root::mozilla::detail::nsStringRepr_char_type> - ) )); + root::nsWritingIterator<u16> ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_176900() { - assert_eq!(::std::mem::size_of::<root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type>>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_200093() { + assert_eq!(::std::mem::size_of::<root::nsReadingIterator<::std::os::raw::c_char>>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type> - ) )); - assert_eq!(::std::mem::align_of::<root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type>>() + root::nsReadingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::<root::nsReadingIterator<::std::os::raw::c_char>>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<root::mozilla::detail::nsCStringRepr_char_type> - ) )); + root::nsReadingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_176903() { - assert_eq!(::std::mem::size_of::<root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type>>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_200097() { + assert_eq!(::std::mem::size_of::<root::nsWritingIterator<::std::os::raw::c_char>>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type> - ) )); - assert_eq!(::std::mem::align_of::<root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type>>() + root::nsWritingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::<root::nsWritingIterator<::std::os::raw::c_char>>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<root::mozilla::detail::nsCStringRepr_char_type> + root::nsWritingIterator<::std::os::raw::c_char> ) )); + } + #[test] + fn __bindgen_test_layout__bindgen_ty_id_205866_instantiation_205863() { + assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( u8 ) + )); + assert_eq!(::std::mem::align_of::<u8>() , 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( u8 + ) )); + } + #[test] + fn __bindgen_test_layout__bindgen_ty_id_205899_instantiation_205896() { + assert_eq!(::std::mem::size_of::<u8>() , 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( u8 ) + )); + assert_eq!(::std::mem::align_of::<u8>() , 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( u8 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_181257() { + fn __bindgen_test_layout_nsTArray_instantiation_206167() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsCString>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31525,7 +31536,7 @@ pub mod root { root::nsTArray<root::nsCString> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_182101() { + fn __bindgen_test_layout_Handle_instantiation_207119() { assert_eq!(::std::mem::size_of::<root::JS::Handle<*mut root::JSObject>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31536,7 +31547,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_182117() { + fn __bindgen_test_layout_Handle_instantiation_207135() { assert_eq!(::std::mem::size_of::<root::JS::Handle<root::JS::Value>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31547,7 +31558,7 @@ pub mod root { root::JS::Handle<root::JS::Value> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_182127() { + fn __bindgen_test_layout_MutableHandle_instantiation_207145() { assert_eq!(::std::mem::size_of::<root::JS::MutableHandle<*mut root::JSObject>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31558,7 +31569,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_182143() { + fn __bindgen_test_layout_MutableHandle_instantiation_207161() { assert_eq!(::std::mem::size_of::<root::JS::MutableHandle<root::JS::Value>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31569,7 +31580,7 @@ pub mod root { root::JS::MutableHandle<root::JS::Value> ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_182146() { + fn __bindgen_test_layout_Rooted_instantiation_207164() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31580,7 +31591,18 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_184649() { + fn __bindgen_test_layout_DeletePolicy_instantiation_207501() { + assert_eq!(::std::mem::size_of::<root::JS::DeletePolicy>() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::<root::JS::DeletePolicy>() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_209504() { assert_eq!(::std::mem::size_of::<root::nsTArray<::nsstring::nsStringRepr>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31591,7 +31613,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_184653() { + fn __bindgen_test_layout_nsTArray_instantiation_209508() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::FontFamilyName>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31602,18 +31624,18 @@ pub mod root { root::nsTArray<root::mozilla::FontFamilyName> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_184666() { - assert_eq!(::std::mem::size_of::<root::nsTArray<u32>>() , 8usize , - concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_209521() { + assert_eq!(::std::mem::size_of::<root::nsTArray<::std::os::raw::c_uint>>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<u32> ) )); - assert_eq!(::std::mem::align_of::<root::nsTArray<u32>>() , 8usize , - concat ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::<root::nsTArray<::std::os::raw::c_uint>>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<u32> ) )); + root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_185519() { + fn __bindgen_test_layout_TenuredHeap_instantiation_210388() { assert_eq!(::std::mem::size_of::<root::JS::TenuredHeap>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31624,7 +31646,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_185609() { + fn __bindgen_test_layout_Heap_instantiation_210478() { assert_eq!(::std::mem::size_of::<root::JS::Heap<*mut root::JSObject>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31635,7 +31657,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_185719() { + fn __bindgen_test_layout_TErrorResult_instantiation_210588() { assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31646,7 +31668,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_185735() { + fn __bindgen_test_layout_TErrorResult_instantiation_210604() { assert_eq!(::std::mem::size_of::<root::mozilla::binding_danger::TErrorResult>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31657,7 +31679,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_185740() { + fn __bindgen_test_layout_already_AddRefed_instantiation_210609() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsStringBuffer>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31668,7 +31690,7 @@ pub mod root { root::already_AddRefed<root::nsStringBuffer> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_185792() { + fn __bindgen_test_layout_already_AddRefed_instantiation_210661() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIAtom>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31679,7 +31701,7 @@ pub mod root { root::already_AddRefed<root::nsIAtom> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_186266() { + fn __bindgen_test_layout_RefPtr_instantiation_211135() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::StyleSheet>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31690,7 +31712,7 @@ pub mod root { root::RefPtr<root::mozilla::StyleSheet> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_186612() { + fn __bindgen_test_layout_already_AddRefed_instantiation_211481() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::mozilla::dom::NodeInfo>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31701,7 +31723,7 @@ pub mod root { root::already_AddRefed<root::mozilla::dom::NodeInfo> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_186855() { + fn __bindgen_test_layout_already_AddRefed_instantiation_211724() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIURI>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31712,7 +31734,7 @@ pub mod root { root::already_AddRefed<root::nsIURI> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_187002() { + fn __bindgen_test_layout_already_AddRefed_instantiation_211871() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsINode>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31723,7 +31745,18 @@ pub mod root { root::already_AddRefed<root::nsINode> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_191082() { + fn __bindgen_test_layout_DeletePolicy_instantiation_215966() { + assert_eq!(::std::mem::size_of::<root::JS::DeletePolicy>() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::<root::JS::DeletePolicy>() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_215964() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::JSErrorNotes_Note>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31734,7 +31767,7 @@ pub mod root { root::mozilla::UniquePtr<root::JSErrorNotes_Note> ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_191114() { + fn __bindgen_test_layout_iterator_instantiation_215999() { assert_eq!(::std::mem::size_of::<root::std::iterator>() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31745,7 +31778,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_191681() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_216565() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31756,7 +31789,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_192929() { + fn __bindgen_test_layout_Heap_instantiation_217818() { assert_eq!(::std::mem::size_of::<root::JS::Heap<root::JS::Value>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31767,7 +31800,7 @@ pub mod root { root::JS::Heap<root::JS::Value> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_193271() { + fn __bindgen_test_layout_nsTArray_instantiation_218160() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::AnonymousContent>>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31780,7 +31813,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_LinkedList_instantiation_193544() { + fn __bindgen_test_layout_LinkedList_instantiation_218436() { assert_eq!(::std::mem::size_of::<root::mozilla::LinkedList>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31791,7 +31824,7 @@ pub mod root { root::mozilla::LinkedList ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_193560() { + fn __bindgen_test_layout_RefPtr_instantiation_218452() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::Element>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31802,7 +31835,7 @@ pub mod root { root::RefPtr<root::mozilla::dom::Element> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_193559() { + fn __bindgen_test_layout_nsTArray_instantiation_218451() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::Element>>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31815,7 +31848,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_193589() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_218481() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31826,7 +31859,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_193588() { + fn __bindgen_test_layout_nsTArray_instantiation_218480() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsCOMPtr>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31837,7 +31870,7 @@ pub mod root { root::nsTArray<root::nsCOMPtr> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_193634() { + fn __bindgen_test_layout_already_AddRefed_instantiation_218526() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIDocument>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31848,7 +31881,7 @@ pub mod root { root::already_AddRefed<root::nsIDocument> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_193799() { + fn __bindgen_test_layout_already_AddRefed_instantiation_218691() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsContentList>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31859,7 +31892,7 @@ pub mod root { root::already_AddRefed<root::nsContentList> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_194126() { + fn __bindgen_test_layout_already_AddRefed_instantiation_219018() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIRunnable>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31870,7 +31903,18 @@ pub mod root { root::already_AddRefed<root::nsIRunnable> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_194219() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_219111() { + assert_eq!(::std::mem::size_of::<root::nsCOMPtr>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::<root::nsCOMPtr>() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_219148() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31881,7 +31925,18 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_194508() { + fn __bindgen_test_layout_DefaultDelete_instantiation_219404() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_219402() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsISMILAttr>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31892,7 +31947,7 @@ pub mod root { root::mozilla::UniquePtr<root::nsISMILAttr> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_195045() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_219942() { assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::mozilla::dom::DOMIntersectionObserver>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31905,7 +31960,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_195044() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_219941() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31916,7 +31971,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_195160() { + fn __bindgen_test_layout_nsTArray_instantiation_220146() { assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::nsIContent>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31927,7 +31982,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_195207() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_220193() { assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -31936,7 +31991,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_195384() { + fn __bindgen_test_layout_nsTArray_instantiation_220370() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsRect>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31947,7 +32002,18 @@ pub mod root { root::nsTArray<root::nsRect> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_195659() { + fn __bindgen_test_layout_DefaultDelete_instantiation_220486() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_220652() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::nsCOMPtr>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31958,7 +32024,7 @@ pub mod root { root::nsTArray<root::nsCOMPtr> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_196446() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_221439() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31969,7 +32035,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_196538() { + fn __bindgen_test_layout_already_AddRefed_instantiation_221531() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsIContent>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31980,7 +32046,7 @@ pub mod root { root::already_AddRefed<root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_196719() { + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_221712() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -31991,7 +32057,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_197236() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_222229() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::WeakFrame>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32002,7 +32068,7 @@ pub mod root { root::nsPtrHashKey<root::WeakFrame> ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_197351() { + fn __bindgen_test_layout_OwningNonNull_instantiation_222344() { assert_eq!(::std::mem::size_of::<root::mozilla::OwningNonNull<root::nsINode>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32013,18 +32079,7 @@ pub mod root { root::mozilla::OwningNonNull<root::nsINode> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_197478() { - assert_eq!(::std::mem::size_of::<root::nsCOMPtr>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::<root::nsCOMPtr>() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_197638() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_222629() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<::std::os::raw::c_void>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32035,7 +32090,7 @@ pub mod root { root::nsPtrHashKey<::std::os::raw::c_void> ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_198427() { + fn __bindgen_test_layout_PointTyped_instantiation_223420() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32046,7 +32101,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_198430() { + fn __bindgen_test_layout_IntPointTyped_instantiation_223425() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32057,7 +32112,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_198433() { + fn __bindgen_test_layout_SizeTyped_instantiation_223428() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32068,7 +32123,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_198439() { + fn __bindgen_test_layout_RectTyped_instantiation_223436() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32079,7 +32134,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_198463() { + fn __bindgen_test_layout_IntPointTyped_instantiation_223468() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32090,7 +32145,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_198469() { + fn __bindgen_test_layout_IntSizeTyped_instantiation_223476() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32101,7 +32156,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_198475() { + fn __bindgen_test_layout_IntRectTyped_instantiation_223484() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32112,7 +32167,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_198604() { + fn __bindgen_test_layout_MarginTyped_instantiation_223651() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32123,7 +32178,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_198631() { + fn __bindgen_test_layout_RectTyped_instantiation_223686() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32134,7 +32189,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_198634() { + fn __bindgen_test_layout_IntRectTyped_instantiation_223691() { assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32145,7 +32200,7 @@ pub mod root { [u32; 4usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_198670() { + fn __bindgen_test_layout_ScaleFactor_instantiation_223737() { assert_eq!(::std::mem::size_of::<u32>() , 4usize , concat ! ( "Size of template specialization: " , stringify ! ( u32 ) )); @@ -32154,7 +32209,7 @@ pub mod root { u32 ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_198770() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_223837() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32165,7 +32220,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_198778() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_223845() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32176,7 +32231,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_198822() { + fn __bindgen_test_layout_ScaleFactors2D_instantiation_223889() { assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32187,7 +32242,7 @@ pub mod root { [u32; 2usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199452() { + fn __bindgen_test_layout_nsTArray_instantiation_224519() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::FramePropertyTable_PropertyValue>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32200,7 +32255,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_199468() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_224535() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::nsIFrame>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32211,7 +32266,7 @@ pub mod root { root::nsPtrHashKey<root::nsIFrame> ) )); } #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_202726() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_227807() { assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32222,7 +32277,7 @@ pub mod root { [u64; 28usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_203353() { + fn __bindgen_test_layout_already_AddRefed_instantiation_228437() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::mozilla::dom::CSSValue>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32233,7 +32288,18 @@ pub mod root { root::already_AddRefed<root::mozilla::dom::CSSValue> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_203445() { + fn __bindgen_test_layout_DefaultDelete_instantiation_228528() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_228532() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32244,7 +32310,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_204634() { + fn __bindgen_test_layout_already_AddRefed_instantiation_229721() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsISupports>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32255,7 +32321,7 @@ pub mod root { root::already_AddRefed<root::nsISupports> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_204980() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_230007() { assert_eq!(::std::mem::size_of::<root::nsCOMPtr>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32266,7 +32332,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_206560() { + fn __bindgen_test_layout_nsTArray_instantiation_231597() { assert_eq!(::std::mem::size_of::<root::nsTArray<f64>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32277,7 +32343,7 @@ pub mod root { root::nsTArray<f64> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_206572() { + fn __bindgen_test_layout_RefPtr_instantiation_231609() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32290,7 +32356,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_206571() { + fn __bindgen_test_layout_nsTArray_instantiation_231608() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::RefPtr<root::mozilla::dom::DOMIntersectionObserverEntry>>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32303,7 +32369,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_206605() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_231642() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::mozilla::dom::Element>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32314,7 +32380,7 @@ pub mod root { root::nsPtrHashKey<root::mozilla::dom::Element> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_206702() { + fn __bindgen_test_layout_UniquePtr_instantiation_231739() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::ProfilerBacktrace>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32325,7 +32391,7 @@ pub mod root { root::mozilla::UniquePtr<root::ProfilerBacktrace> ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_208453() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_233499() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32336,7 +32402,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_208492() { + fn __bindgen_test_layout_OwningNonNull_instantiation_233538() { assert_eq!(::std::mem::size_of::<root::mozilla::OwningNonNull<root::mozilla::EffectCompositor_AnimationStyleRuleProcessor>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32349,7 +32415,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208515() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_233561() { assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsIAtom>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32360,7 +32426,7 @@ pub mod root { root::nsRefPtrHashKey<root::nsIAtom> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_208551() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_233597() { assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::nsIContent>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32371,7 +32437,18 @@ pub mod root { root::nsRefPtrHashKey<root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_209107() { + fn __bindgen_test_layout_DefaultDelete_instantiation_234142() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_234156() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::mozilla::URLExtraData>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32382,7 +32459,7 @@ pub mod root { root::already_AddRefed<root::mozilla::URLExtraData> ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_209111() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_234160() { assert_eq!(::std::mem::size_of::<root::nsMainThreadPtrHolder<root::nsIURI>>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32393,7 +32470,7 @@ pub mod root { root::nsMainThreadPtrHolder<root::nsIURI> ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_209185() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_234234() { assert_eq!(::std::mem::size_of::<root::nsPtrHashKey<root::nsIDocument>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32404,7 +32481,18 @@ pub mod root { root::nsPtrHashKey<root::nsIDocument> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_209470() { + fn __bindgen_test_layout_DefaultDelete_instantiation_234521() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_234519() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValueList>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32415,7 +32503,18 @@ pub mod root { root::mozilla::UniquePtr<root::nsCSSValueList> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_209473() { + fn __bindgen_test_layout_DefaultDelete_instantiation_234527() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_234525() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsCSSValuePairList>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32426,7 +32525,7 @@ pub mod root { root::mozilla::UniquePtr<root::nsCSSValuePairList> ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_209742() { + fn __bindgen_test_layout_Maybe_instantiation_234797() { assert_eq!(::std::mem::size_of::<[u64; 2usize]>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32437,7 +32536,7 @@ pub mod root { [u64; 2usize] ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_209908() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_234964() { assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32446,7 +32545,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_210066() { + fn __bindgen_test_layout_Maybe_instantiation_235122() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32457,7 +32556,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_210081() { + fn __bindgen_test_layout_already_AddRefed_instantiation_235137() { assert_eq!(::std::mem::size_of::<root::already_AddRefed<root::nsStyleImageRequest>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32468,7 +32567,18 @@ pub mod root { root::already_AddRefed<root::nsStyleImageRequest> ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_210087() { + fn __bindgen_test_layout_DefaultDelete_instantiation_235145() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_235143() { assert_eq!(::std::mem::size_of::<root::mozilla::UniquePtr<root::nsStyleSides>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32479,7 +32589,18 @@ pub mod root { root::mozilla::UniquePtr<root::nsStyleSides> ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_210273() { + fn __bindgen_test_layout_DefaultDelete_instantiation_235184() { + assert_eq!(::std::mem::size_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::<root::mozilla::DefaultDelete>() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_pair_instantiation_235335() { assert_eq!(::std::mem::size_of::<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32490,7 +32611,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_210272() { + fn __bindgen_test_layout_nsTArray_instantiation_235334() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr>>>() , 8usize , concat ! ( @@ -32505,7 +32626,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_211261() { + fn __bindgen_test_layout_RefPtr_instantiation_236328() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::RawServoAnimationValue>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32516,7 +32637,7 @@ pub mod root { root::RefPtr<root::RawServoAnimationValue> ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_215249() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_240320() { assert_eq!(::std::mem::size_of::<root::mozilla::BaseTimeDuration>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32527,7 +32648,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215841() { + fn __bindgen_test_layout_nsTArray_instantiation_240912() { assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32540,7 +32661,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_216015() { + fn __bindgen_test_layout_Maybe_instantiation_241088() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32551,7 +32672,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_216190() { + fn __bindgen_test_layout_RefPtr_instantiation_241263() { assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32562,7 +32683,7 @@ pub mod root { root::RefPtr<root::mozilla::dom::DOMRect> ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_216434() { + fn __bindgen_test_layout_Sequence_instantiation_241507() { assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -32571,7 +32692,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_216733() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_241806() { assert_eq!(::std::mem::size_of::<root::nsRefPtrHashKey<root::mozilla::dom::Element>>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32582,7 +32703,7 @@ pub mod root { root::nsRefPtrHashKey<root::mozilla::dom::Element> ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_216732() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_241805() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32593,7 +32714,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_217897() { + fn __bindgen_test_layout_nsTArray_instantiation_243035() { assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32604,7 +32725,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_217933() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_243071() { assert_eq!(::std::mem::size_of::<root::nsAutoPtr<root::nsMediaQuery>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/gecko/rules.rs b/components/style/gecko/rules.rs index 7af5fc599b7..f41fcb1e0b1 100644 --- a/components/style/gecko/rules.rs +++ b/components/style/gecko/rules.rs @@ -10,7 +10,8 @@ use counter_style; use cssparser::UnicodeRange; use font_face::{FontFaceRuleData, Source}; use gecko_bindings::bindings; -use gecko_bindings::structs::{self, nsCSSFontFaceRule, nsCSSValue, nsCSSCounterDesc}; +use gecko_bindings::structs::{self, nsCSSFontFaceRule, nsCSSValue}; +use gecko_bindings::structs::{nsCSSCounterDesc, nsCSSCounterStyleRule}; use gecko_bindings::sugar::ns_css_value::ToNsCssValue; use gecko_bindings::sugar::refptr::{RefPtr, UniqueRefPtr}; use shared_lock::{ToCssWithGuard, SharedRwLockReadGuard}; @@ -20,14 +21,14 @@ use std::fmt; pub type FontFaceRule = RefPtr<nsCSSFontFaceRule>; impl ToNsCssValue for FamilyName { - fn convert(&self, nscssvalue: &mut nsCSSValue) { + fn convert(self, nscssvalue: &mut nsCSSValue) { nscssvalue.set_string_from_atom(&self.name) } } impl ToNsCssValue for font_weight::T { - fn convert(&self, nscssvalue: &mut nsCSSValue) { - nscssvalue.set_integer(*self as i32) + fn convert(self, nscssvalue: &mut nsCSSValue) { + nscssvalue.set_integer(self as i32) } } @@ -41,8 +42,8 @@ macro_rules! map_enum { ) => { $( impl ToNsCssValue for $prop::T { - fn convert(&self, nscssvalue: &mut nsCSSValue) { - nscssvalue.set_enum(match *self { + fn convert(self, nscssvalue: &mut nsCSSValue) { + nscssvalue.set_enum(match self { $( $prop::T::$servo => structs::$gecko as i32, )+ }) } @@ -72,7 +73,7 @@ map_enum! { } impl ToNsCssValue for Vec<Source> { - fn convert(&self, nscssvalue: &mut nsCSSValue) { + fn convert(self, nscssvalue: &mut nsCSSValue) { let src_len = self.iter().fold(0, |acc, src| { acc + match *src { // Each format hint takes one position in the array of mSrc. @@ -85,15 +86,15 @@ impl ToNsCssValue for Vec<Source> { macro_rules! next { () => { target_srcs.next().expect("Length of target_srcs should be enough") } } - for src in self.iter() { - match *src { - Source::Url(ref url) => { + for src in self.into_iter() { + match src { + Source::Url(url) => { next!().set_url(&url.url); for hint in url.format_hints.iter() { next!().set_font_format(&hint); } } - Source::Local(ref family) => { + Source::Local(family) => { next!().set_local_font(&family.name); } } @@ -103,7 +104,7 @@ impl ToNsCssValue for Vec<Source> { } impl ToNsCssValue for Vec<UnicodeRange> { - fn convert(&self, nscssvalue: &mut nsCSSValue) { + fn convert(self, nscssvalue: &mut nsCSSValue) { let target_ranges = nscssvalue .set_array((self.len() * 2) as i32) .as_mut_slice().chunks_mut(2); @@ -137,13 +138,38 @@ impl ToCssWithGuard for FontFaceRule { } } +/// A @counter-style rule +pub type CounterStyleRule = RefPtr<nsCSSCounterStyleRule>; + +impl From<counter_style::CounterStyleRuleData> for CounterStyleRule { + fn from(data: counter_style::CounterStyleRuleData) -> CounterStyleRule { + let mut result = unsafe { + UniqueRefPtr::from_addrefed( + bindings::Gecko_CSSCounterStyle_Create(data.name().0.as_ptr())) + }; + data.set_descriptors(&mut result.mValues); + result.get() + } +} + +impl ToCssWithGuard for CounterStyleRule { + fn to_css<W>(&self, _guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result + where W: fmt::Write { + ns_auto_string!(css_text); + unsafe { + bindings::Gecko_CSSCounterStyle_GetCssText(self.get(), &mut *css_text); + } + write!(dest, "{}", css_text) + } +} + /// The type of nsCSSCounterStyleRule::mValues pub type CounterStyleDescriptors = [nsCSSValue; nsCSSCounterDesc::eCSSCounterDesc_COUNT as usize]; impl ToNsCssValue for counter_style::System { - fn convert(&self, nscssvalue: &mut nsCSSValue) { + fn convert(self, nscssvalue: &mut nsCSSValue) { use counter_style::System::*; - match *self { + match self { Cyclic => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_CYCLIC as i32), Numeric => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_NUMERIC as i32), Alphabetic => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_ALPHABETIC as i32), @@ -154,48 +180,48 @@ impl ToNsCssValue for counter_style::System { let mut b = nsCSSValue::null(); a.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_FIXED as i32); b.set_integer(first_symbol_value.unwrap_or(1)); - //nscssvalue.set_pair(a, b); // FIXME: add bindings for nsCSSValue::SetPairValue + nscssvalue.set_pair(&a, &b); } - Extends(ref other) => { + Extends(other) => { let mut a = nsCSSValue::null(); let mut b = nsCSSValue::null(); a.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_EXTENDS as i32); - b.set_string_from_atom(&other.0); - //nscssvalue.set_pair(a, b); // FIXME: add bindings for nsCSSValue::SetPairValue + b.set_atom_ident(other.0); + nscssvalue.set_pair(&a, &b); } } } } impl ToNsCssValue for counter_style::Negative { - fn convert(&self, nscssvalue: &mut nsCSSValue) { - if let Some(ref second) = self.1 { + fn convert(self, nscssvalue: &mut nsCSSValue) { + if let Some(second) = self.1 { let mut a = nsCSSValue::null(); let mut b = nsCSSValue::null(); - a.set_from(&self.0); + a.set_from(self.0); b.set_from(second); - //nscssvalue.set_pair(a, b); // FIXME: add bindings for nsCSSValue::SetPairValue + nscssvalue.set_pair(&a, &b); } else { - nscssvalue.set_from(&self.0) + nscssvalue.set_from(self.0) } } } impl ToNsCssValue for counter_style::Symbol { - fn convert(&self, nscssvalue: &mut nsCSSValue) { - match *self { - counter_style::Symbol::String(ref s) => nscssvalue.set_string(s), - counter_style::Symbol::Ident(ref s) => nscssvalue.set_ident(s), + fn convert(self, nscssvalue: &mut nsCSSValue) { + match self { + counter_style::Symbol::String(s) => nscssvalue.set_string(&s), + counter_style::Symbol::Ident(s) => nscssvalue.set_ident(&s), } } } impl ToNsCssValue for counter_style::Ranges { - fn convert(&self, _nscssvalue: &mut nsCSSValue) { + fn convert(self, nscssvalue: &mut nsCSSValue) { if self.0.is_empty() { - //nscssvalue.set_auto(); // FIXME: add bindings for nsCSSValue::SetAutoValue + nscssvalue.set_auto(); } else { - for range in &self.0 { + nscssvalue.set_pair_list(self.0.into_iter().map(|range| { fn set_bound(bound: Option<i32>, nscssvalue: &mut nsCSSValue) { if let Some(finite) = bound { nscssvalue.set_integer(finite) @@ -207,52 +233,59 @@ impl ToNsCssValue for counter_style::Ranges { let mut end = nsCSSValue::null(); set_bound(range.start, &mut start); set_bound(range.end, &mut end); - // FIXME: add bindings for nsCSSValuePairList - } + (start, end) + })); } } } impl ToNsCssValue for counter_style::Pad { - fn convert(&self, _nscssvalue: &mut nsCSSValue) { + fn convert(self, nscssvalue: &mut nsCSSValue) { let mut min_length = nsCSSValue::null(); let mut pad_with = nsCSSValue::null(); min_length.set_integer(self.0 as i32); - pad_with.set_from(&self.1); - // FIXME: add bindings for nsCSSValue::SetPairValue - //nscssvalue.set_pair(min_length, pad_with); + pad_with.set_from(self.1); + nscssvalue.set_pair(&min_length, &pad_with); } } impl ToNsCssValue for counter_style::Fallback { - fn convert(&self, nscssvalue: &mut nsCSSValue) { - nscssvalue.set_ident_from_atom(&self.0 .0) + fn convert(self, nscssvalue: &mut nsCSSValue) { + nscssvalue.set_atom_ident(self.0 .0) } } impl ToNsCssValue for counter_style::Symbols { - fn convert(&self, _nscssvalue: &mut nsCSSValue) { - debug_assert!(!self.0.is_empty()); - // FIXME: add bindings for nsCSSValueList + fn convert(self, nscssvalue: &mut nsCSSValue) { + nscssvalue.set_list(self.0.into_iter().map(|item| { + let mut value = nsCSSValue::null(); + value.set_from(item); + value + })); } } impl ToNsCssValue for counter_style::AdditiveSymbols { - fn convert(&self, _nscssvalue: &mut nsCSSValue) { - debug_assert!(!self.0.is_empty()); - // FIXME: add bindings for nsCSSValuePairList + fn convert(self, nscssvalue: &mut nsCSSValue) { + nscssvalue.set_pair_list(self.0.into_iter().map(|tuple| { + let mut weight = nsCSSValue::null(); + let mut symbol = nsCSSValue::null(); + weight.set_integer(tuple.weight as i32); + symbol.set_from(tuple.symbol); + (weight, symbol) + })); } } impl ToNsCssValue for counter_style::SpeakAs { - fn convert(&self, nscssvalue: &mut nsCSSValue) { + fn convert(self, nscssvalue: &mut nsCSSValue) { use counter_style::SpeakAs::*; - match *self { - Auto => {} //nscssvalue.set_auto(), // FIXME: add bindings for nsCSSValue::SetAutoValue + match self { + Auto => nscssvalue.set_auto(), Bullets => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_BULLETS as i32), Numbers => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_NUMBERS as i32), Words => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_WORDS as i32), - Other(ref other) => nscssvalue.set_ident_from_atom(&other.0), + Other(other) => nscssvalue.set_atom_ident(other.0), } } } diff --git a/components/style/gecko/snapshot_helpers.rs b/components/style/gecko/snapshot_helpers.rs index 9216c92cd2f..f7a0efa48c0 100644 --- a/components/style/gecko/snapshot_helpers.rs +++ b/components/style/gecko/snapshot_helpers.rs @@ -47,7 +47,7 @@ pub fn each_class<F, T>(item: T, let length = getter(item, &mut class, &mut list); match length { 0 => {} - 1 => Atom::with(class, &mut callback), + 1 => Atom::with(class, callback), n => { let classes = slice::from_raw_parts(list, n as usize); for c in classes { diff --git a/components/style/gecko_bindings/sugar/ns_css_value.rs b/components/style/gecko_bindings/sugar/ns_css_value.rs index e2ff4ceab30..0f91fc4f27a 100644 --- a/components/style/gecko_bindings/sugar/ns_css_value.rs +++ b/components/style/gecko_bindings/sugar/ns_css_value.rs @@ -6,6 +6,7 @@ use app_units::Au; use gecko_bindings::bindings; +use gecko_bindings::structs; use gecko_bindings::structs::{nsCSSValue, nsCSSUnit}; use gecko_bindings::structs::{nsCSSValue_Array, nscolor}; use gecko_string_cache::Atom; @@ -101,9 +102,24 @@ impl nsCSSValue { } } + fn set_valueless_unit(&mut self, unit: nsCSSUnit) { + debug_assert_eq!(self.mUnit, nsCSSUnit::eCSSUnit_Null); + debug_assert!(unit as u32 <= nsCSSUnit::eCSSUnit_DummyInherit as u32, "Not a valueless unit"); + self.mUnit = unit; + } + + /// Set to an auto value + /// + /// This method requires the current value to be null. + pub fn set_auto(&mut self) { + self.set_valueless_unit(nsCSSUnit::eCSSUnit_Auto); + } + /// Set to a normal value + /// + /// This method requires the current value to be null. pub fn set_normal(&mut self) { - unsafe { bindings::Gecko_CSSValue_SetNormal(self) } + self.set_valueless_unit(nsCSSUnit::eCSSUnit_Normal); } fn set_string_internal(&mut self, s: &str, unit: nsCSSUnit) { @@ -175,7 +191,7 @@ impl nsCSSValue { } /// Generic set from any value that implements the ToNsCssValue trait. - pub fn set_from<T: ToNsCssValue>(&mut self, value: &T) { + pub fn set_from<T: ToNsCssValue>(&mut self, value: T) { value.convert(self) } @@ -198,6 +214,52 @@ impl nsCSSValue { *self.mValue.mFloat.as_mut() = value; } } + + /// Set to a pair value + /// + /// This is only supported on the main thread. + pub fn set_pair(&mut self, x: &nsCSSValue, y: &nsCSSValue) { + unsafe { bindings::Gecko_CSSValue_SetPair(self, x, y) } + } + + /// Set to a list value + /// + /// This is only supported on the main thread. + pub fn set_list<I>(&mut self, mut values: I) where I: ExactSizeIterator<Item=nsCSSValue> { + debug_assert!(values.len() > 0, "Empty list is not supported"); + unsafe { bindings::Gecko_CSSValue_SetList(self, values.len() as u32); } + debug_assert_eq!(self.mUnit, nsCSSUnit::eCSSUnit_List); + let mut item_ptr = &mut unsafe { + self.mValue.mList.as_ref() // &*nsCSSValueList_heap + .as_mut().expect("List pointer should be non-null") + }._base as *mut structs::nsCSSValueList; + while let Some(item) = unsafe { item_ptr.as_mut() } { + item.mValue = values.next().expect("Values shouldn't have been exhausted"); + item_ptr = item.mNext; + } + debug_assert!(values.next().is_none(), "Values should have been exhausted"); + } + + /// Set to a pair list value + /// + /// This is only supported on the main thread. + pub fn set_pair_list<I>(&mut self, mut values: I) + where I: ExactSizeIterator<Item=(nsCSSValue, nsCSSValue)> { + debug_assert!(values.len() > 0, "Empty list is not supported"); + unsafe { bindings::Gecko_CSSValue_SetPairList(self, values.len() as u32); } + debug_assert_eq!(self.mUnit, nsCSSUnit::eCSSUnit_PairList); + let mut item_ptr = &mut unsafe { + self.mValue.mPairList.as_ref() // &*nsCSSValuePairList_heap + .as_mut().expect("List pointer should be non-null") + }._base as *mut structs::nsCSSValuePairList; + while let Some(item) = unsafe { item_ptr.as_mut() } { + let value = values.next().expect("Values shouldn't have been exhausted"); + item.mXValue = value.0; + item.mYValue = value.1; + item_ptr = item.mNext; + } + debug_assert!(values.next().is_none(), "Values should have been exhausted"); + } } impl Drop for nsCSSValue { @@ -249,5 +311,5 @@ impl IndexMut<usize> for nsCSSValue_Array { /// Generic conversion to nsCSSValue pub trait ToNsCssValue { /// Convert - fn convert(&self, nscssvalue: &mut nsCSSValue); + fn convert(self, nscssvalue: &mut nsCSSValue); } diff --git a/components/style/gecko_bindings/sugar/refptr.rs b/components/style/gecko_bindings/sugar/refptr.rs index b90477e13a4..77c6ca4f3c3 100644 --- a/components/style/gecko_bindings/sugar/refptr.rs +++ b/components/style/gecko_bindings/sugar/refptr.rs @@ -255,6 +255,8 @@ macro_rules! impl_refcount { impl_refcount!(::gecko_bindings::structs::nsCSSFontFaceRule, Gecko_CSSFontFaceRule_AddRef, Gecko_CSSFontFaceRule_Release); +impl_refcount!(::gecko_bindings::structs::nsCSSCounterStyleRule, + Gecko_CSSCounterStyleRule_AddRef, Gecko_CSSCounterStyleRule_Release); // Companion of NS_DECL_THREADSAFE_FFI_REFCOUNTING. // diff --git a/components/style/gecko_string_cache/mod.rs b/components/style/gecko_string_cache/mod.rs index 428d522be11..fa89f5eab48 100644 --- a/components/style/gecko_string_cache/mod.rs +++ b/components/style/gecko_string_cache/mod.rs @@ -198,7 +198,7 @@ impl fmt::Display for WeakAtom { impl Atom { /// Execute a callback with the atom represented by `ptr`. - pub unsafe fn with<F, R: 'static>(ptr: *mut nsIAtom, callback: &mut F) -> R where F: FnMut(&Atom) -> R { + pub unsafe fn with<F, R>(ptr: *mut nsIAtom, callback: F) -> R where F: FnOnce(&Atom) -> R { let atom = Atom(WeakAtom::new(ptr)); let ret = callback(&atom); mem::forget(atom); diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 49cf7695833..146c8827b9d 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -2987,29 +2987,12 @@ fn static_assert() { } pub fn set_list_style_type(&mut self, v: longhands::list_style_type::computed_value::T) { - use properties::longhands::list_style_type::computed_value::T as Keyword; - <% - keyword = data.longhands_by_name["list-style-type"].keyword - # The first four are @counter-styles - # The rest have special fallback behavior - special = """upper-roman lower-roman upper-alpha lower-alpha - japanese-informal japanese-formal korean-hangul-formal korean-hanja-informal - korean-hanja-formal simp-chinese-informal simp-chinese-formal - trad-chinese-informal trad-chinese-formal""".split() - %> - let result = match v { - % for value in keyword.values_for('gecko'): - % if value in special: - // Special keywords are implemented as @counter-styles - // and need to be manually set as strings - Keyword::${to_rust_ident(value)} => structs::${keyword.gecko_constant("none")}, - % else: - Keyword::${to_rust_ident(value)} => - structs::${keyword.gecko_constant(value)}, - % endif - % endfor + use values::generics::CounterStyleOrNone; + let name = match v.0 { + CounterStyleOrNone::None_ => atom!("none"), + CounterStyleOrNone::Name(name) => name.0, }; - unsafe { Gecko_SetListStyleType(&mut self.gecko, result as u32); } + unsafe { Gecko_SetListStyleType(&mut self.gecko, name.as_ptr()); } } @@ -4072,7 +4055,8 @@ clip-path pub fn set_content(&mut self, v: longhands::content::computed_value::T) { use properties::longhands::content::computed_value::T; use properties::longhands::content::computed_value::ContentItem; - use style_traits::ToCss; + use values::generics::CounterStyleOrNone; + use gecko_bindings::structs::nsCSSValue; use gecko_bindings::structs::nsStyleContentType::*; use gecko_bindings::bindings::Gecko_ClearAndResizeStyleContents; @@ -4086,6 +4070,13 @@ clip-path ptr } + fn set_counter_style(style: CounterStyleOrNone, dest: &mut nsCSSValue) { + dest.set_atom_ident(match style { + CounterStyleOrNone::None_ => atom!("none"), + CounterStyleOrNone::Name(name) => name.0, + }); + } + match v { T::none | T::normal => { @@ -4147,8 +4138,7 @@ clip-path } let mut array = unsafe { &mut **self.gecko.mContents[i].mContent.mCounters.as_mut() }; array[0].set_string(&name); - // When we support <custom-ident> values for list-style-type this will need to be updated - array[1].set_atom_ident(style.to_css_string().into()); + set_counter_style(style, &mut array[1]); } ContentItem::Counters(name, sep, style) => { unsafe { @@ -4158,8 +4148,7 @@ clip-path let mut array = unsafe { &mut **self.gecko.mContents[i].mContent.mCounters.as_mut() }; array[0].set_string(&name); array[1].set_string(&sep); - // When we support <custom-ident> values for list-style-type this will need to be updated - array[2].set_atom_ident(style.to_css_string().into()); + set_counter_style(style, &mut array[2]); } ContentItem::Url(ref url) => { unsafe { diff --git a/components/style/properties/longhand/counters.mako.rs b/components/style/properties/longhand/counters.mako.rs index 054746bdc7a..4c4ac955d5b 100644 --- a/components/style/properties/longhand/counters.mako.rs +++ b/components/style/properties/longhand/counters.mako.rs @@ -11,9 +11,12 @@ use cssparser::Token; use std::ascii::AsciiExt; use values::computed::ComputedValueAsSpecified; + #[cfg(feature = "gecko")] + use values::generics::CounterStyleOrNone; use values::specified::url::SpecifiedUrl; use values::HasViewportPercentage; + #[cfg(feature = "servo")] use super::list_style_type; pub use self::computed_value::T as SpecifiedValue; @@ -23,22 +26,25 @@ no_viewport_percentage!(SpecifiedValue); pub mod computed_value { - use super::super::list_style_type; - use cssparser; use std::fmt; use style_traits::ToCss; use values::specified::url::SpecifiedUrl; + #[cfg(feature = "servo")] + type CounterStyleType = super::super::list_style_type::computed_value::T; + #[cfg(feature = "gecko")] + type CounterStyleType = ::values::generics::CounterStyleOrNone; + #[derive(Debug, PartialEq, Eq, Clone)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum ContentItem { /// Literal string content. String(String), /// `counter(name, style)`. - Counter(String, list_style_type::computed_value::T), + Counter(String, CounterStyleType), /// `counters(name, separator, style)`. - Counters(String, String, list_style_type::computed_value::T), + Counters(String, String, CounterStyleType), /// `open-quote`. OpenQuote, /// `close-quote`. @@ -64,20 +70,20 @@ ContentItem::String(ref s) => { cssparser::serialize_string(&**s, dest) } - ContentItem::Counter(ref s, ref list_style_type) => { + ContentItem::Counter(ref s, ref counter_style) => { try!(dest.write_str("counter(")); try!(cssparser::serialize_identifier(&**s, dest)); try!(dest.write_str(", ")); - try!(list_style_type.to_css(dest)); + try!(counter_style.to_css(dest)); dest.write_str(")") } - ContentItem::Counters(ref s, ref separator, ref list_style_type) => { + ContentItem::Counters(ref s, ref separator, ref counter_style) => { try!(dest.write_str("counters(")); try!(cssparser::serialize_identifier(&**s, dest)); try!(dest.write_str(", ")); try!(cssparser::serialize_string(&**separator, dest)); try!(dest.write_str(", ")); - try!(list_style_type.to_css(dest)); + try!(counter_style.to_css(dest)); dest.write_str(")") } ContentItem::OpenQuote => dest.write_str("open-quote"), @@ -134,6 +140,22 @@ computed_value::T::normal } + #[cfg(feature = "servo")] + fn parse_counter_style(context: &ParserContext, input: &mut Parser) -> list_style_type::computed_value::T { + input.try(|input| { + input.expect_comma()?; + list_style_type::parse(context, input) + }).unwrap_or(list_style_type::computed_value::T::decimal) + } + + #[cfg(feature = "gecko")] + fn parse_counter_style(context: &ParserContext, input: &mut Parser) -> CounterStyleOrNone { + input.try(|input| { + input.expect_comma()?; + CounterStyleOrNone::parse(context, input) + }).unwrap_or(CounterStyleOrNone::decimal()) + } + // normal | none | [ <string> | <counter> | open-quote | close-quote | no-open-quote | // no-close-quote ]+ // TODO: <uri>, attr(<identifier>) @@ -162,20 +184,14 @@ content.push(try!(match_ignore_ascii_case! { &name, "counter" => input.parse_nested_block(|input| { let name = try!(input.expect_ident()).into_owned(); - let style = input.try(|input| { - try!(input.expect_comma()); - list_style_type::parse(context, input) - }).unwrap_or(list_style_type::computed_value::T::decimal); + let style = parse_counter_style(context, input); Ok(ContentItem::Counter(name, style)) }), "counters" => input.parse_nested_block(|input| { let name = try!(input.expect_ident()).into_owned(); try!(input.expect_comma()); let separator = try!(input.expect_string()).into_owned(); - let style = input.try(|input| { - try!(input.expect_comma()); - list_style_type::parse(context, input) - }).unwrap_or(list_style_type::computed_value::T::decimal); + let style = parse_counter_style(context, input); Ok(ContentItem::Counters(name, separator, style)) }), % if product == "gecko": diff --git a/components/style/properties/longhand/font.mako.rs b/components/style/properties/longhand/font.mako.rs index 44e49ac1fb7..aed5221e4b6 100644 --- a/components/style/properties/longhand/font.mako.rs +++ b/components/style/properties/longhand/font.mako.rs @@ -721,7 +721,7 @@ ${helpers.single_keyword_system("font-variant-caps", // XXXManishearth handle quirks mode let ref gecko_font = cx.style().get_font().gecko(); - let base_size = unsafe { Atom::with(gecko_font.mLanguage.raw::<nsIAtom>(), &mut |atom| { + let base_size = unsafe { Atom::with(gecko_font.mLanguage.raw::<nsIAtom>(), |atom| { cx.font_metrics_provider.get_size(atom, gecko_font.mGenericID).0 }) }; diff --git a/components/style/properties/longhand/list.mako.rs b/components/style/properties/longhand/list.mako.rs index ece28aaf4ec..14084f894d2 100644 --- a/components/style/properties/longhand/list.mako.rs +++ b/components/style/properties/longhand/list.mako.rs @@ -21,21 +21,85 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu // we may need to look into this and handle these differently. // // [1]: http://dev.w3.org/csswg/css-counter-styles/ -${helpers.single_keyword("list-style-type", """ - disc none circle square decimal disclosure-open disclosure-closed lower-alpha upper-alpha -""", extra_servo_values="""arabic-indic bengali cambodian cjk-decimal devanagari - gujarati gurmukhi kannada khmer lao malayalam mongolian - myanmar oriya persian telugu thai tibetan cjk-earthly-branch - cjk-heavenly-stem lower-greek hiragana hiragana-iroha katakana - katakana-iroha""", - extra_gecko_values="""japanese-informal japanese-formal korean-hangul-formal - korean-hanja-formal korean-hanja-informal simp-chinese-informal simp-chinese-formal - trad-chinese-informal trad-chinese-formal ethiopic-numeric upper-roman lower-roman - """, - gecko_constant_prefix="NS_STYLE_LIST_STYLE", - needs_conversion="True", - animation_value_type="none", - spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type")} +% if product == "servo": + ${helpers.single_keyword("list-style-type", """ + disc none circle square decimal disclosure-open disclosure-closed lower-alpha upper-alpha + arabic-indic bengali cambodian cjk-decimal devanagari gujarati gurmukhi kannada khmer lao + malayalam mongolian myanmar oriya persian telugu thai tibetan cjk-earthly-branch + cjk-heavenly-stem lower-greek hiragana hiragana-iroha katakana katakana-iroha""", + needs_conversion="True", + animation_value_type="none", + spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type")} +% else: + <%helpers:longhand name="list-style-type" animation_value_type="none" + spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type"> + use std::fmt; + use style_traits::ToCss; + use values::CustomIdent; + use values::HasViewportPercentage; + use values::computed::ComputedValueAsSpecified; + use values::generics::CounterStyleOrNone; + + pub use self::computed_value::T as SpecifiedValue; + + pub mod computed_value { + use values::generics::CounterStyleOrNone; + + /// <counter-style> | none + #[derive(Debug, Clone, PartialEq, Eq)] + pub struct T(pub CounterStyleOrNone); + } + + impl ComputedValueAsSpecified for SpecifiedValue {} + no_viewport_percentage!(SpecifiedValue); + + impl ToCss for SpecifiedValue { + fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + self.0.to_css(dest) + } + } + + #[cfg(feature = "gecko")] + impl SpecifiedValue { + /// Convert from gecko keyword to list-style-type. + /// + /// This should only be used for mapping type attribute to + /// list-style-type, and thus only values possible in that + /// attribute is considered here. + pub fn from_gecko_keyword(value: u32) -> Self { + use gecko_bindings::structs; + SpecifiedValue(if value == structs::NS_STYLE_LIST_STYLE_NONE { + CounterStyleOrNone::None_ + } else { + <% + values = """disc circle square decimal lower-roman + upper-roman lower-alpha upper-alpha""".split() + %> + CounterStyleOrNone::Name(CustomIdent(match value { + % for style in values: + structs::NS_STYLE_LIST_STYLE_${style.replace('-', '_').upper()} => atom!("${style}"), + % endfor + _ => unreachable!("Unknown counter style keyword value"), + })) + }) + } + } + + #[inline] + pub fn get_initial_value() -> computed_value::T { + computed_value::T(CounterStyleOrNone::disc()) + } + + #[inline] + pub fn get_initial_specified_value() -> SpecifiedValue { + SpecifiedValue(CounterStyleOrNone::disc()) + } + + pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> { + CounterStyleOrNone::parse(context, input).map(SpecifiedValue) + } + </%helpers:longhand> +% endif <%helpers:longhand name="list-style-image" animation_value_type="none" boxed="${product == 'gecko'}" diff --git a/components/style/properties/shorthand/list.mako.rs b/components/style/properties/shorthand/list.mako.rs index 55a3448cf3f..11a9e170bd1 100644 --- a/components/style/properties/shorthand/list.mako.rs +++ b/components/style/properties/shorthand/list.mako.rs @@ -25,14 +25,6 @@ continue } - if list_style_type.is_none() { - if let Ok(value) = input.try(|input| list_style_type::parse(context, input)) { - list_style_type = Some(value); - any = true; - continue - } - } - if image.is_none() { if let Ok(value) = input.try(|input| list_style_image::parse(context, input)) { image = Some(value); @@ -48,11 +40,31 @@ continue } } + + // list-style-type must be checked the last, because it accepts + // arbitrary identifier for custom counter style, and thus may + // affect values of list-style-position. + if list_style_type.is_none() { + if let Ok(value) = input.try(|input| list_style_type::parse(context, input)) { + list_style_type = Some(value); + any = true; + continue + } + } break } let position = unwrap_or_initial!(list_style_position, position); + fn list_style_type_none() -> list_style_type::SpecifiedValue { + % if product == "servo": + list_style_type::SpecifiedValue::none + % else: + use values::generics::CounterStyleOrNone; + list_style_type::SpecifiedValue(CounterStyleOrNone::None_) + % endif + } + // If there are two `none`s, then we can't have a type or image; if there is one `none`, // then we can't have both a type *and* an image; if there is no `none` then we're fine as // long as we parsed something. @@ -61,14 +73,14 @@ Ok(Longhands { list_style_position: position, list_style_image: list_style_image::SpecifiedValue(Either::Second(None_)), - list_style_type: list_style_type::SpecifiedValue::none, + list_style_type: list_style_type_none(), }) } (true, 1, None, Some(image)) => { Ok(Longhands { list_style_position: position, list_style_image: image, - list_style_type: list_style_type::SpecifiedValue::none, + list_style_type: list_style_type_none(), }) } (true, 1, Some(list_style_type), None) => { @@ -82,7 +94,7 @@ Ok(Longhands { list_style_position: position, list_style_image: list_style_image::SpecifiedValue(Either::Second(None_)), - list_style_type: list_style_type::SpecifiedValue::none, + list_style_type: list_style_type_none(), }) } (true, 0, list_style_type, image) => { diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index 98c13948121..97907d7082b 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -8,7 +8,9 @@ use {Atom, Prefix, Namespace}; use context::QuirksMode; -use counter_style::{CounterStyleRule, parse_counter_style_name, parse_counter_style_body}; +use counter_style::{parse_counter_style_name, parse_counter_style_body}; +#[cfg(feature = "servo")] +use counter_style::CounterStyleRuleData; use cssparser::{AtRuleParser, Parser, QualifiedRuleParser}; use cssparser::{AtRuleType, RuleListParser, parse_one_rule, SourceLocation}; use cssparser::ToCss as ParserToCss; @@ -18,7 +20,7 @@ use error_reporting::{ParseErrorReporter, NullReporter}; use font_face::FontFaceRuleData; use font_face::parse_font_face_block; #[cfg(feature = "gecko")] -pub use gecko::rules::FontFaceRule; +pub use gecko::rules::{CounterStyleRule, FontFaceRule}; #[cfg(feature = "gecko")] use gecko_bindings::structs::URLExtraData; #[cfg(feature = "gecko")] @@ -697,6 +699,10 @@ impl ToCssWithGuard for StyleRule { #[cfg(feature = "servo")] pub type FontFaceRule = FontFaceRuleData; +/// A @counter-style rule +#[cfg(feature = "servo")] +pub type CounterStyleRule = CounterStyleRuleData; + #[derive(Debug)] /// A @-moz-document rule pub struct DocumentRule { @@ -1282,7 +1288,7 @@ impl<'a, 'b> AtRuleParser for NestedRuleParser<'a, 'b> { AtRulePrelude::CounterStyle(name) => { let context = ParserContext::new_with_rule_type(self.context, Some(CssRuleType::CounterStyle)); Ok(CssRule::CounterStyle(Arc::new(self.shared_lock.wrap( - parse_counter_style_body(name, &context, input)?)))) + parse_counter_style_body(name, &context, input)?.into())))) } AtRulePrelude::Media(media_queries, location) => { Ok(CssRule::Media(Arc::new(self.shared_lock.wrap(MediaRule { diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 4cb2ce0ad26..d8b76bd01b0 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -14,6 +14,8 @@ use dom::{AnimationRules, TElement}; use element_state::ElementState; use error_reporting::RustLogReporter; use font_metrics::FontMetricsProvider; +#[cfg(feature = "gecko")] +use gecko_bindings::structs::nsIAtom; use keyframes::KeyframesAnimation; use media_queries::Device; use pdqsort::sort_by; @@ -41,7 +43,10 @@ use std::hash::Hash; use std::marker::PhantomData; use style_traits::viewport::ViewportConstraints; use stylearc::Arc; -use stylesheets::{CssRule, FontFaceRule, Origin, StyleRule, Stylesheet, UserAgentStylesheets}; +#[cfg(feature = "gecko")] +use stylesheets::{CounterStyleRule, FontFaceRule}; +use stylesheets::{CssRule, Origin}; +use stylesheets::{StyleRule, Stylesheet, UserAgentStylesheets}; #[cfg(feature = "servo")] use stylesheets::NestedRulesResult; use thread_state; @@ -168,33 +173,44 @@ pub struct Stylist { /// This struct holds data which user of Stylist may want to extract /// from stylesheets which can be done at the same time as updating. +#[cfg(feature = "gecko")] pub struct ExtraStyleData<'a> { /// A list of effective font-face rules and their origin. - #[cfg(feature = "gecko")] pub font_faces: &'a mut Vec<(Arc<Locked<FontFaceRule>>, Origin)>, - - #[allow(missing_docs)] - #[cfg(feature = "servo")] - pub marker: PhantomData<&'a usize>, + /// A map of effective counter-style rules. + pub counter_styles: &'a mut HashMap<Atom, Arc<Locked<CounterStyleRule>>>, } #[cfg(feature = "gecko")] impl<'a> ExtraStyleData<'a> { - /// Clear the internal @font-face rule list. - fn clear_font_faces(&mut self) { + /// Clear the internal data. + fn clear(&mut self) { self.font_faces.clear(); + self.counter_styles.clear(); } /// Add the given @font-face rule. fn add_font_face(&mut self, rule: &Arc<Locked<FontFaceRule>>, origin: Origin) { self.font_faces.push((rule.clone(), origin)); } + + /// Add the given @counter-style rule. + fn add_counter_style(&mut self, guard: &SharedRwLockReadGuard, + rule: &Arc<Locked<CounterStyleRule>>) { + let name = rule.read_with(guard).mName.raw::<nsIAtom>().into(); + self.counter_styles.insert(name, rule.clone()); + } +} + +#[allow(missing_docs)] +#[cfg(feature = "servo")] +pub struct ExtraStyleData<'a> { + pub marker: PhantomData<&'a usize>, } #[cfg(feature = "servo")] impl<'a> ExtraStyleData<'a> { - fn clear_font_faces(&mut self) {} - fn add_font_face(&mut self, _: &Arc<Locked<FontFaceRule>>, _: Origin) {} + fn clear(&mut self) {} } impl Stylist { @@ -343,7 +359,7 @@ impl Stylist { self.pseudos_map.insert(pseudo, PerPseudoElementSelectorMap::new()); }); - extra_data.clear_font_faces(); + extra_data.clear(); if let Some(ua_stylesheets) = ua_stylesheets { for stylesheet in &ua_stylesheets.user_or_user_agent_stylesheets { @@ -443,9 +459,14 @@ impl Stylist { self.animations.insert(keyframes_rule.name.as_atom().clone(), animation); } } + #[cfg(feature = "gecko")] CssRule::FontFace(ref rule) => { extra_data.add_font_face(&rule, stylesheet.origin); } + #[cfg(feature = "gecko")] + CssRule::CounterStyle(ref rule) => { + extra_data.add_counter_style(guard, &rule); + } // We don't care about any other rule. _ => {} } diff --git a/components/style/values/generics/mod.rs b/components/style/values/generics/mod.rs index 604d6e21238..9ad4668f4da 100644 --- a/components/style/values/generics/mod.rs +++ b/components/style/values/generics/mod.rs @@ -5,9 +5,13 @@ //! Generic types that share their serialization implementations //! for both specified and computed values. +use counter_style::parse_counter_style_name; +use cssparser::Parser; use euclid::size::Size2D; +use parser::{Parse, ParserContext}; use std::fmt; use style_traits::ToCss; +use super::CustomIdent; use super::HasViewportPercentage; use super::computed::{Context, ToComputedValue}; @@ -75,3 +79,49 @@ impl<L: ToComputedValue> ToComputedValue for BorderRadiusSize<L> { BorderRadiusSize(Size2D::new(w, h)) } } + +/// https://drafts.csswg.org/css-counter-styles/#typedef-counter-style +/// +/// Since wherever <counter-style> is used, 'none' is a valid value as +/// well, we combine them into one type to make code simpler. +#[derive(Clone, PartialEq, Eq, Debug)] +pub enum CounterStyleOrNone { + /// none + None_, + /// <counter-style-name> + Name(CustomIdent), +} + +impl CounterStyleOrNone { + /// disc value + pub fn disc() -> Self { + CounterStyleOrNone::Name(CustomIdent(atom!("disc"))) + } + + /// decimal value + pub fn decimal() -> Self { + CounterStyleOrNone::Name(CustomIdent(atom!("decimal"))) + } +} + +no_viewport_percentage!(CounterStyleOrNone); + +impl Parse for CounterStyleOrNone { + fn parse(_: &ParserContext, input: &mut Parser) -> Result<Self, ()> { + input.try(|input| { + parse_counter_style_name(input).map(CounterStyleOrNone::Name) + }).or_else(|_| { + input.expect_ident_matching("none").map(|_| CounterStyleOrNone::None_) + }) + } +} + +impl ToCss for CounterStyleOrNone { + #[inline] + fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + match self { + &CounterStyleOrNone::None_ => dest.write_str("none"), + &CounterStyleOrNone::Name(ref name) => name.to_css(dest), + } + } +} diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 1a673afc790..f7aca89a524 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -61,7 +61,8 @@ use style::gecko_bindings::structs; use style::gecko_bindings::structs::{CSSPseudoElementType, CompositeOperation}; use style::gecko_bindings::structs::{RawServoStyleRule, ServoStyleSheet}; use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom, nsCSSPropertyID}; -use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint, nsCSSFontFaceRule}; +use style::gecko_bindings::structs::{nsCSSFontFaceRule, nsCSSCounterStyleRule}; +use style::gecko_bindings::structs::{nsRestyleHint, nsChangeHint}; use style::gecko_bindings::structs::Loader; use style::gecko_bindings::structs::RawGeckoPresContextOwned; use style::gecko_bindings::structs::ServoElementSnapshotTable; @@ -871,19 +872,28 @@ impl_group_rule_funcs! { (Document, DocumentRule, RawServoDocumentRule), to_css: Servo_DocumentRule_GetCssText, } -#[no_mangle] -pub extern "C" fn Servo_CssRules_GetFontFaceRuleAt(rules: ServoCssRulesBorrowed, index: u32) - -> *mut nsCSSFontFaceRule -{ - let global_style_data = &*GLOBAL_STYLE_DATA; - let guard = global_style_data.shared_lock.read(); - let rules = Locked::<CssRules>::as_arc(&rules).read_with(&guard); - match rules.0[index as usize] { - CssRule::FontFace(ref rule) => rule.read_with(&guard).get(), - _ => unreachable!("Servo_CssRules_GetFontFaceRuleAt should only be called on a FontFace rule"), +macro_rules! impl_getter_for_embedded_rule { + ($getter:ident: $name:ident -> $ty:ty) => { + #[no_mangle] + pub extern "C" fn $getter(rules: ServoCssRulesBorrowed, index: u32) -> *mut $ty + { + let global_style_data = &*GLOBAL_STYLE_DATA; + let guard = global_style_data.shared_lock.read(); + let rules = Locked::<CssRules>::as_arc(&rules).read_with(&guard); + match rules.0[index as usize] { + CssRule::$name(ref rule) => rule.read_with(&guard).get(), + _ => unreachable!(concat!(stringify!($getter), " should only be called on a ", + stringify!($name), " rule")), + } + } } } +impl_getter_for_embedded_rule!(Servo_CssRules_GetFontFaceRuleAt: + FontFace -> nsCSSFontFaceRule); +impl_getter_for_embedded_rule!(Servo_CssRules_GetCounterStyleRuleAt: + CounterStyle -> nsCSSCounterStyleRule); + #[no_mangle] pub extern "C" fn Servo_StyleRule_GetStyle(rule: RawServoStyleRuleBorrowed) -> RawServoDeclarationBlockStrong { read_locked_arc(rule, |rule: &StyleRule| { @@ -2375,6 +2385,19 @@ pub extern "C" fn Servo_StyleSet_GetFontFaceRules(raw_data: RawServoStyleSetBorr } #[no_mangle] +pub extern "C" fn Servo_StyleSet_GetCounterStyleRule(raw_data: RawServoStyleSetBorrowed, + name: *mut nsIAtom) -> *mut nsCSSCounterStyleRule { + let data = PerDocumentStyleData::from_ffi(raw_data).borrow(); + unsafe { + Atom::with(name, |name| data.counter_styles.get(name)) + }.map(|rule| { + let global_style_data = &*GLOBAL_STYLE_DATA; + let guard = global_style_data.shared_lock.read(); + rule.read_with(&guard).get() + }).unwrap_or(ptr::null_mut()) +} + +#[no_mangle] pub extern "C" fn Servo_StyleSet_ResolveForDeclarations(raw_data: RawServoStyleSetBorrowed, parent_style_or_null: ServoComputedValuesBorrowedOrNull, declarations: RawServoDeclarationBlockBorrowed) @@ -2401,7 +2424,7 @@ pub extern "C" fn Servo_StyleSet_ResolveForDeclarations(raw_data: RawServoStyleS pub extern "C" fn Servo_StyleSet_MightHaveAttributeDependency(raw_data: RawServoStyleSetBorrowed, local_name: *mut nsIAtom) -> bool { let data = PerDocumentStyleData::from_ffi(raw_data).borrow(); - unsafe { Atom::with(local_name, &mut |atom| data.stylist.might_have_attribute_dependency(atom)) } + unsafe { Atom::with(local_name, |atom| data.stylist.might_have_attribute_dependency(atom)) } } #[no_mangle] |