Use enum class for white-space

This commit is contained in:
Jeff Hajewski 2017-06-01 13:39:44 -07:00 committed by Manish Goregaokar
parent 7123e5333f
commit 878b9a4db3
3 changed files with 23 additions and 15 deletions

View file

@ -715,12 +715,6 @@ pub mod root {
pub const NS_STYLE_VISIBILITY_VISIBLE: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_VISIBILITY_COLLAPSE: ::std::os::raw::c_uint = 2;
pub const NS_STYLE_TABSIZE_INITIAL: ::std::os::raw::c_uint = 8;
pub const NS_STYLE_WHITESPACE_NORMAL: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_WHITESPACE_PRE: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_WHITESPACE_NOWRAP: ::std::os::raw::c_uint = 2;
pub const NS_STYLE_WHITESPACE_PRE_WRAP: ::std::os::raw::c_uint = 3;
pub const NS_STYLE_WHITESPACE_PRE_LINE: ::std::os::raw::c_uint = 4;
pub const NS_STYLE_WHITESPACE_PRE_SPACE: ::std::os::raw::c_uint = 5;
pub const NS_STYLE_WORDBREAK_NORMAL: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_WORDBREAK_BREAK_ALL: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_WORDBREAK_KEEP_ALL: ::std::os::raw::c_uint = 2;
@ -6200,6 +6194,16 @@ pub mod root {
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StyleGridTrackBreadth { MaxContent = 1, MinContent = 2, }
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StyleWhiteSpace {
Normal = 0,
Pre = 1,
Nowrap = 2,
PreWrap = 3,
PreLine = 4,
PreSpace = 5,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WritingMode {
@ -30352,7 +30356,7 @@ pub mod root {
pub _bitfield_1: u8,
pub mTextJustify: root::mozilla::StyleTextJustify,
pub mTextTransform: u8,
pub mWhiteSpace: u8,
pub mWhiteSpace: root::mozilla::StyleWhiteSpace,
pub mWordBreak: u8,
pub mOverflowWrap: u8,
pub mHyphens: root::mozilla::StyleHyphens,

View file

@ -715,12 +715,6 @@ pub mod root {
pub const NS_STYLE_VISIBILITY_VISIBLE: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_VISIBILITY_COLLAPSE: ::std::os::raw::c_uint = 2;
pub const NS_STYLE_TABSIZE_INITIAL: ::std::os::raw::c_uint = 8;
pub const NS_STYLE_WHITESPACE_NORMAL: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_WHITESPACE_PRE: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_WHITESPACE_NOWRAP: ::std::os::raw::c_uint = 2;
pub const NS_STYLE_WHITESPACE_PRE_WRAP: ::std::os::raw::c_uint = 3;
pub const NS_STYLE_WHITESPACE_PRE_LINE: ::std::os::raw::c_uint = 4;
pub const NS_STYLE_WHITESPACE_PRE_SPACE: ::std::os::raw::c_uint = 5;
pub const NS_STYLE_WORDBREAK_NORMAL: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_WORDBREAK_BREAK_ALL: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_WORDBREAK_KEEP_ALL: ::std::os::raw::c_uint = 2;
@ -6068,6 +6062,16 @@ pub mod root {
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StyleGridTrackBreadth { MaxContent = 1, MinContent = 2, }
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StyleWhiteSpace {
Normal = 0,
Pre = 1,
Nowrap = 2,
PreWrap = 3,
PreLine = 4,
PreSpace = 5,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WritingMode {
@ -29833,7 +29837,7 @@ pub mod root {
pub _bitfield_1: u8,
pub mTextJustify: root::mozilla::StyleTextJustify,
pub mTextTransform: u8,
pub mWhiteSpace: u8,
pub mWhiteSpace: root::mozilla::StyleWhiteSpace,
pub mWordBreak: u8,
pub mOverflowWrap: u8,
pub mHyphens: root::mozilla::StyleHyphens,

View file

@ -635,7 +635,7 @@ ${helpers.single_keyword("text-align-last",
<%helpers:single_keyword_computed name="white-space"
values="normal pre nowrap pre-wrap pre-line"
extra_gecko_values="-moz-pre-space"
gecko_constant_prefix="NS_STYLE_WHITESPACE"
gecko_enum_prefix="StyleWhiteSpace"
needs_conversion="True"
animation_value_type="none"
spec="https://drafts.csswg.org/css-text/#propdef-white-space">