diff --git a/components/style/properties/longhand/border.mako.rs b/components/style/properties/longhand/border.mako.rs index da34a5f8425..1e5176791d2 100644 --- a/components/style/properties/longhand/border.mako.rs +++ b/components/style/properties/longhand/border.mako.rs @@ -78,6 +78,7 @@ % endfor ${helpers.single_keyword("box-decoration-break", "slice clone", + gecko_enum_prefix="StyleBoxDecorationBreak", products="gecko", animatable=False)} ${helpers.single_keyword("-moz-float-edge", "content-box margin-box", diff --git a/components/style/properties/longhand/xul.mako.rs b/components/style/properties/longhand/xul.mako.rs index 06af2c2b1a4..221ff8a397d 100644 --- a/components/style/properties/longhand/xul.mako.rs +++ b/components/style/properties/longhand/xul.mako.rs @@ -10,7 +10,7 @@ ${helpers.single_keyword("-moz-box-align", "stretch start center baseline end", products="gecko", gecko_ffi_name="mBoxAlign", - gecko_constant_prefix="NS_STYLE_BOX_ALIGN", + gecko_enum_prefix="StyleBoxAlign", animatable=False)} ${helpers.predefined_type("-moz-box-flex", "Number", "0.0", "parse_non_negative", diff --git a/ports/geckolib/gecko_bindings/structs_debug.rs b/ports/geckolib/gecko_bindings/structs_debug.rs index b777d9a7700..7edbb0a23ac 100644 --- a/ports/geckolib/gecko_bindings/structs_debug.rs +++ b/ports/geckolib/gecko_bindings/structs_debug.rs @@ -217,21 +217,6 @@ pub const NS_STYLE_USER_MODIFY_WRITE_ONLY: ::std::os::raw::c_uint = 2; pub const NS_STYLE_WINDOW_DRAGGING_DEFAULT: ::std::os::raw::c_uint = 0; pub const NS_STYLE_WINDOW_DRAGGING_DRAG: ::std::os::raw::c_uint = 1; pub const NS_STYLE_WINDOW_DRAGGING_NO_DRAG: ::std::os::raw::c_uint = 2; -pub const NS_STYLE_BOX_ALIGN_STRETCH: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_ALIGN_START: ::std::os::raw::c_uint = 1; -pub const NS_STYLE_BOX_ALIGN_CENTER: ::std::os::raw::c_uint = 2; -pub const NS_STYLE_BOX_ALIGN_BASELINE: ::std::os::raw::c_uint = 3; -pub const NS_STYLE_BOX_ALIGN_END: ::std::os::raw::c_uint = 4; -pub const NS_STYLE_BOX_PACK_START: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_PACK_CENTER: ::std::os::raw::c_uint = 1; -pub const NS_STYLE_BOX_PACK_END: ::std::os::raw::c_uint = 2; -pub const NS_STYLE_BOX_PACK_JUSTIFY: ::std::os::raw::c_uint = 3; -pub const NS_STYLE_BOX_DECORATION_BREAK_SLICE: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_DECORATION_BREAK_CLONE: ::std::os::raw::c_uint = 1; -pub const NS_STYLE_BOX_DIRECTION_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_DIRECTION_REVERSE: ::std::os::raw::c_uint = 1; -pub const NS_STYLE_BOX_ORIENT_HORIZONTAL: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_ORIENT_VERTICAL: ::std::os::raw::c_uint = 1; pub const NS_STYLE_ORIENT_INLINE: ::std::os::raw::c_uint = 0; pub const NS_STYLE_ORIENT_BLOCK: ::std::os::raw::c_uint = 1; pub const NS_STYLE_ORIENT_HORIZONTAL: ::std::os::raw::c_uint = 2; @@ -3988,6 +3973,27 @@ pub enum StyleBasicShapeType { } #[repr(i8)] #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxAlign { + Stretch = 0, + Start = 1, + Center = 2, + Baseline = 3, + End = 4, +} +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxDecorationBreak { Slice = 0, Clone = 1, } +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxDirection { Normal = 0, Reverse = 1, } +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxOrient { Horizontal = 0, Vertical = 1, } +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxPack { Start = 0, Center = 1, End = 2, Justify = 3, } +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] pub enum StyleBoxSizing { Content = 0, Border = 1, } #[repr(i8)] #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] @@ -5933,7 +5939,7 @@ pub struct nsStyleBorder { pub mBorderImageRepeatH: u8, pub mBorderImageRepeatV: u8, pub mFloatEdge: StyleFloatEdge, - pub mBoxDecorationBreak: u8, + pub mBoxDecorationBreak: StyleBoxDecorationBreak, pub mComputedBorder: nsMargin, pub mBorder: nsMargin, pub mBorderStyle: [u8; 4usize], @@ -6663,10 +6669,10 @@ fn bindgen_test_layout_nsStyleUserInterface() { pub struct nsStyleXUL { pub mBoxFlex: f32, pub mBoxOrdinal: u32, - pub mBoxAlign: u8, - pub mBoxDirection: u8, - pub mBoxOrient: u8, - pub mBoxPack: u8, + pub mBoxAlign: StyleBoxAlign, + pub mBoxDirection: StyleBoxDirection, + pub mBoxOrient: StyleBoxOrient, + pub mBoxPack: StyleBoxPack, pub mStretchStack: bool, } #[test] diff --git a/ports/geckolib/gecko_bindings/structs_release.rs b/ports/geckolib/gecko_bindings/structs_release.rs index 1749e2ad8e0..455fbdb2cf3 100644 --- a/ports/geckolib/gecko_bindings/structs_release.rs +++ b/ports/geckolib/gecko_bindings/structs_release.rs @@ -217,21 +217,6 @@ pub const NS_STYLE_USER_MODIFY_WRITE_ONLY: ::std::os::raw::c_uint = 2; pub const NS_STYLE_WINDOW_DRAGGING_DEFAULT: ::std::os::raw::c_uint = 0; pub const NS_STYLE_WINDOW_DRAGGING_DRAG: ::std::os::raw::c_uint = 1; pub const NS_STYLE_WINDOW_DRAGGING_NO_DRAG: ::std::os::raw::c_uint = 2; -pub const NS_STYLE_BOX_ALIGN_STRETCH: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_ALIGN_START: ::std::os::raw::c_uint = 1; -pub const NS_STYLE_BOX_ALIGN_CENTER: ::std::os::raw::c_uint = 2; -pub const NS_STYLE_BOX_ALIGN_BASELINE: ::std::os::raw::c_uint = 3; -pub const NS_STYLE_BOX_ALIGN_END: ::std::os::raw::c_uint = 4; -pub const NS_STYLE_BOX_PACK_START: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_PACK_CENTER: ::std::os::raw::c_uint = 1; -pub const NS_STYLE_BOX_PACK_END: ::std::os::raw::c_uint = 2; -pub const NS_STYLE_BOX_PACK_JUSTIFY: ::std::os::raw::c_uint = 3; -pub const NS_STYLE_BOX_DECORATION_BREAK_SLICE: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_DECORATION_BREAK_CLONE: ::std::os::raw::c_uint = 1; -pub const NS_STYLE_BOX_DIRECTION_NORMAL: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_DIRECTION_REVERSE: ::std::os::raw::c_uint = 1; -pub const NS_STYLE_BOX_ORIENT_HORIZONTAL: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_BOX_ORIENT_VERTICAL: ::std::os::raw::c_uint = 1; pub const NS_STYLE_ORIENT_INLINE: ::std::os::raw::c_uint = 0; pub const NS_STYLE_ORIENT_BLOCK: ::std::os::raw::c_uint = 1; pub const NS_STYLE_ORIENT_HORIZONTAL: ::std::os::raw::c_uint = 2; @@ -3967,6 +3952,27 @@ pub enum StyleBasicShapeType { } #[repr(i8)] #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxAlign { + Stretch = 0, + Start = 1, + Center = 2, + Baseline = 3, + End = 4, +} +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxDecorationBreak { Slice = 0, Clone = 1, } +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxDirection { Normal = 0, Reverse = 1, } +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxOrient { Horizontal = 0, Vertical = 1, } +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum StyleBoxPack { Start = 0, Center = 1, End = 2, Justify = 3, } +#[repr(i8)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] pub enum StyleBoxSizing { Content = 0, Border = 1, } #[repr(i8)] #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] @@ -5911,7 +5917,7 @@ pub struct nsStyleBorder { pub mBorderImageRepeatH: u8, pub mBorderImageRepeatV: u8, pub mFloatEdge: StyleFloatEdge, - pub mBoxDecorationBreak: u8, + pub mBoxDecorationBreak: StyleBoxDecorationBreak, pub mComputedBorder: nsMargin, pub mBorder: nsMargin, pub mBorderStyle: [u8; 4usize], @@ -6640,10 +6646,10 @@ fn bindgen_test_layout_nsStyleUserInterface() { pub struct nsStyleXUL { pub mBoxFlex: f32, pub mBoxOrdinal: u32, - pub mBoxAlign: u8, - pub mBoxDirection: u8, - pub mBoxOrient: u8, - pub mBoxPack: u8, + pub mBoxAlign: StyleBoxAlign, + pub mBoxDirection: StyleBoxDirection, + pub mBoxOrient: StyleBoxOrient, + pub mBoxPack: StyleBoxPack, pub mStretchStack: bool, } #[test]