diff options
author | Manish Goregaokar <manishearth@gmail.com> | 2017-07-19 18:28:25 -0700 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2017-07-20 09:39:30 -0700 |
commit | ac1bae4f7a2bbc4019d8e516aa866bde7261a158 (patch) | |
tree | f4a4bbb5f048a102bf03a20b57eb40222d0c9931 /components/style/gecko/generated/structs_debug.rs | |
parent | 3d3f30a3f923267f7214f6b287eaaedcf4cfffd8 (diff) | |
download | servo-ac1bae4f7a2bbc4019d8e516aa866bde7261a158.tar.gz servo-ac1bae4f7a2bbc4019d8e516aa866bde7261a158.zip |
servo: Move FontComputationData to the end of ServoComputedValues to make size check easier, make it NonZero
We fail bindgen layout tests on 32 bit because FontComputationData does not accurately reflect the size/alignment of the rust-side replacement.
We move it to the end so that alignment is more straightforward, and
use a NonZero enum so that the representation can be more accurately
handled on the C++ side.
MozReview-Commit-ID: 8GlSma3Wl9W
Diffstat (limited to 'components/style/gecko/generated/structs_debug.rs')
-rw-r--r-- | components/style/gecko/generated/structs_debug.rs | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index 403ce0c04ae..2cc35817f6a 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -7572,6 +7572,19 @@ pub mod root { FirstLetterContinuation = 1, PlaceholderFrame = 2, } + #[repr(u32)] + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub enum ServoKeywordSize { + Empty = 0, + XXSmall = 1, + XSmall = 2, + Small = 3, + Medium = 4, + Large = 5, + XLarge = 6, + XXLarge = 7, + XXXLarge = 8, + } #[repr(C)] #[derive(Debug)] pub struct ServoStyleContext { @@ -7581,7 +7594,7 @@ pub mod root { } #[test] fn bindgen_test_layout_ServoStyleContext() { - assert_eq!(::std::mem::size_of::<ServoStyleContext>() , 272usize , + assert_eq!(::std::mem::size_of::<ServoStyleContext>() , 264usize , concat ! ( "Size of: " , stringify ! ( ServoStyleContext ) )); assert_eq! (::std::mem::align_of::<ServoStyleContext>() , 8usize , @@ -21006,7 +21019,7 @@ pub mod root { pub Effects: ::gecko_bindings::structs::ServoRawOffsetArc<root::mozilla::GeckoEffects>, pub custom_properties: ::gecko_bindings::structs::ServoCustomPropertiesMap, pub writing_mode: ::gecko_bindings::structs::ServoWritingMode, - pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData, + pub flags: ::gecko_bindings::structs::ServoComputedValueFlags, /// The rule node representing the ordered list of rules matched for this /// node. Can be None for default values and text nodes. This is /// essentially an optimization to avoid referencing the root rule node. @@ -21015,11 +21028,11 @@ pub mod root { /// relevant link for this element. A element's "relevant link" is the /// element being matched if it is a link or the nearest ancestor link. pub visited_style: ::gecko_bindings::structs::ServoVisitedStyle, - pub flags: ::gecko_bindings::structs::ServoComputedValueFlags, + pub font_computation_data: ::gecko_bindings::structs::ServoFontComputationData, } #[test] fn bindgen_test_layout_ServoComputedValues() { - assert_eq!(::std::mem::size_of::<ServoComputedValues>() , 232usize , + assert_eq!(::std::mem::size_of::<ServoComputedValues>() , 224usize , concat ! ( "Size of: " , stringify ! ( ServoComputedValues ) )); assert_eq! (::std::mem::align_of::<ServoComputedValues>() , 8usize , @@ -21154,27 +21167,27 @@ pub mod root { "Alignment of field: " , stringify ! ( ServoComputedValues ) , "::" , stringify ! ( writing_mode ) )); assert_eq! (unsafe { - & ( * ( 0 as * const ServoComputedValues ) ) . - font_computation_data as * const _ as usize } , 196usize , - concat ! ( + & ( * ( 0 as * const ServoComputedValues ) ) . flags as * + const _ as usize } , 193usize , concat ! ( "Alignment of field: " , stringify ! ( ServoComputedValues - ) , "::" , stringify ! ( font_computation_data ) )); + ) , "::" , stringify ! ( flags ) )); assert_eq! (unsafe { & ( * ( 0 as * const ServoComputedValues ) ) . rules as * - const _ as usize } , 208usize , concat ! ( + const _ as usize } , 200usize , concat ! ( "Alignment of field: " , stringify ! ( ServoComputedValues ) , "::" , stringify ! ( rules ) )); assert_eq! (unsafe { & ( * ( 0 as * const ServoComputedValues ) ) . - visited_style as * const _ as usize } , 216usize , concat + visited_style as * const _ as usize } , 208usize , concat ! ( "Alignment of field: " , stringify ! ( ServoComputedValues ) , "::" , stringify ! ( visited_style ) )); assert_eq! (unsafe { - & ( * ( 0 as * const ServoComputedValues ) ) . flags as * - const _ as usize } , 224usize , concat ! ( + & ( * ( 0 as * const ServoComputedValues ) ) . + font_computation_data as * const _ as usize } , 216usize , + concat ! ( "Alignment of field: " , stringify ! ( ServoComputedValues - ) , "::" , stringify ! ( flags ) )); + ) , "::" , stringify ! ( font_computation_data ) )); } #[repr(C)] #[derive(Debug, Copy)] |