diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index bb74bc30ac8..f617c388381 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -1052,6 +1052,8 @@ 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 { @@ -1143,8 +1145,9 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = + root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1211,9 +1214,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<::std::os::raw::c_char>; + root::nsReadingIterator; pub type nsCStringRepr_iterator = - root::nsWritingIterator<::std::os::raw::c_char>; + root::nsWritingIterator; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -6137,6 +6140,7 @@ pub mod root { assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( Runnable ) )); } + pub type Preferences_PrefSetting = root::mozilla::dom::PrefSetting; #[repr(C)] #[derive(Debug)] pub struct CycleCollectedJSContext_RunInMetastableStateData { @@ -8176,6 +8180,8 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } + pub type ComputedKeyframeValues = + root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_open0_RawServoStyleSet_close0_instantiation() { assert_eq!(::std::mem::size_of::() , @@ -11301,6 +11307,11 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } + pub type WarningReporter = + ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -11406,6 +11417,140 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } + /// Describes a single error or warning that occurs in the execution of script. + #[repr(C)] + #[derive(Debug)] + pub struct JSErrorReport { + pub _base: root::JSErrorBase, + pub linebuf_: *const u16, + pub linebufLength_: usize, + pub tokenOffset_: usize, + pub notes: root::mozilla::UniquePtr, + 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::() , 72usize , concat ! + ( "Size of: " , stringify ! ( JSErrorReport ) )); + assert_eq! (::std::mem::align_of::() , 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 mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 1u64 as u8; + let val = (unit_field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_isMuted(&mut self, val: bool) { + let mask = 1u64 as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 0usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn ownsLinebuf_(&self) -> bool { + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 2u64 as u8; + let val = (unit_field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_ownsLinebuf_(&mut self, val: bool) { + let mask = 2u64 as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 1usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn new_bitfield_1(isMuted: bool, ownsLinebuf_: bool) -> u8 { + ({ ({ 0 } | ((isMuted as u8 as u8) << 0usize) & (1u64 as u8)) } | + ((ownsLinebuf_ as u8 as u8) << 1usize) & (2u64 as u8)) + } + } #[repr(C)] #[derive(Debug)] pub struct nsCOMPtr { @@ -12148,7 +12293,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, + pub featureSelectors: root::nsTArray, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -12253,7 +12398,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<::std::os::raw::c_uint>, + pub mValues: root::nsTArray, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -12358,7 +12503,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -13821,6 +13966,7 @@ pub mod root { pub mAlignItems: u8, pub mAlignSelf: u8, pub mJustifyContent: u16, + pub mSpecifiedJustifyItems: u8, pub mJustifyItems: u8, pub mJustifySelf: u8, pub mFlexDirection: u8, @@ -13948,29 +14094,35 @@ pub mod root { as * const _ as usize } , 246usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mJustifyContent ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsStylePosition ) ) . + mSpecifiedJustifyItems as * const _ as usize } , 248usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsStylePosition ) , + "::" , stringify ! ( mSpecifiedJustifyItems ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mJustifyItems - as * const _ as usize } , 248usize , concat ! ( + as * const _ as usize } , 249usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mJustifyItems ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mJustifySelf as - * const _ as usize } , 249usize , concat ! ( + * const _ as usize } , 250usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mJustifySelf ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mFlexDirection - as * const _ as usize } , 250usize , concat ! ( + as * const _ as usize } , 251usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mFlexDirection ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mFlexWrap as * - const _ as usize } , 251usize , concat ! ( + const _ as usize } , 252usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mFlexWrap ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mObjectFit as * - const _ as usize } , 252usize , concat ! ( + const _ as usize } , 253usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mObjectFit ) )); assert_eq! (unsafe { @@ -16732,7 +16884,7 @@ pub mod root { pub mUpgradeInsecurePreloads: bool, pub mHSTSPrimingURIList: [u64; 6usize], pub mDocumentContainer: u64, - pub mCharacterSet: root::mozilla::NotNull<*const root::mozilla::Encoding>, + pub mCharacterSet: root::mozilla::NotNull<*const root::nsIDocument_Encoding>, pub mCharacterSetSource: i32, pub mParentDocument: *mut root::nsIDocument, pub mCachedRootElement: *mut root::mozilla::dom::Element, @@ -16784,7 +16936,7 @@ pub mod root { /// The current frame request callback handle pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray>, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -19573,7 +19725,7 @@ pub mod root { pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBoundContentSet: u64, - pub mWrapperTable: u64, + pub mWrapperTable: root::nsAutoPtr, pub mDocumentTable: u64, pub mLoadingDocTable: u64, pub mAttachedStack: root::nsBindingList, @@ -23402,7 +23554,7 @@ pub mod root { pub _base_1: root::nsWrapperCache, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, - pub mContent: root::nsCOMPtr, + pub mContent: root::nsCOMPtr, /// Cache of Attrs. pub mAttributeCache: root::nsDOMAttributeMap_AttrCache, } @@ -24781,57 +24933,57 @@ pub mod root { pub struct nsRange { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_TYPE_SPECIFIC_BITS_OFFSET; + 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; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_83 { + pub enum _bindgen_ty_77 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -28557,7 +28709,7 @@ pub mod root { pub mRefCnt: root::nsAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mTabGroup: root::RefPtr, @@ -31735,7 +31887,7 @@ pub mod root { pub type RawGeckoPropertyValuePairList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoStyleAnimationList = root::nsStyleAutoArray; pub type RawGeckoFontFaceRuleList = @@ -32408,46 +32560,46 @@ pub mod root { assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsISMILAttr ) )); } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; + 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_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_85 + 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 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + 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_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_85 { + pub enum _bindgen_ty_79 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -33044,7 +33196,7 @@ pub mod root { "::" , stringify ! ( mArray ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char16_t_close0_instantiation() { + fn __bindgen_test_layout_nsCharTraits_open0_nsStringRepr_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33055,62 +33207,33 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_open0_char16_t_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_open0_char16_t_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_open0_nsStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); + root::nsReadingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_open0_nsStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); + root::nsWritingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char16_t_close0_instantiation_1() { + fn __bindgen_test_layout_nsCharTraits_open0_nsCStringRepr_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33121,7 +33244,44 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char_close0_instantiation_1() { + fn __bindgen_test_layout_nsReadingIterator_open0_nsCStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsWritingIterator_open0_nsCStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_open0_nsSubstringTuple_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_open0_nsCSubstringTuple_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33222,26 +33382,26 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxFontFeatureValueSet_ValueList_close0_instantiation() { @@ -33257,26 +33417,26 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_3() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxAlternateValue_close0_instantiation() { @@ -33312,18 +33472,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224358_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_200733_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33613,7 +33773,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226138_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_202510_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33774,7 +33934,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_231696__bindgen_ty_id_231703_close0_instantiation() { + fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_208042__bindgen_ty_id_208049_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34000,15 +34160,15 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_234184_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210516_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation() { @@ -34068,15 +34228,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_234486_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210818_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation_1() { @@ -34180,16 +34340,16 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_235028_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_211360_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); - assert_eq!(::std::mem::align_of::>() + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); } #[test] @@ -34391,28 +34551,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIWeakReference_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_nsWeakPtr_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocumentEncoder_close0_instantiation() { @@ -34562,7 +34709,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_235443_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211772_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34652,7 +34799,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_235849_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_212178_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34753,7 +34900,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236823_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213149_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34784,13 +34931,17 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsInterfaceHashtable_open1_nsISupportsHashKey_nsIXPConnectWrappedJS_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) + fn __bindgen_test_layout_nsAutoPtr_open0_nsBindingManager_WrapperHashtable_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsAutoPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - u64 ) )); + root::nsAutoPtr ) + )); } #[test] fn __bindgen_test_layout_nsAutoPtr_open0_nsRefPtrHashtable_open1_nsURIHashKey_nsXBLDocumentInfo_close1_close0_instantiation() { @@ -34842,7 +34993,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237128_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213451_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34853,7 +35004,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237133_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213456_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34921,7 +35072,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_237630_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_213949_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35299,15 +35450,15 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_Element_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsCOMPtr_open0_nsDOMAttributeMap_Element_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); + root::nsCOMPtr ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_StyleSheet_close1_close0_instantiation_3() { @@ -35558,7 +35709,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation_1() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35569,7 +35720,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240489_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_216806_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35648,7 +35799,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_246841_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223112_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35681,7 +35832,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_248026_close0_instantiation() { + fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_224297_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35692,7 +35843,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_248030_close0_instantiation() { + fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_224301_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35714,7 +35865,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_248037_close0_instantiation() { + fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_224308_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35793,7 +35944,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_249142_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_225487_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35988,7 +36139,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_250590_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226935_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36093,7 +36244,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_253013_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_229352_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36181,15 +36332,15 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_ImageURL_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_RefPtr_open0_imgRequestProxy_ImageURL_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); + root::RefPtr ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadGroup_close0_instantiation() { @@ -36737,7 +36888,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_255082_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231419_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36974,7 +37125,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_262887_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239115_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36985,7 +37136,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_262892_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239120_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37073,7 +37224,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_263005_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_239233_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37360,7 +37511,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_264583_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240822_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37382,7 +37533,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_264745_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240982_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37393,7 +37544,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_264750_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240987_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37459,18 +37610,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_266794_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243031_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37481,7 +37632,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_266802_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_243039_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 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 eff112d9128..5fbe19a5847 100644 --- a/components/style/gecko/generated/structs_release.rs +++ b/components/style/gecko/generated/structs_release.rs @@ -1052,6 +1052,8 @@ 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 { @@ -1143,8 +1145,9 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = + root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1211,9 +1214,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator<::std::os::raw::c_char>; + root::nsReadingIterator; pub type nsCStringRepr_iterator = - root::nsWritingIterator<::std::os::raw::c_char>; + root::nsWritingIterator; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -6018,6 +6021,7 @@ pub mod root { assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( Runnable ) )); } + pub type Preferences_PrefSetting = root::mozilla::dom::PrefSetting; #[repr(C)] #[derive(Debug)] pub struct CycleCollectedJSContext_RunInMetastableStateData { @@ -8022,6 +8026,8 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } + pub type ComputedKeyframeValues = + root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_open0_RawServoStyleSet_close0_instantiation() { assert_eq!(::std::mem::size_of::() , @@ -11125,6 +11131,11 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } + pub type WarningReporter = + ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -11222,6 +11233,140 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } + /// Describes a single error or warning that occurs in the execution of script. + #[repr(C)] + #[derive(Debug)] + pub struct JSErrorReport { + pub _base: root::JSErrorBase, + pub linebuf_: *const u16, + pub linebufLength_: usize, + pub tokenOffset_: usize, + pub notes: root::mozilla::UniquePtr, + 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::() , 72usize , concat ! + ( "Size of: " , stringify ! ( JSErrorReport ) )); + assert_eq! (::std::mem::align_of::() , 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 mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 1u64 as u8; + let val = (unit_field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_isMuted(&mut self, val: bool) { + let mask = 1u64 as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 0usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn ownsLinebuf_(&self) -> bool { + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + let mask = 2u64 as u8; + let val = (unit_field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_ownsLinebuf_(&mut self, val: bool) { + let mask = 2u64 as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::uninitialized() }; + unsafe { + ::std::ptr::copy_nonoverlapping(&self._bitfield_1 as *const _ + as *const u8, + &mut unit_field_val as *mut u8 + as *mut u8, + ::std::mem::size_of::()) + }; + unit_field_val &= !mask; + unit_field_val |= (val << 1usize) & mask; + unsafe { + ::std::ptr::copy_nonoverlapping(&unit_field_val as *const _ as + *const u8, + &mut self._bitfield_1 as + *mut _ as *mut u8, + ::std::mem::size_of::()); + } + } + #[inline] + pub fn new_bitfield_1(isMuted: bool, ownsLinebuf_: bool) -> u8 { + ({ ({ 0 } | ((isMuted as u8 as u8) << 0usize) & (1u64 as u8)) } | + ((ownsLinebuf_ as u8 as u8) << 1usize) & (2u64 as u8)) + } + } /// Factors implementation for all template versions of nsCOMPtr. /// /// Here's the way people normally do things like this: @@ -11946,7 +12091,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, + pub featureSelectors: root::nsTArray, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -12051,7 +12196,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray<::std::os::raw::c_uint>, + pub mValues: root::nsTArray, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -12149,7 +12294,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -13612,6 +13757,7 @@ pub mod root { pub mAlignItems: u8, pub mAlignSelf: u8, pub mJustifyContent: u16, + pub mSpecifiedJustifyItems: u8, pub mJustifyItems: u8, pub mJustifySelf: u8, pub mFlexDirection: u8, @@ -13739,29 +13885,35 @@ pub mod root { as * const _ as usize } , 246usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mJustifyContent ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const nsStylePosition ) ) . + mSpecifiedJustifyItems as * const _ as usize } , 248usize + , concat ! ( + "Alignment of field: " , stringify ! ( nsStylePosition ) , + "::" , stringify ! ( mSpecifiedJustifyItems ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mJustifyItems - as * const _ as usize } , 248usize , concat ! ( + as * const _ as usize } , 249usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mJustifyItems ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mJustifySelf as - * const _ as usize } , 249usize , concat ! ( + * const _ as usize } , 250usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mJustifySelf ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mFlexDirection - as * const _ as usize } , 250usize , concat ! ( + as * const _ as usize } , 251usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mFlexDirection ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mFlexWrap as * - const _ as usize } , 251usize , concat ! ( + const _ as usize } , 252usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mFlexWrap ) )); assert_eq! (unsafe { & ( * ( 0 as * const nsStylePosition ) ) . mObjectFit as * - const _ as usize } , 252usize , concat ! ( + const _ as usize } , 253usize , concat ! ( "Alignment of field: " , stringify ! ( nsStylePosition ) , "::" , stringify ! ( mObjectFit ) )); assert_eq! (unsafe { @@ -16501,7 +16653,7 @@ pub mod root { pub mUpgradeInsecurePreloads: bool, pub mHSTSPrimingURIList: [u64; 5usize], pub mDocumentContainer: u64, - pub mCharacterSet: root::mozilla::NotNull<*const root::mozilla::Encoding>, + pub mCharacterSet: root::mozilla::NotNull<*const root::nsIDocument_Encoding>, pub mCharacterSetSource: i32, pub mParentDocument: *mut root::nsIDocument, pub mCachedRootElement: *mut root::mozilla::dom::Element, @@ -16550,7 +16702,7 @@ pub mod root { /// The current frame request callback handle pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -19338,7 +19490,7 @@ pub mod root { pub _base: root::nsStubMutationObserver, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub mBoundContentSet: u64, - pub mWrapperTable: u64, + pub mWrapperTable: root::nsAutoPtr, pub mDocumentTable: u64, pub mLoadingDocTable: u64, pub mAttachedStack: root::nsBindingList, @@ -24385,57 +24537,57 @@ pub mod root { pub struct nsRange { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_83 = - _bindgen_ty_83::NODE_TYPE_SPECIFIC_BITS_OFFSET; + 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; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_83 { + pub enum _bindgen_ty_77 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -28124,7 +28276,7 @@ pub mod root { pub _base_4: root::nsITimedChannel, pub mRefCnt: root::nsAutoRefCnt, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mTabGroup: root::RefPtr, @@ -31243,7 +31395,7 @@ pub mod root { pub type RawGeckoPropertyValuePairList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray>; + root::nsTArray; pub type RawGeckoStyleAnimationList = root::nsStyleAutoArray; pub type RawGeckoFontFaceRuleList = @@ -31916,46 +32068,46 @@ pub mod root { assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( nsISMILAttr ) )); } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; + 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_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_85 + 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 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_79::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_85 = - _bindgen_ty_85::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + 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_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_79 = + _bindgen_ty_79::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_85 { + pub enum _bindgen_ty_79 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -32552,7 +32704,7 @@ pub mod root { "::" , stringify ! ( mArray ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char16_t_close0_instantiation() { + fn __bindgen_test_layout_nsCharTraits_open0_nsStringRepr_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32563,62 +32715,33 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_open0_char16_t_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsWritingIterator_open0_char16_t_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , - 24usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator ) )); - } - #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCharTraits ) )); - } - #[test] - fn __bindgen_test_layout_nsReadingIterator_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_open0_nsStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator<::std::os::raw::c_char> ) )); + root::nsReadingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_open0_char_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_open0_nsStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator<::std::os::raw::c_char> ) )); + root::nsWritingIterator + ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char16_t_close0_instantiation_1() { + fn __bindgen_test_layout_nsCharTraits_open0_nsCStringRepr_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32629,7 +32752,44 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_open0_char_close0_instantiation_1() { + fn __bindgen_test_layout_nsReadingIterator_open0_nsCStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsReadingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsWritingIterator_open0_nsCStringRepr_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 24usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsWritingIterator + ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_open0_nsSubstringTuple_char_type_close0_instantiation() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCharTraits ) )); + } + #[test] + fn __bindgen_test_layout_nsCharTraits_open0_nsCSubstringTuple_char_type_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32730,26 +32890,26 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxFontFeatureValueSet_ValueList_close0_instantiation() { @@ -32765,26 +32925,26 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_2() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_2() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_unsigned_int_close0_instantiation_3() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_open0_uint32_t_close0_instantiation_3() { + assert_eq!(::std::mem::size_of::>() , 8usize , + concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , + concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::std::os::raw::c_uint> ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_gfxAlternateValue_close0_instantiation() { @@ -32820,18 +32980,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_222084_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_198460_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33121,7 +33281,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223830_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_200203_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33282,7 +33442,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_229360__bindgen_ty_id_229367_close0_instantiation() { + fn __bindgen_test_layout_iterator_open0_input_iterator_tag_UniquePtr_open1_JSErrorNotes_Note_DeletePolicy_open2_JSErrorNotes_Note_close2_close1_long__bindgen_ty_id_205707__bindgen_ty_id_205714_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33508,15 +33668,15 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_231846_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_208179_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation() { @@ -33576,15 +33736,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_232148_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_208481_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray<*mut root::nsIDocument_Element> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::dom::Element> ) )); + root::nsTArray<*mut root::nsIDocument_Element> ) )); } #[test] fn __bindgen_test_layout_nsTArray_open0_RefPtr_open1_Element_close1_close0_instantiation_1() { @@ -33688,16 +33848,16 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_232690_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_NotNull_open0__bindgen_ty_id_209023_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); - assert_eq!(::std::mem::align_of::>() + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::mozilla::NotNull<*const root::mozilla::Encoding> ) + root::mozilla::NotNull<*const root::nsIDocument_Encoding> ) )); } #[test] @@ -33899,26 +34059,15 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_nsCOMPtr_open1_nsIWeakReference_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() , + fn __bindgen_test_layout_nsTArray_open0_nsWeakPtr_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); + root::nsTArray ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsIDocumentEncoder_close0_instantiation() { @@ -34068,7 +34217,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_233103_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_209433_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34158,7 +34307,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_233507_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_209837_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34259,7 +34408,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_234471_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_210798_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34290,13 +34439,17 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_open0_nsInterfaceHashtable_open1_nsISupportsHashKey_nsIXPConnectWrappedJS_close1_close0_instantiation() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) + fn __bindgen_test_layout_nsAutoPtr_open0_nsBindingManager_WrapperHashtable_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsAutoPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - u64 ) )); + root::nsAutoPtr ) + )); } #[test] fn __bindgen_test_layout_nsAutoPtr_open0_nsRefPtrHashtable_open1_nsURIHashKey_nsXBLDocumentInfo_close1_close0_instantiation() { @@ -34348,7 +34501,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_234774_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211098_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34359,7 +34512,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_234779_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211103_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34427,7 +34580,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_235260_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_211580_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34803,7 +34956,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_Element_close0_instantiation() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsDOMAttributeMap_Element_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35051,7 +35204,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation_1() { + fn __bindgen_test_layout_nsCOMPtr_open0_nsIWeakReference_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35062,7 +35215,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238089_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_214407_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35141,7 +35294,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_244424_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_220696_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35174,7 +35327,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_245609_close0_instantiation() { + fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_221881_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35185,7 +35338,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_245613_close0_instantiation() { + fn __bindgen_test_layout_Heap_open0__bindgen_ty_id_221885_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35207,7 +35360,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_245620_close0_instantiation() { + fn __bindgen_test_layout_TenuredHeap_open0__bindgen_ty_id_221892_close0_instantiation() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35286,7 +35439,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_246725_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_223071_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35481,7 +35634,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_248173_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_224519_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35586,7 +35739,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_250561_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_226901_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35674,15 +35827,15 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_RefPtr_open0_ImageURL_close0_instantiation() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_RefPtr_open0_imgRequestProxy_ImageURL_close0_instantiation() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); + root::RefPtr ) )); } #[test] fn __bindgen_test_layout_nsCOMPtr_open0_nsILoadGroup_close0_instantiation() { @@ -36230,7 +36383,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_252554_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_228892_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36467,7 +36620,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_260359_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236588_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36478,7 +36631,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_260364_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236593_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36566,7 +36719,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_260477_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_236706_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36853,7 +37006,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_262049_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238289_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36875,7 +37028,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_262207_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238445_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36886,7 +37039,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_262212_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_238450_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36952,18 +37105,18 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0_FontVariation_close0_instantiation_1() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsTArray_open0_gfxFontVariation_close0_instantiation_1() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_264248_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240486_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36974,7 +37127,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_264254_close0_instantiation() { + fn __bindgen_test_layout_nsTArray_open0__bindgen_ty_id_240492_close0_instantiation() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/components/style/matching.rs b/components/style/matching.rs index 71ec40b7988..b62bc54bf76 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -324,15 +324,19 @@ trait PrivateMatchMethods: TElement { restyle.damage |= difference.damage; } + // We need to cascade the children in order to ensure the correct + // propagation of computed value flags. + // + // FIXME(emilio): If we start optimizing changes to reset-only + // properties that aren't explicitly inherited, we'd need to add a flag + // to handle justify-items: auto correctly when there's a legacy + // justify-items. + if old_values.flags != new_values.flags { + return ChildCascadeRequirement::MustCascadeChildren; + } + match difference.change { - StyleChange::Unchanged => { - // We need to cascade the children in order to ensure the - // correct propagation of computed value flags. - if old_values.flags != new_values.flags { - return ChildCascadeRequirement::MustCascadeChildren; - } - ChildCascadeRequirement::CanSkipCascade - }, + StyleChange::Unchanged => ChildCascadeRequirement::CanSkipCascade, StyleChange::Changed => ChildCascadeRequirement::MustCascadeChildren, } } diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 24bf2471633..9a2ab2135fc 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -60,7 +60,7 @@ use selector_parser::PseudoElement; use servo_arc::{Arc, RawOffsetArc}; use std::mem::{forget, uninitialized, transmute, zeroed}; use std::{cmp, ops, ptr}; -use values::{Auto, CustomIdent, Either, KeyframesName}; +use values::{self, Auto, CustomIdent, Either, KeyframesName}; use values::computed::ToComputedValue; use values::computed::effects::{BoxShadow, Filter, SimpleShadow}; use values::computed::length::Percentage; @@ -398,6 +398,11 @@ impl ${style_struct.gecko_struct_name} { self.${on_set}(); % endif } + + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } <%def name="impl_coord_copy(ident, gecko_ffi_name)"> @@ -405,6 +410,11 @@ impl ${style_struct.gecko_struct_name} { pub fn copy_${ident}_from(&mut self, other: &Self) { self.gecko.${gecko_ffi_name}.copy_from(&other.gecko.${gecko_ffi_name}); } + + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } <%! @@ -482,6 +492,11 @@ def set_gecko_property(ffi_name, expr): let color = ${get_gecko_property(gecko_ffi_name, self_param = "other")}; ${set_gecko_property(gecko_ffi_name, "color")}; } + + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } <%def name="impl_color_clone(ident, gecko_ffi_name)"> @@ -610,6 +625,11 @@ def set_gecko_property(ffi_name, expr): } } + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } + #[allow(non_snake_case)] pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T { use values::generics::{SVGPaint, SVGPaintKind}; @@ -673,12 +693,20 @@ def set_gecko_property(ffi_name, expr): // // In practice, this means that we may have an incorrect value here, but // we'll adjust that properly in the style fixup phase. + // + // FIXME(emilio): We could clean this up a bit special-casing the reset_ + // function below. self.gecko.${gecko_ffi_name} = other.gecko.${inherit_from}; % else: self.gecko.${gecko_ffi_name} = other.gecko.${gecko_ffi_name}; % endif } + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } + %if need_clone: #[allow(non_snake_case)] pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T { @@ -696,6 +724,10 @@ def set_gecko_property(ffi_name, expr): pub fn copy_${ident}_from(&mut self, other: &Self) { self.gecko.${gecko_ffi_name}.data_at_mut(${index}).copy_from(&other.gecko.${gecko_ffi_name}.data_at(${index})); } + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } % if need_clone: #[allow(non_snake_case)] pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T { @@ -715,6 +747,10 @@ def set_gecko_property(ffi_name, expr): pub fn copy_${ident}_from(&mut self, other: &Self) { self.gecko.${gecko_ffi_name}.copy_from(&other.gecko.${gecko_ffi_name}); } + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } % if need_clone: #[allow(non_snake_case)] pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T { @@ -752,6 +788,11 @@ def set_gecko_property(ffi_name, expr): % endfor ${ caller.body() } } + + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } <%def name="impl_corner_style_coord(ident, gecko_ffi_name, x_index, y_index, need_clone)"> @@ -767,6 +808,10 @@ def set_gecko_property(ffi_name, expr): self.gecko.${gecko_ffi_name}.data_at_mut(${y_index}) .copy_from(&other.gecko.${gecko_ffi_name}.data_at(${y_index})); } + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } % if need_clone: #[allow(non_snake_case)] pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T { @@ -811,6 +856,10 @@ def set_gecko_property(ffi_name, expr): self.gecko.${gecko_ffi_name}.set(&other.gecko.${gecko_ffi_name}); } } + #[allow(non_snake_case)] + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } % if need_clone: pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T { use values::specified::url::SpecifiedUrl; @@ -989,6 +1038,10 @@ impl ${style_struct.gecko_struct_name} { pub fn copy_${longhand.ident}_from(&mut self, _: &Self) { warn!("stylo: Unimplemented property setter: ${longhand.name}"); } + #[allow(non_snake_case)] + pub fn reset_${longhand.ident}(&mut self, other: &Self) { + self.copy_${longhand.ident}_from(other) + } % if longhand.need_clone: #[allow(non_snake_case)] pub fn clone_${longhand.ident}(&self) -> longhands::${longhand.ident}::computed_value::T { @@ -1164,6 +1217,11 @@ fn static_assert() { } } + #[allow(non_snake_case)] + pub fn reset__moz_border_${side.ident}_colors(&mut self, other: &Self) { + self.copy__moz_border_${side.ident}_colors_from(other) + } + #[allow(non_snake_case)] pub fn clone__moz_border_${side.ident}_colors(&self) -> longhands::_moz_border_${side.ident}_colors::computed_value::T { @@ -1215,6 +1273,10 @@ fn static_assert() { } } + pub fn reset_border_image_source(&mut self, other: &Self) { + self.copy_border_image_source_from(other) + } + pub fn clone_border_image_source(&self) -> longhands::border_image_source::computed_value::T { use values::None_; @@ -1250,6 +1312,10 @@ fn static_assert() { self.gecko.mBorderImageRepeatV = other.gecko.mBorderImageRepeatV; } + pub fn reset_border_image_repeat(&mut self, other: &Self) { + self.copy_border_image_repeat_from(other) + } + pub fn clone_border_image_repeat(&self) -> longhands::border_image_repeat::computed_value::T { use properties::longhands::border_image_repeat::computed_value::RepeatKeyword; use gecko_bindings::structs; @@ -1352,6 +1418,10 @@ fn static_assert() { } } + pub fn reset_z_index(&mut self, other: &Self) { + self.copy_z_index_from(other) + } + pub fn clone_z_index(&self) -> longhands::z_index::computed_value::T { return match self.gecko.mZIndex.as_value() { CoordDataValue::Integer(n) => Either::First(n), @@ -1366,8 +1436,35 @@ fn static_assert() { % for kind in ["align", "justify"]: ${impl_simple_type_with_conversion(kind + "_content")} ${impl_simple_type_with_conversion(kind + "_self")} - ${impl_simple_type_with_conversion(kind + "_items")} % endfor + ${impl_simple_type_with_conversion("align_items")} + + pub fn set_justify_items(&mut self, v: longhands::justify_items::computed_value::T) { + self.gecko.mSpecifiedJustifyItems = v.specified.into(); + self.set_computed_justify_items(v.computed); + } + + pub fn set_computed_justify_items(&mut self, v: values::specified::JustifyItems) { + debug_assert!(v.0 != ::values::specified::align::ALIGN_AUTO); + self.gecko.mJustifyItems = v.into(); + } + + pub fn reset_justify_items(&mut self, reset_style: &Self) { + self.gecko.mJustifyItems = reset_style.gecko.mJustifyItems; + self.gecko.mSpecifiedJustifyItems = reset_style.gecko.mSpecifiedJustifyItems; + } + + pub fn copy_justify_items_from(&mut self, other: &Self) { + self.gecko.mJustifyItems = other.gecko.mJustifyItems; + self.gecko.mSpecifiedJustifyItems = other.gecko.mJustifyItems; + } + + pub fn clone_justify_items(&self) -> longhands::justify_items::computed_value::T { + longhands::justify_items::computed_value::T { + computed: self.gecko.mJustifyItems.into(), + specified: self.gecko.mSpecifiedJustifyItems.into(), + } + } pub fn set_order(&mut self, v: longhands::order::computed_value::T) { self.gecko.mOrder = v; @@ -1399,6 +1496,10 @@ fn static_assert() { self.gecko.${value.gecko}.mLineName.assign(&*other.gecko.${value.gecko}.mLineName); } + pub fn reset_${value.name}(&mut self, other: &Self) { + self.copy_${value.name}_from(other) + } + pub fn clone_${value.name}(&self) -> longhands::${value.name}::computed_value::T { use gecko_bindings::structs::{nsStyleGridLine_kMinLine, nsStyleGridLine_kMaxLine}; use string_cache::Atom; @@ -1437,6 +1538,10 @@ fn static_assert() { self.gecko.mGridAuto${kind.title()}Max.copy_from(&other.gecko.mGridAuto${kind.title()}Max); } + pub fn reset_grid_auto_${kind}(&mut self, other: &Self) { + self.copy_grid_auto_${kind}_from(other) + } + pub fn clone_grid_auto_${kind}(&self) -> longhands::grid_auto_${kind}::computed_value::T { ::values::generics::grid::TrackSize::from_gecko_style_coords(&self.gecko.mGridAuto${kind.title()}Min, &self.gecko.mGridAuto${kind.title()}Max) @@ -1574,6 +1679,10 @@ fn static_assert() { &other.gecko.mGridTemplate${kind.title()}); } } + + pub fn reset_grid_template_${kind}(&mut self, other: &Self) { + self.copy_grid_template_${kind}_from(other) + } % endfor ${impl_simple_type_with_conversion("grid_auto_flow")} @@ -1613,6 +1722,10 @@ fn static_assert() { pub fn copy_grid_template_areas_from(&mut self, other: &Self) { unsafe { self.gecko.mGridTemplateAreas.set(&other.gecko.mGridTemplateAreas) } } + + pub fn reset_grid_template_areas(&mut self, other: &Self) { + self.copy_grid_template_areas_from(other) + } <% skip_outline_longhands = " ".join("outline-style outline-width".split() + @@ -1647,6 +1760,11 @@ fn static_assert() { self.gecko.mOutlineStyle = other.gecko.mOutlineStyle; } + #[allow(non_snake_case)] + pub fn reset_outline_style(&mut self, other: &Self) { + self.copy_outline_style_from(other) + } + #[allow(non_snake_case)] pub fn clone_outline_style(&self) -> longhands::outline_style::computed_value::T { // FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts @@ -1710,7 +1828,7 @@ fn static_assert() { }; } - pub fn copy_font_feature_settings_from(&mut self, other: &Self ) { + pub fn copy_font_feature_settings_from(&mut self, other: &Self) { let current_settings = &mut self.gecko.mFont.fontFeatureSettings; let feature_settings = &other.gecko.mFont.fontFeatureSettings; let settings_length = feature_settings.len() as u32; @@ -1724,6 +1842,10 @@ fn static_assert() { } } + pub fn reset_font_feature_settings(&mut self, other: &Self) { + self.copy_font_feature_settings_from(other) + } + pub fn clone_font_feature_settings(&self) -> longhands::font_feature_settings::computed_value::T { use values::generics::{FontSettings, FontSettingTag, FontSettingTagInt} ; @@ -1775,6 +1897,10 @@ fn static_assert() { } } + pub fn reset_font_variation_settings(&mut self, other: &Self) { + self.copy_font_variation_settings_from(other) + } + pub fn fixup_none_generic(&mut self, device: &Device) { unsafe { bindings::Gecko_nsStyleFont_FixupNoneGeneric(&mut self.gecko, device.pres_context()) @@ -1818,6 +1944,10 @@ fn static_assert() { self.gecko.mGenericID = other.gecko.mGenericID; } + pub fn reset_font_family(&mut self, other: &Self) { + self.copy_font_family_from(other) + } + pub fn clone_font_family(&self) -> longhands::font_family::computed_value::T { use properties::longhands::font_family::computed_value::{FontFamily, FamilyName}; use gecko_bindings::structs::FontFamilyType; @@ -2055,6 +2185,10 @@ fn static_assert() { self.gecko.mFont.sizeAdjust = other.gecko.mFont.sizeAdjust; } + pub fn reset_font_size_adjust(&mut self, other: &Self) { + self.copy_font_size_adjust_from(other) + } + pub fn clone_font_size_adjust(&self) -> longhands::font_size_adjust::computed_value::T { use properties::longhands::font_size_adjust::computed_value::T; T::from_gecko_adjust(self.gecko.mFont.sizeAdjust) @@ -2076,6 +2210,11 @@ fn static_assert() { } } + #[allow(non_snake_case)] + pub fn reset__x_lang(&mut self, other: &Self) { + self.copy__x_lang_from(other) + } + <% impl_simple_type_with_conversion("font_language_override", "mFont.languageOverride") %> pub fn set_font_variant_alternates(&mut self, v: longhands::font_variant_alternates::computed_value::T) { @@ -2134,6 +2273,10 @@ fn static_assert() { } } + pub fn reset_font_variant_alternates(&mut self, other: &Self) { + self.copy_font_variant_alternates_from(other) + } + pub fn clone_font_variant_alternates(&self) -> longhands::font_variant_alternates::computed_value::T { use Atom; % for value in "normal swash stylistic ornaments annotation styleset character_variant historical".split(): @@ -2221,6 +2364,11 @@ fn static_assert() { gecko.m${gecko_ffi_name} = other.gecko.m${type.capitalize()}s[index].m${gecko_ffi_name}; } } + + #[allow(non_snake_case)] + pub fn reset_${type}_${ident}(&mut self, other: &Self) { + self.copy_${type}_${ident}_from(other) + } <%def name="impl_animation_or_transition_count(type, ident, gecko_ffi_name)"> @@ -2410,6 +2558,10 @@ fn static_assert() { self.gecko.mOriginalDisplay = other.gecko.mDisplay; } + pub fn reset_display(&mut self, other: &Self) { + self.copy_display_from(other) + } + <%call expr="impl_keyword_clone('display', 'mDisplay', display_keyword)"> <% overflow_x = data.longhands_by_name["overflow-x"] %> @@ -2530,6 +2682,10 @@ fn static_assert() { } } + pub fn reset_scroll_snap_coordinate(&mut self, other: &Self) { + self.copy_scroll_snap_coordinate_from(other) + } + pub fn clone_scroll_snap_coordinate(&self) -> longhands::scroll_snap_coordinate::computed_value::T { let vec = self.gecko.mScrollSnapCoordinate.iter().map(|f| f.into()).collect(); longhands::scroll_snap_coordinate::computed_value::T(vec) @@ -2653,6 +2809,10 @@ fn static_assert() { unsafe { self.gecko.mSpecifiedTransform.set(&other.gecko.mSpecifiedTransform); } } + pub fn reset_transform(&mut self, other: &Self) { + self.copy_transform_from(other) + } + <%def name="computed_operation_arm(name, keyword, items)"> <% # %s is substituted with the call to GetArrayItem. @@ -2842,6 +3002,11 @@ fn static_assert() { } } } + + pub fn reset_transition_property(&mut self, other: &Self) { + self.copy_transition_property_from(other) + } + ${impl_transition_count('property', 'Property')} pub fn animations_equals(&self, other: &Self) -> bool { @@ -2889,6 +3054,11 @@ fn static_assert() { animation.mName.assign(&*other.gecko.mAnimations[index].mName); } } + + pub fn reset_animation_name(&mut self, other: &Self) { + self.copy_animation_name_from(other) + } + ${impl_animation_count('name', 'Name')} ${impl_animation_time_value('delay', 'Delay')} @@ -2952,6 +3122,10 @@ fn static_assert() { self.gecko.mPerspectiveOrigin[1].copy_from(&other.gecko.mPerspectiveOrigin[1]); } + pub fn reset_perspective_origin(&mut self, other: &Self) { + self.copy_perspective_origin_from(other) + } + pub fn clone_perspective_origin(&self) -> longhands::perspective_origin::computed_value::T { use properties::longhands::perspective_origin::computed_value::T; use values::computed::LengthOrPercentage; @@ -2975,6 +3149,10 @@ fn static_assert() { self.gecko.mTransformOrigin[2].copy_from(&other.gecko.mTransformOrigin[2]); } + pub fn reset_transform_origin(&mut self, other: &Self) { + self.copy_transform_origin_from(other) + } + pub fn clone_transform_origin(&self) -> longhands::transform_origin::computed_value::T { use properties::longhands::transform_origin::computed_value::T; use values::computed::LengthOrPercentage; @@ -3074,6 +3252,10 @@ fn static_assert() { } } + pub fn reset_will_change(&mut self, other: &Self) { + self.copy_will_change_from(other) + } + pub fn clone_will_change(&self) -> longhands::will_change::computed_value::T { use properties::longhands::will_change::computed_value::T; use gecko_bindings::structs::nsIAtom; @@ -3207,6 +3389,10 @@ fn static_assert() { } self.gecko.${layers_field_name}.${field_name}Count = count; } + + pub fn reset_${shorthand}_${name}(&mut self, other: &Self) { + self.copy_${shorthand}_${name}_from(other) + } <%def name="impl_simple_image_array_property(name, shorthand, layer_field_name, field_name, struct_name)"> @@ -3357,6 +3543,10 @@ fn static_assert() { self.gecko.${image_layers_field}.mPosition${orientation.upper()}Count = count; } + pub fn reset_${shorthand}_position_${orientation}(&mut self, other: &Self) { + self.copy_${shorthand}_position_${orientation}_from(other) + } + pub fn clone_${shorthand}_position_${orientation}(&self) -> longhands::${shorthand}_position_${orientation}::computed_value::T { longhands::${shorthand}_position_${orientation}::computed_value::T( @@ -3468,7 +3658,6 @@ fn static_assert() { ) } - pub fn copy_${shorthand}_image_from(&mut self, other: &Self) { use gecko_bindings::structs::nsStyleImageLayers_LayerType as LayerType; unsafe { @@ -3488,6 +3677,10 @@ fn static_assert() { } } + pub fn reset_${shorthand}_image(&mut self, other: &Self) { + self.copy_${shorthand}_image_from(other) + } + #[allow(unused_variables)] pub fn set_${shorthand}_image(&mut self, images: I) where I: IntoIterator, @@ -3603,6 +3796,10 @@ fn static_assert() { unsafe { Gecko_CopyListStyleImageFrom(&mut self.gecko, &other.gecko); } } + pub fn reset_list_style_image(&mut self, other: &Self) { + self.copy_list_style_image_from(other) + } + pub fn clone_list_style_image(&self) -> longhands::list_style_image::computed_value::T { use values::specified::url::SpecifiedUrl; use values::{Either, None_}; @@ -3640,6 +3837,10 @@ fn static_assert() { } } + pub fn reset_list_style_type(&mut self, other: &Self) { + self.copy_list_style_type_from(other) + } + pub fn set_quotes(&mut self, other: longhands::quotes::computed_value::T) { use gecko_bindings::bindings::Gecko_NewStyleQuoteValues; use gecko_bindings::sugar::refptr::UniqueRefPtr; @@ -3660,6 +3861,10 @@ fn static_assert() { unsafe { self.gecko.mQuotes.set(&other.gecko.mQuotes); } } + pub fn reset_quotes(&mut self, other: &Self) { + self.copy_quotes_from(other) + } + pub fn clone_quotes(&self) -> longhands::quotes::computed_value::T { unsafe { let ref gecko_quote_values = *self.gecko.mQuotes.mRawPtr; @@ -3759,6 +3964,10 @@ fn static_assert() { self.gecko.mBoxShadow.copy_from(&other.gecko.mBoxShadow); } + pub fn reset_box_shadow(&mut self, other: &Self) { + self.copy_box_shadow_from(other) + } + pub fn clone_box_shadow(&self) -> longhands::box_shadow::computed_value::T { let buf = self.gecko.mBoxShadow.iter().map(|v| v.to_box_shadow()).collect(); longhands::box_shadow::computed_value::T(buf) @@ -3819,6 +4028,10 @@ fn static_assert() { self.gecko.mClipFlags = other.gecko.mClipFlags; } + pub fn reset_clip(&mut self, other: &Self) { + self.copy_clip_from(other) + } + pub fn clone_clip(&self) -> longhands::clip::computed_value::T { use gecko_bindings::structs::NS_STYLE_CLIP_AUTO; use gecko_bindings::structs::NS_STYLE_CLIP_BOTTOM_AUTO; @@ -3948,6 +4161,10 @@ fn static_assert() { } } + pub fn reset_filter(&mut self, other: &Self) { + self.copy_filter_from(other) + } + pub fn clone_filter(&self) -> longhands::filter::computed_value::T { use values::generics::effects::Filter; use values::specified::url::SpecifiedUrl; @@ -4031,6 +4248,10 @@ fn static_assert() { bindings::Gecko_CopyImageOrientationFrom(&mut self.gecko, &other.gecko); } } + + pub fn reset_image_orientation(&mut self, other: &Self) { + self.copy_image_orientation_from(other) + } <%self:impl_trait style_struct_name="InheritedTable" @@ -4046,6 +4267,10 @@ fn static_assert() { self.gecko.mBorderSpacingRow = other.gecko.mBorderSpacingRow; } + pub fn reset_border_spacing(&mut self, other: &Self) { + self.copy_border_spacing_from(other) + } + pub fn clone_border_spacing(&self) -> longhands::border_spacing::computed_value::T { longhands::border_spacing::computed_value::T { horizontal: Au(self.gecko.mBorderSpacingCol), @@ -4080,6 +4305,10 @@ fn static_assert() { self.gecko.mTextShadow.copy_from(&other.gecko.mTextShadow); } + pub fn reset_text_shadow(&mut self, other: &Self) { + self.copy_text_shadow_from(other) + } + pub fn clone_text_shadow(&self) -> longhands::text_shadow::computed_value::T { let buf = self.gecko.mTextShadow.iter().map(|v| v.to_simple_shadow()).collect(); longhands::text_shadow::computed_value::T(buf) @@ -4206,6 +4435,10 @@ fn static_assert() { self.gecko.mTextEmphasisStyle = other.gecko.mTextEmphasisStyle; } + pub fn reset_text_emphasis_style(&mut self, other: &Self) { + self.copy_text_emphasis_style_from(other) + } + pub fn clone_text_emphasis_style(&self) -> longhands::text_emphasis_style::computed_value::T { use properties::longhands::text_emphasis_style::computed_value::{T, KeywordValue}; use properties::longhands::text_emphasis_style::ShapeKeyword; @@ -4281,6 +4514,7 @@ fn static_assert() { clear_if_string(&mut self.gecko.mTextOverflow.mLeft); clear_if_string(&mut self.gecko.mTextOverflow.mRight); } + pub fn set_text_overflow(&mut self, v: longhands::text_overflow::computed_value::T) { use gecko_bindings::structs::nsStyleTextOverflowSide; use properties::longhands::text_overflow::Side; @@ -4318,6 +4552,10 @@ fn static_assert() { self.gecko.mTextOverflow.mLogicalDirections = other.gecko.mTextOverflow.mLogicalDirections; } + pub fn reset_text_overflow(&mut self, other: &Self) { + self.copy_text_overflow_from(other) + } + pub fn clone_text_overflow(&self) -> longhands::text_overflow::computed_value::T { use gecko_bindings::structs::nsStyleTextOverflowSide; use properties::longhands::text_overflow::Side; @@ -4361,6 +4599,10 @@ fn static_assert() { self.gecko.mInitialLetterSink = other.gecko.mInitialLetterSink; } + pub fn reset_initial_letter(&mut self, other: &Self) { + self.copy_initial_letter_from(other) + } + pub fn clone_initial_letter(&self) -> longhands::initial_letter::computed_value::T { use values::generics::text::InitialLetter; @@ -4498,6 +4740,10 @@ fn static_assert() { Gecko_CopyShapeSourceFrom(&mut self.gecko.${gecko_ffi_name}, &other.gecko.${gecko_ffi_name}); } } + + pub fn reset_${ident}(&mut self, other: &Self) { + self.copy_${ident}_from(other) + } <% skip_svg_longhands = """ @@ -4565,6 +4811,10 @@ clip-path } } + pub fn reset_stroke_dasharray(&mut self, other: &Self) { + self.copy_stroke_dasharray_from(other) + } + pub fn clone_stroke_dasharray(&self) -> longhands::stroke_dasharray::computed_value::T { use values::computed::LengthOrPercentage; @@ -4655,6 +4905,11 @@ clip-path bindings::Gecko_nsStyleSVG_CopyContextProperties(&mut self.gecko, &other.gecko); } } + + #[allow(non_snake_case)] + pub fn reset__moz_context_properties(&mut self, other: &Self) { + self.copy__moz_context_properties_from(other) + } <%self:impl_trait style_struct_name="Color" @@ -4758,6 +5013,10 @@ clip-path } } + pub fn reset_cursor(&mut self, other: &Self) { + self.copy_cursor_from(other) + } + pub fn clone_cursor(&self) -> longhands::cursor::computed_value::T { use properties::longhands::cursor::computed_value::{Keyword, Image}; use style_traits::cursor::Cursor; @@ -4985,6 +5244,10 @@ clip-path } } + pub fn reset_content(&mut self, other: &Self) { + self.copy_content_from(other) + } + % for counter_property in ["Increment", "Reset"]: pub fn set_counter_${counter_property.lower()}(&mut self, v: longhands::counter_increment::computed_value::T) { unsafe { @@ -5003,6 +5266,10 @@ clip-path } } + pub fn reset_counter_${counter_property.lower()}(&mut self, other: &Self) { + self.copy_counter_${counter_property.lower()}_from(other) + } + pub fn clone_counter_${counter_property.lower()}(&self) -> longhands::counter_increment::computed_value::T { use values::CustomIdent; use gecko_string_cache::Atom; diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index 442b9894f4f..4e285bf3092 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -917,6 +917,15 @@ } + + /// Copy the appropriate physical property from another struct for ${name} + /// given a writing mode. + pub fn reset_${to_rust_ident(name)}(&mut self, + other: &Self, + wm: WritingMode) { + self.copy_${to_rust_ident(name)}_from(other, wm) + } + % if need_clone: /// Get the computed value for the appropriate physical property for /// ${name} given a writing mode. diff --git a/components/style/properties/longhand/position.mako.rs b/components/style/properties/longhand/position.mako.rs index 04d0f295eb1..780b7ebabca 100644 --- a/components/style/properties/longhand/position.mako.rs +++ b/components/style/properties/longhand/position.mako.rs @@ -108,7 +108,7 @@ ${helpers.single_keyword("flex-wrap", "nowrap wrap wrap-reverse", ${helpers.predefined_type(name="justify-items", type="JustifyItems", - initial_value="specified::JustifyItems::auto()", + initial_value="computed::JustifyItems::auto()", spec="https://drafts.csswg.org/css-align/#propdef-justify-items", animation_value_type="discrete")} diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 877ec1a1b9f..0e11d2ac0ad 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -1709,6 +1709,13 @@ pub mod style_structs { pub fn copy_${longhand.ident}_from(&mut self, other: &Self) { self.${longhand.ident} = other.${longhand.ident}.clone(); } + + /// Reset ${longhand.name} from the initial struct. + #[allow(non_snake_case)] + #[inline] + pub fn reset_${longhand.ident}(&mut self, other: &Self) { + self.copy_${longhand.ident}_from(other) + } % if longhand.need_clone: /// Get the computed value for ${longhand.name}. #[allow(non_snake_case)] @@ -2606,13 +2613,13 @@ impl<'a> StyleBuilder<'a> { /// Inherit `${property.ident}` from our parent style. #[allow(non_snake_case)] pub fn inherit_${property.ident}(&mut self) { - % if property.style_struct.inherited: let inherited_struct = + % if property.style_struct.inherited: self.inherited_style.get_${property.style_struct.name_lower}(); % else: - let inherited_struct = self.inherited_style_ignoring_first_line.get_${property.style_struct.name_lower}(); % endif + self.${property.style_struct.ident}.mutate() .copy_${property.ident}_from( inherited_struct, @@ -2625,9 +2632,11 @@ impl<'a> StyleBuilder<'a> { /// Reset `${property.ident}` to the initial value. #[allow(non_snake_case)] pub fn reset_${property.ident}(&mut self) { - let reset_struct = self.reset_style.get_${property.style_struct.name_lower}(); + let reset_struct = + self.reset_style.get_${property.style_struct.name_lower}(); + self.${property.style_struct.ident}.mutate() - .copy_${property.ident}_from( + .reset_${property.ident}( reset_struct, % if property.logical: self.writing_mode, diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index 022e5e54264..03b15916b23 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -454,6 +454,36 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { } } + /// Resolves "justify-items: auto" based on the inherited style if needed to + /// comply with: + /// + /// https://drafts.csswg.org/css-align/#valdef-justify-items-legacy + /// + /// (Note that "auto" is being renamed to "legacy") + #[cfg(feature = "gecko")] + fn adjust_for_justify_items(&mut self) { + use values::specified::align; + let justify_items = self.style.get_position().clone_justify_items(); + if justify_items.specified.0 != align::ALIGN_AUTO { + return; + } + + let parent_justify_items = + self.style.get_parent_position().clone_justify_items(); + + if !parent_justify_items.computed.0.contains(align::ALIGN_LEGACY) { + return; + } + + if parent_justify_items.computed == justify_items.computed { + return; + } + + self.style + .mutate_position() + .set_computed_justify_items(parent_justify_items.computed); + } + /// Adjusts the style to account for various fixups that don't fit naturally /// into the cascade. /// @@ -478,6 +508,7 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { self.adjust_for_table_text_align(); self.adjust_for_contain(); self.adjust_for_mathvariant(); + self.adjust_for_justify_items(); } #[cfg(feature = "servo")] { diff --git a/components/style/values/computed/align.rs b/components/style/values/computed/align.rs new file mode 100644 index 00000000000..3d997915cad --- /dev/null +++ b/components/style/values/computed/align.rs @@ -0,0 +1,75 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +//! Values for CSS Box Alignment properties +//! +//! https://drafts.csswg.org/css-align/ + +use std::fmt; +use style_traits::ToCss; +use values::computed::{ComputedValueAsSpecified, Context, ToComputedValue}; +use values::specified; + +pub use super::specified::{AlignItems, AlignJustifyContent, AlignJustifySelf}; + +/// The computed value for the `justify-items` property. +/// +/// Need to carry around both the specified and computed value to handle the +/// special legacy keyword. Sigh. +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct JustifyItems { + /// The specified value for the property. Can contain `auto`. + pub specified: specified::JustifyItems, + /// The computed value for the property. Cannot contain `auto`. + pub computed: specified::JustifyItems, +} + +impl ToCss for JustifyItems { + fn to_css(&self, dest: &mut W) -> fmt::Result + where W: fmt::Write, + { + self.computed.to_css(dest) + } +} + +impl JustifyItems { + /// Returns the `auto` value. + pub fn auto() -> Self { + Self { + specified: specified::JustifyItems::auto(), + computed: specified::JustifyItems::normal(), + } + } +} + +impl ToComputedValue for specified::JustifyItems { + type ComputedValue = JustifyItems; + + /// https://drafts.csswg.org/css-align/#valdef-justify-items-legacy + fn to_computed_value(&self, _context: &Context) -> JustifyItems { + use values::specified::align; + let specified = *self; + let computed = + if self.0 != align::ALIGN_AUTO { + *self + } else { + // If the inherited value of `justify-items` includes the + // `legacy` keyword, `auto` computes to the inherited value, + // but we assume it computes to `normal`, and handle that + // special-case in StyleAdjuster. + Self::normal() + }; + + JustifyItems { specified, computed } + } + + #[inline] + fn from_computed_value(computed: &JustifyItems) -> Self { + computed.specified + } +} + +impl ComputedValueAsSpecified for AlignItems {} +impl ComputedValueAsSpecified for AlignJustifyContent {} +impl ComputedValueAsSpecified for AlignJustifySelf {} diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index 8e01eda014c..e9ae9474469 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -25,6 +25,8 @@ use super::specified; pub use app_units::Au; pub use properties::animated_properties::TransitionProperty; +#[cfg(feature = "gecko")] +pub use self::align::{AlignItems, AlignJustifyContent, AlignJustifySelf, JustifyItems}; pub use self::background::BackgroundSize; pub use self::border::{BorderImageSlice, BorderImageWidth, BorderImageSideWidth}; pub use self::border::{BorderRadius, BorderCornerRadius}; @@ -36,8 +38,6 @@ pub use self::image::{Gradient, GradientItem, Image, ImageLayer, LineDirection, pub use self::gecko::ScrollSnapPoint; pub use self::rect::LengthOrNumberRect; pub use super::{Auto, Either, None_}; -#[cfg(feature = "gecko")] -pub use super::specified::{AlignItems, AlignJustifyContent, AlignJustifySelf, JustifyItems}; pub use super::specified::{BorderStyle, UrlOrNone}; pub use super::generics::grid::GridLine; pub use super::specified::url::SpecifiedUrl; @@ -47,6 +47,8 @@ pub use self::position::Position; pub use self::text::{InitialLetter, LetterSpacing, LineHeight, WordSpacing}; pub use self::transform::{TimingFunction, TransformOrigin}; +#[cfg(feature = "gecko")] +pub mod align; pub mod background; pub mod basic_shape; pub mod border; @@ -396,36 +398,6 @@ impl ToCss for Time { } } -#[cfg(feature = "gecko")] -impl ToComputedValue for specified::JustifyItems { - type ComputedValue = JustifyItems; - - // https://drafts.csswg.org/css-align/#valdef-justify-items-auto - fn to_computed_value(&self, context: &Context) -> JustifyItems { - use values::specified::align; - // If the inherited value of `justify-items` includes the `legacy` keyword, `auto` computes - // to the inherited value. - if self.0 == align::ALIGN_AUTO { - let inherited = context.builder.get_parent_position().clone_justify_items(); - if inherited.0.contains(align::ALIGN_LEGACY) { - return inherited - } - } - return *self - } - - #[inline] - fn from_computed_value(computed: &JustifyItems) -> Self { - *computed - } -} - -#[cfg(feature = "gecko")] -impl ComputedValueAsSpecified for specified::AlignItems {} -#[cfg(feature = "gecko")] -impl ComputedValueAsSpecified for specified::AlignJustifyContent {} -#[cfg(feature = "gecko")] -impl ComputedValueAsSpecified for specified::AlignJustifySelf {} impl ComputedValueAsSpecified for specified::BorderStyle {} /// A `` value. diff --git a/components/style/values/specified/align.rs b/components/style/values/specified/align.rs index d56c42d639c..dc7fd43ed94 100644 --- a/components/style/values/specified/align.rs +++ b/components/style/values/specified/align.rs @@ -292,6 +292,12 @@ impl JustifyItems { JustifyItems(ALIGN_AUTO) } + /// The value 'normal' + #[inline] + pub fn normal() -> Self { + JustifyItems(ALIGN_NORMAL) + } + /// Whether this value has extra flags. #[inline] pub fn has_extra_flags(self) -> bool {