зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #13200 - Resync bindings (from Manishearth:resync); r=bholley
StyleClear and StyleDisplay are now enums, updating bindings for them. r? @bholley Source-Repo: https://github.com/servo/servo Source-Revision: 957893bdc2132cf39a505b6ca681ca56c427c049
This commit is contained in:
Родитель
5fd35e98a8
Коммит
c9241b77b0
|
@ -848,7 +848,8 @@ fn static_assert() {
|
|||
<% display_keyword = Keyword("display", "inline block inline-block table inline-table table-row-group " +
|
||||
"table-header-group table-footer-group table-row table-column-group " +
|
||||
"table-column table-cell table-caption list-item flex none " +
|
||||
"-moz-box -moz-inline-box") %>
|
||||
"-moz-box -moz-inline-box",
|
||||
gecko_enum_prefix="StyleDisplay") %>
|
||||
${impl_keyword('display', 'mDisplay', display_keyword, True)}
|
||||
|
||||
// overflow-y is implemented as a newtype of overflow-x, so we need special handling.
|
||||
|
|
|
@ -120,7 +120,8 @@ ${helpers.single_keyword("position", "static absolute relative fixed",
|
|||
</%helpers:single_keyword_computed>
|
||||
|
||||
${helpers.single_keyword("clear", "none left right both",
|
||||
animatable=False, gecko_ffi_name="mBreakType")}
|
||||
animatable=False, gecko_ffi_name="mBreakType",
|
||||
gecko_enum_prefix="StyleClear")}
|
||||
|
||||
<%helpers:longhand name="-servo-display-for-hypothetical-box"
|
||||
animatable="False"
|
||||
|
|
|
@ -325,13 +325,6 @@ pub const NS_STYLE_BORDER_IMAGE_REPEAT_ROUND: ::std::os::raw::c_uint = 2;
|
|||
pub const NS_STYLE_BORDER_IMAGE_REPEAT_SPACE: ::std::os::raw::c_uint = 3;
|
||||
pub const NS_STYLE_BORDER_IMAGE_SLICE_NOFILL: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_BORDER_IMAGE_SLICE_FILL: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_CLEAR_NONE: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_CLEAR_LEFT: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_CLEAR_RIGHT: ::std::os::raw::c_uint = 2;
|
||||
pub const NS_STYLE_CLEAR_INLINE_START: ::std::os::raw::c_uint = 3;
|
||||
pub const NS_STYLE_CLEAR_INLINE_END: ::std::os::raw::c_uint = 4;
|
||||
pub const NS_STYLE_CLEAR_BOTH: ::std::os::raw::c_uint = 5;
|
||||
pub const NS_STYLE_CLEAR_LINE: ::std::os::raw::c_uint = 8;
|
||||
pub const NS_STYLE_CONTENT_OPEN_QUOTE: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_CONTENT_CLOSE_QUOTE: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_CONTENT_NO_OPEN_QUOTE: ::std::os::raw::c_uint = 2;
|
||||
|
@ -379,44 +372,6 @@ pub const NS_STYLE_WRITING_MODE_HORIZONTAL_TB: ::std::os::raw::c_uint = 0;
|
|||
pub const NS_STYLE_WRITING_MODE_VERTICAL_RL: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_WRITING_MODE_VERTICAL_LR: ::std::os::raw::c_uint = 3;
|
||||
pub const NS_STYLE_WRITING_MODE_SIDEWAYS_MASK: ::std::os::raw::c_uint = 4;
|
||||
pub const NS_STYLE_DISPLAY_NONE: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_DISPLAY_BLOCK: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_DISPLAY_INLINE: ::std::os::raw::c_uint = 2;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_BLOCK: ::std::os::raw::c_uint = 3;
|
||||
pub const NS_STYLE_DISPLAY_LIST_ITEM: ::std::os::raw::c_uint = 4;
|
||||
pub const NS_STYLE_DISPLAY_TABLE: ::std::os::raw::c_uint = 8;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_TABLE: ::std::os::raw::c_uint = 9;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_ROW_GROUP: ::std::os::raw::c_uint = 10;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_COLUMN: ::std::os::raw::c_uint = 11;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP: ::std::os::raw::c_uint = 12;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_HEADER_GROUP: ::std::os::raw::c_uint = 13;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP: ::std::os::raw::c_uint = 14;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_ROW: ::std::os::raw::c_uint = 15;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_CELL: ::std::os::raw::c_uint = 16;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_CAPTION: ::std::os::raw::c_uint = 17;
|
||||
pub const NS_STYLE_DISPLAY_BOX: ::std::os::raw::c_uint = 18;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_BOX: ::std::os::raw::c_uint = 19;
|
||||
pub const NS_STYLE_DISPLAY_XUL_GRID: ::std::os::raw::c_uint = 20;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_XUL_GRID: ::std::os::raw::c_uint = 21;
|
||||
pub const NS_STYLE_DISPLAY_XUL_GRID_GROUP: ::std::os::raw::c_uint = 22;
|
||||
pub const NS_STYLE_DISPLAY_XUL_GRID_LINE: ::std::os::raw::c_uint = 23;
|
||||
pub const NS_STYLE_DISPLAY_STACK: ::std::os::raw::c_uint = 24;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_STACK: ::std::os::raw::c_uint = 25;
|
||||
pub const NS_STYLE_DISPLAY_DECK: ::std::os::raw::c_uint = 26;
|
||||
pub const NS_STYLE_DISPLAY_POPUP: ::std::os::raw::c_uint = 27;
|
||||
pub const NS_STYLE_DISPLAY_GROUPBOX: ::std::os::raw::c_uint = 28;
|
||||
pub const NS_STYLE_DISPLAY_FLEX: ::std::os::raw::c_uint = 29;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_FLEX: ::std::os::raw::c_uint = 30;
|
||||
pub const NS_STYLE_DISPLAY_GRID: ::std::os::raw::c_uint = 31;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_GRID: ::std::os::raw::c_uint = 32;
|
||||
pub const NS_STYLE_DISPLAY_RUBY: ::std::os::raw::c_uint = 33;
|
||||
pub const NS_STYLE_DISPLAY_RUBY_BASE: ::std::os::raw::c_uint = 34;
|
||||
pub const NS_STYLE_DISPLAY_RUBY_BASE_CONTAINER: ::std::os::raw::c_uint = 35;
|
||||
pub const NS_STYLE_DISPLAY_RUBY_TEXT: ::std::os::raw::c_uint = 36;
|
||||
pub const NS_STYLE_DISPLAY_RUBY_TEXT_CONTAINER: ::std::os::raw::c_uint = 37;
|
||||
pub const NS_STYLE_DISPLAY_CONTENTS: ::std::os::raw::c_uint = 38;
|
||||
pub const NS_STYLE_DISPLAY_WEBKIT_BOX: ::std::os::raw::c_uint = 39;
|
||||
pub const NS_STYLE_DISPLAY_WEBKIT_INLINE_BOX: ::std::os::raw::c_uint = 40;
|
||||
pub const NS_STYLE_CONTAIN_NONE: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_CONTAIN_STRICT: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_CONTAIN_LAYOUT: ::std::os::raw::c_uint = 2;
|
||||
|
@ -2546,6 +2501,41 @@ pub struct pair<_T1, _T2> {
|
|||
pub first: _T1,
|
||||
pub second: _T2,
|
||||
}
|
||||
pub enum nsIContentSecurityPolicy { }
|
||||
pub enum nsIDOMDocument { }
|
||||
#[repr(C)]
|
||||
pub struct nsIPrincipal {
|
||||
pub _bindgen_opaque_blob: u64,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsIPrincipal() {
|
||||
assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
|
||||
assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsIExpandedPrincipal {
|
||||
pub _base: nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct _vftable_nsIExpandedPrincipal {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl ::std::clone::Clone for nsIExpandedPrincipal {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsIURI {
|
||||
pub _base: nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct _vftable_nsIURI {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl ::std::clone::Clone for nsIURI {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
pub type PLDHashNumber = u32;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
|
@ -2764,41 +2754,6 @@ impl ::std::clone::Clone for VoidPtrHashKey {
|
|||
}
|
||||
#[repr(C)]
|
||||
pub struct nsDataHashtable;
|
||||
pub enum nsIContentSecurityPolicy { }
|
||||
pub enum nsIDOMDocument { }
|
||||
#[repr(C)]
|
||||
pub struct nsIPrincipal {
|
||||
pub _bindgen_opaque_blob: u64,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsIPrincipal() {
|
||||
assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
|
||||
assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsIExpandedPrincipal {
|
||||
pub _base: nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct _vftable_nsIExpandedPrincipal {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl ::std::clone::Clone for nsIExpandedPrincipal {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsIURI {
|
||||
pub _base: nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct _vftable_nsIURI {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl ::std::clone::Clone for nsIURI {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
pub type nsLoadFlags = u32;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
|
@ -3432,7 +3387,7 @@ pub enum nsAttrValue_ValueType {
|
|||
* EnumTable myTable[] = {
|
||||
* { "string1", 1 },
|
||||
* { "string2", 2 },
|
||||
* { 0 }
|
||||
* { nullptr, 0 }
|
||||
* }
|
||||
*/
|
||||
#[repr(C)]
|
||||
|
@ -4000,6 +3955,18 @@ pub enum StyleBoxSizing { Content = 0, Border = 1, }
|
|||
pub enum StyleBoxShadowType { Inset = 0, }
|
||||
#[repr(i8)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub enum StyleClear {
|
||||
None_ = 0,
|
||||
Left = 1,
|
||||
Right = 2,
|
||||
InlineStart = 3,
|
||||
InlineEnd = 4,
|
||||
Both = 5,
|
||||
Line = 8,
|
||||
Max = 13,
|
||||
}
|
||||
#[repr(i8)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub enum StyleClipPathGeometryBox {
|
||||
NoBox = 0,
|
||||
Content = 1,
|
||||
|
@ -4063,6 +4030,48 @@ pub enum StyleUserSelect {
|
|||
MozAll = 8,
|
||||
MozText = 9,
|
||||
}
|
||||
#[repr(i8)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub enum StyleDisplay {
|
||||
None_ = 0,
|
||||
Block = 1,
|
||||
Inline = 2,
|
||||
InlineBlock = 3,
|
||||
ListItem = 4,
|
||||
Table = 5,
|
||||
InlineTable = 6,
|
||||
TableRowGroup = 7,
|
||||
TableColumn = 8,
|
||||
TableColumnGroup = 9,
|
||||
TableHeaderGroup = 10,
|
||||
TableFooterGroup = 11,
|
||||
TableRow = 12,
|
||||
TableCell = 13,
|
||||
TableCaption = 14,
|
||||
Flex = 15,
|
||||
InlineFlex = 16,
|
||||
Grid = 17,
|
||||
InlineGrid = 18,
|
||||
Ruby = 19,
|
||||
RubyBase = 20,
|
||||
RubyBaseContainer = 21,
|
||||
RubyText = 22,
|
||||
RubyTextContainer = 23,
|
||||
Contents = 24,
|
||||
WebkitBox = 25,
|
||||
WebkitInlineBox = 26,
|
||||
Box = 27,
|
||||
InlineBox = 28,
|
||||
XulGrid = 29,
|
||||
InlineXulGrid = 30,
|
||||
XulGridGroup = 31,
|
||||
XulGridLine = 32,
|
||||
Stack = 33,
|
||||
InlineStack = 34,
|
||||
Deck = 35,
|
||||
Groupbox = 36,
|
||||
Popup = 37,
|
||||
}
|
||||
pub const eCSSProperty_COUNT_DUMMY: nsCSSPropertyID =
|
||||
nsCSSPropertyID::eCSSProperty_z_index;
|
||||
pub const eCSSProperty_all: nsCSSPropertyID =
|
||||
|
@ -4162,13 +4171,13 @@ pub enum nsCSSPropertyID {
|
|||
eCSSProperty_color_adjust = 80,
|
||||
eCSSProperty_color_interpolation = 81,
|
||||
eCSSProperty_color_interpolation_filters = 82,
|
||||
eCSSProperty__moz_column_count = 83,
|
||||
eCSSProperty__moz_column_fill = 84,
|
||||
eCSSProperty__moz_column_gap = 85,
|
||||
eCSSProperty__moz_column_rule_color = 86,
|
||||
eCSSProperty__moz_column_rule_style = 87,
|
||||
eCSSProperty__moz_column_rule_width = 88,
|
||||
eCSSProperty__moz_column_width = 89,
|
||||
eCSSProperty_column_count = 83,
|
||||
eCSSProperty_column_fill = 84,
|
||||
eCSSProperty_column_gap = 85,
|
||||
eCSSProperty_column_rule_color = 86,
|
||||
eCSSProperty_column_rule_style = 87,
|
||||
eCSSProperty_column_rule_width = 88,
|
||||
eCSSProperty_column_width = 89,
|
||||
eCSSProperty_contain = 90,
|
||||
eCSSProperty_content = 91,
|
||||
eCSSProperty__moz_control_character_visibility = 92,
|
||||
|
@ -4412,8 +4421,8 @@ pub enum nsCSSPropertyID {
|
|||
eCSSProperty_border_style = 330,
|
||||
eCSSProperty_border_top = 331,
|
||||
eCSSProperty_border_width = 332,
|
||||
eCSSProperty__moz_column_rule = 333,
|
||||
eCSSProperty__moz_columns = 334,
|
||||
eCSSProperty_column_rule = 333,
|
||||
eCSSProperty_columns = 334,
|
||||
eCSSProperty_flex = 335,
|
||||
eCSSProperty_flex_flow = 336,
|
||||
eCSSProperty_font = 337,
|
||||
|
@ -4644,29 +4653,29 @@ pub struct nsMainThreadPtrHandle<T> {
|
|||
pub enum CSSStyleSheet { }
|
||||
#[repr(C)]
|
||||
pub struct URLValueData {
|
||||
pub _bindgen_opaque_blob: [u64; 5usize],
|
||||
pub _bindgen_opaque_blob: [u64; 6usize],
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_URLValueData() {
|
||||
assert_eq!(::std::mem::size_of::<URLValueData>() , 40usize);
|
||||
assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize);
|
||||
assert_eq!(::std::mem::align_of::<URLValueData>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct URLValue {
|
||||
pub _bindgen_opaque_blob: [u64; 6usize],
|
||||
pub _bindgen_opaque_blob: [u64; 7usize],
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_URLValue() {
|
||||
assert_eq!(::std::mem::size_of::<URLValue>() , 48usize);
|
||||
assert_eq!(::std::mem::size_of::<URLValue>() , 56usize);
|
||||
assert_eq!(::std::mem::align_of::<URLValue>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct ImageValue {
|
||||
pub _bindgen_opaque_blob: [u64; 13usize],
|
||||
pub _bindgen_opaque_blob: [u64; 14usize],
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_ImageValue() {
|
||||
assert_eq!(::std::mem::size_of::<ImageValue>() , 104usize);
|
||||
assert_eq!(::std::mem::size_of::<ImageValue>() , 112usize);
|
||||
assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
|
@ -6456,14 +6465,14 @@ pub type StyleShapeOutside = StyleShapeSource<StyleShapeOutsideShapeBox>;
|
|||
#[repr(C)]
|
||||
pub struct nsStyleDisplay {
|
||||
pub mBinding: RefPtr<URLValue>,
|
||||
pub mDisplay: u8,
|
||||
pub mOriginalDisplay: u8,
|
||||
pub mDisplay: StyleDisplay,
|
||||
pub mOriginalDisplay: StyleDisplay,
|
||||
pub mContain: u8,
|
||||
pub mAppearance: u8,
|
||||
pub mPosition: u8,
|
||||
pub mFloat: StyleFloat,
|
||||
pub mOriginalFloat: StyleFloat,
|
||||
pub mBreakType: u8,
|
||||
pub mBreakType: StyleClear,
|
||||
pub mBreakInside: u8,
|
||||
pub mBreakBefore: bool,
|
||||
pub mBreakAfter: bool,
|
||||
|
|
|
@ -325,13 +325,6 @@ pub const NS_STYLE_BORDER_IMAGE_REPEAT_ROUND: ::std::os::raw::c_uint = 2;
|
|||
pub const NS_STYLE_BORDER_IMAGE_REPEAT_SPACE: ::std::os::raw::c_uint = 3;
|
||||
pub const NS_STYLE_BORDER_IMAGE_SLICE_NOFILL: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_BORDER_IMAGE_SLICE_FILL: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_CLEAR_NONE: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_CLEAR_LEFT: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_CLEAR_RIGHT: ::std::os::raw::c_uint = 2;
|
||||
pub const NS_STYLE_CLEAR_INLINE_START: ::std::os::raw::c_uint = 3;
|
||||
pub const NS_STYLE_CLEAR_INLINE_END: ::std::os::raw::c_uint = 4;
|
||||
pub const NS_STYLE_CLEAR_BOTH: ::std::os::raw::c_uint = 5;
|
||||
pub const NS_STYLE_CLEAR_LINE: ::std::os::raw::c_uint = 8;
|
||||
pub const NS_STYLE_CONTENT_OPEN_QUOTE: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_CONTENT_CLOSE_QUOTE: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_CONTENT_NO_OPEN_QUOTE: ::std::os::raw::c_uint = 2;
|
||||
|
@ -379,44 +372,6 @@ pub const NS_STYLE_WRITING_MODE_HORIZONTAL_TB: ::std::os::raw::c_uint = 0;
|
|||
pub const NS_STYLE_WRITING_MODE_VERTICAL_RL: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_WRITING_MODE_VERTICAL_LR: ::std::os::raw::c_uint = 3;
|
||||
pub const NS_STYLE_WRITING_MODE_SIDEWAYS_MASK: ::std::os::raw::c_uint = 4;
|
||||
pub const NS_STYLE_DISPLAY_NONE: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_DISPLAY_BLOCK: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_DISPLAY_INLINE: ::std::os::raw::c_uint = 2;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_BLOCK: ::std::os::raw::c_uint = 3;
|
||||
pub const NS_STYLE_DISPLAY_LIST_ITEM: ::std::os::raw::c_uint = 4;
|
||||
pub const NS_STYLE_DISPLAY_TABLE: ::std::os::raw::c_uint = 8;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_TABLE: ::std::os::raw::c_uint = 9;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_ROW_GROUP: ::std::os::raw::c_uint = 10;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_COLUMN: ::std::os::raw::c_uint = 11;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP: ::std::os::raw::c_uint = 12;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_HEADER_GROUP: ::std::os::raw::c_uint = 13;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP: ::std::os::raw::c_uint = 14;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_ROW: ::std::os::raw::c_uint = 15;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_CELL: ::std::os::raw::c_uint = 16;
|
||||
pub const NS_STYLE_DISPLAY_TABLE_CAPTION: ::std::os::raw::c_uint = 17;
|
||||
pub const NS_STYLE_DISPLAY_BOX: ::std::os::raw::c_uint = 18;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_BOX: ::std::os::raw::c_uint = 19;
|
||||
pub const NS_STYLE_DISPLAY_XUL_GRID: ::std::os::raw::c_uint = 20;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_XUL_GRID: ::std::os::raw::c_uint = 21;
|
||||
pub const NS_STYLE_DISPLAY_XUL_GRID_GROUP: ::std::os::raw::c_uint = 22;
|
||||
pub const NS_STYLE_DISPLAY_XUL_GRID_LINE: ::std::os::raw::c_uint = 23;
|
||||
pub const NS_STYLE_DISPLAY_STACK: ::std::os::raw::c_uint = 24;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_STACK: ::std::os::raw::c_uint = 25;
|
||||
pub const NS_STYLE_DISPLAY_DECK: ::std::os::raw::c_uint = 26;
|
||||
pub const NS_STYLE_DISPLAY_POPUP: ::std::os::raw::c_uint = 27;
|
||||
pub const NS_STYLE_DISPLAY_GROUPBOX: ::std::os::raw::c_uint = 28;
|
||||
pub const NS_STYLE_DISPLAY_FLEX: ::std::os::raw::c_uint = 29;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_FLEX: ::std::os::raw::c_uint = 30;
|
||||
pub const NS_STYLE_DISPLAY_GRID: ::std::os::raw::c_uint = 31;
|
||||
pub const NS_STYLE_DISPLAY_INLINE_GRID: ::std::os::raw::c_uint = 32;
|
||||
pub const NS_STYLE_DISPLAY_RUBY: ::std::os::raw::c_uint = 33;
|
||||
pub const NS_STYLE_DISPLAY_RUBY_BASE: ::std::os::raw::c_uint = 34;
|
||||
pub const NS_STYLE_DISPLAY_RUBY_BASE_CONTAINER: ::std::os::raw::c_uint = 35;
|
||||
pub const NS_STYLE_DISPLAY_RUBY_TEXT: ::std::os::raw::c_uint = 36;
|
||||
pub const NS_STYLE_DISPLAY_RUBY_TEXT_CONTAINER: ::std::os::raw::c_uint = 37;
|
||||
pub const NS_STYLE_DISPLAY_CONTENTS: ::std::os::raw::c_uint = 38;
|
||||
pub const NS_STYLE_DISPLAY_WEBKIT_BOX: ::std::os::raw::c_uint = 39;
|
||||
pub const NS_STYLE_DISPLAY_WEBKIT_INLINE_BOX: ::std::os::raw::c_uint = 40;
|
||||
pub const NS_STYLE_CONTAIN_NONE: ::std::os::raw::c_uint = 0;
|
||||
pub const NS_STYLE_CONTAIN_STRICT: ::std::os::raw::c_uint = 1;
|
||||
pub const NS_STYLE_CONTAIN_LAYOUT: ::std::os::raw::c_uint = 2;
|
||||
|
@ -2547,6 +2502,41 @@ pub struct pair<_T1, _T2> {
|
|||
pub first: _T1,
|
||||
pub second: _T2,
|
||||
}
|
||||
pub enum nsIContentSecurityPolicy { }
|
||||
pub enum nsIDOMDocument { }
|
||||
#[repr(C)]
|
||||
pub struct nsIPrincipal {
|
||||
pub _bindgen_opaque_blob: u64,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsIPrincipal() {
|
||||
assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
|
||||
assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsIExpandedPrincipal {
|
||||
pub _base: nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct _vftable_nsIExpandedPrincipal {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl ::std::clone::Clone for nsIExpandedPrincipal {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsIURI {
|
||||
pub _base: nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct _vftable_nsIURI {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl ::std::clone::Clone for nsIURI {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
pub type PLDHashNumber = u32;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
|
@ -2743,41 +2733,6 @@ impl ::std::clone::Clone for VoidPtrHashKey {
|
|||
}
|
||||
#[repr(C)]
|
||||
pub struct nsDataHashtable;
|
||||
pub enum nsIContentSecurityPolicy { }
|
||||
pub enum nsIDOMDocument { }
|
||||
#[repr(C)]
|
||||
pub struct nsIPrincipal {
|
||||
pub _bindgen_opaque_blob: u64,
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_nsIPrincipal() {
|
||||
assert_eq!(::std::mem::size_of::<nsIPrincipal>() , 8usize);
|
||||
assert_eq!(::std::mem::align_of::<nsIPrincipal>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsIExpandedPrincipal {
|
||||
pub _base: nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct _vftable_nsIExpandedPrincipal {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl ::std::clone::Clone for nsIExpandedPrincipal {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct nsIURI {
|
||||
pub _base: nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct _vftable_nsIURI {
|
||||
pub _base: _vftable_nsISupports,
|
||||
}
|
||||
impl ::std::clone::Clone for nsIURI {
|
||||
fn clone(&self) -> Self { *self }
|
||||
}
|
||||
pub type nsLoadFlags = u32;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
|
@ -3411,7 +3366,7 @@ pub enum nsAttrValue_ValueType {
|
|||
* EnumTable myTable[] = {
|
||||
* { "string1", 1 },
|
||||
* { "string2", 2 },
|
||||
* { 0 }
|
||||
* { nullptr, 0 }
|
||||
* }
|
||||
*/
|
||||
#[repr(C)]
|
||||
|
@ -3979,6 +3934,18 @@ pub enum StyleBoxSizing { Content = 0, Border = 1, }
|
|||
pub enum StyleBoxShadowType { Inset = 0, }
|
||||
#[repr(i8)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub enum StyleClear {
|
||||
None_ = 0,
|
||||
Left = 1,
|
||||
Right = 2,
|
||||
InlineStart = 3,
|
||||
InlineEnd = 4,
|
||||
Both = 5,
|
||||
Line = 8,
|
||||
Max = 13,
|
||||
}
|
||||
#[repr(i8)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub enum StyleClipPathGeometryBox {
|
||||
NoBox = 0,
|
||||
Content = 1,
|
||||
|
@ -4042,6 +4009,48 @@ pub enum StyleUserSelect {
|
|||
MozAll = 8,
|
||||
MozText = 9,
|
||||
}
|
||||
#[repr(i8)]
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub enum StyleDisplay {
|
||||
None_ = 0,
|
||||
Block = 1,
|
||||
Inline = 2,
|
||||
InlineBlock = 3,
|
||||
ListItem = 4,
|
||||
Table = 5,
|
||||
InlineTable = 6,
|
||||
TableRowGroup = 7,
|
||||
TableColumn = 8,
|
||||
TableColumnGroup = 9,
|
||||
TableHeaderGroup = 10,
|
||||
TableFooterGroup = 11,
|
||||
TableRow = 12,
|
||||
TableCell = 13,
|
||||
TableCaption = 14,
|
||||
Flex = 15,
|
||||
InlineFlex = 16,
|
||||
Grid = 17,
|
||||
InlineGrid = 18,
|
||||
Ruby = 19,
|
||||
RubyBase = 20,
|
||||
RubyBaseContainer = 21,
|
||||
RubyText = 22,
|
||||
RubyTextContainer = 23,
|
||||
Contents = 24,
|
||||
WebkitBox = 25,
|
||||
WebkitInlineBox = 26,
|
||||
Box = 27,
|
||||
InlineBox = 28,
|
||||
XulGrid = 29,
|
||||
InlineXulGrid = 30,
|
||||
XulGridGroup = 31,
|
||||
XulGridLine = 32,
|
||||
Stack = 33,
|
||||
InlineStack = 34,
|
||||
Deck = 35,
|
||||
Groupbox = 36,
|
||||
Popup = 37,
|
||||
}
|
||||
pub const eCSSProperty_COUNT_DUMMY: nsCSSPropertyID =
|
||||
nsCSSPropertyID::eCSSProperty_z_index;
|
||||
pub const eCSSProperty_all: nsCSSPropertyID =
|
||||
|
@ -4141,13 +4150,13 @@ pub enum nsCSSPropertyID {
|
|||
eCSSProperty_color_adjust = 80,
|
||||
eCSSProperty_color_interpolation = 81,
|
||||
eCSSProperty_color_interpolation_filters = 82,
|
||||
eCSSProperty__moz_column_count = 83,
|
||||
eCSSProperty__moz_column_fill = 84,
|
||||
eCSSProperty__moz_column_gap = 85,
|
||||
eCSSProperty__moz_column_rule_color = 86,
|
||||
eCSSProperty__moz_column_rule_style = 87,
|
||||
eCSSProperty__moz_column_rule_width = 88,
|
||||
eCSSProperty__moz_column_width = 89,
|
||||
eCSSProperty_column_count = 83,
|
||||
eCSSProperty_column_fill = 84,
|
||||
eCSSProperty_column_gap = 85,
|
||||
eCSSProperty_column_rule_color = 86,
|
||||
eCSSProperty_column_rule_style = 87,
|
||||
eCSSProperty_column_rule_width = 88,
|
||||
eCSSProperty_column_width = 89,
|
||||
eCSSProperty_contain = 90,
|
||||
eCSSProperty_content = 91,
|
||||
eCSSProperty__moz_control_character_visibility = 92,
|
||||
|
@ -4391,8 +4400,8 @@ pub enum nsCSSPropertyID {
|
|||
eCSSProperty_border_style = 330,
|
||||
eCSSProperty_border_top = 331,
|
||||
eCSSProperty_border_width = 332,
|
||||
eCSSProperty__moz_column_rule = 333,
|
||||
eCSSProperty__moz_columns = 334,
|
||||
eCSSProperty_column_rule = 333,
|
||||
eCSSProperty_columns = 334,
|
||||
eCSSProperty_flex = 335,
|
||||
eCSSProperty_flex_flow = 336,
|
||||
eCSSProperty_font = 337,
|
||||
|
@ -4623,29 +4632,29 @@ pub struct nsMainThreadPtrHandle<T> {
|
|||
pub enum CSSStyleSheet { }
|
||||
#[repr(C)]
|
||||
pub struct URLValueData {
|
||||
pub _bindgen_opaque_blob: [u64; 5usize],
|
||||
pub _bindgen_opaque_blob: [u64; 6usize],
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_URLValueData() {
|
||||
assert_eq!(::std::mem::size_of::<URLValueData>() , 40usize);
|
||||
assert_eq!(::std::mem::size_of::<URLValueData>() , 48usize);
|
||||
assert_eq!(::std::mem::align_of::<URLValueData>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct URLValue {
|
||||
pub _bindgen_opaque_blob: [u64; 6usize],
|
||||
pub _bindgen_opaque_blob: [u64; 7usize],
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_URLValue() {
|
||||
assert_eq!(::std::mem::size_of::<URLValue>() , 48usize);
|
||||
assert_eq!(::std::mem::size_of::<URLValue>() , 56usize);
|
||||
assert_eq!(::std::mem::align_of::<URLValue>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct ImageValue {
|
||||
pub _bindgen_opaque_blob: [u64; 12usize],
|
||||
pub _bindgen_opaque_blob: [u64; 13usize],
|
||||
}
|
||||
#[test]
|
||||
fn bindgen_test_layout_ImageValue() {
|
||||
assert_eq!(::std::mem::size_of::<ImageValue>() , 96usize);
|
||||
assert_eq!(::std::mem::size_of::<ImageValue>() , 104usize);
|
||||
assert_eq!(::std::mem::align_of::<ImageValue>() , 8usize);
|
||||
}
|
||||
#[repr(C)]
|
||||
|
@ -6434,14 +6443,14 @@ pub type StyleShapeOutside = StyleShapeSource<StyleShapeOutsideShapeBox>;
|
|||
#[repr(C)]
|
||||
pub struct nsStyleDisplay {
|
||||
pub mBinding: RefPtr<URLValue>,
|
||||
pub mDisplay: u8,
|
||||
pub mOriginalDisplay: u8,
|
||||
pub mDisplay: StyleDisplay,
|
||||
pub mOriginalDisplay: StyleDisplay,
|
||||
pub mContain: u8,
|
||||
pub mAppearance: u8,
|
||||
pub mPosition: u8,
|
||||
pub mFloat: StyleFloat,
|
||||
pub mOriginalFloat: StyleFloat,
|
||||
pub mBreakType: u8,
|
||||
pub mBreakType: StyleClear,
|
||||
pub mBreakInside: u8,
|
||||
pub mBreakBefore: bool,
|
||||
pub mBreakAfter: bool,
|
||||
|
|
|
@ -8,16 +8,14 @@ use app_units::Au;
|
|||
use data::{NUM_THREADS, PerDocumentStyleData};
|
||||
use env_logger;
|
||||
use euclid::Size2D;
|
||||
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
|
||||
use gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
|
||||
use gecko_bindings::bindings::{RawServoStyleSet, RawServoStyleSetBorrowedMut};
|
||||
use gecko_bindings::bindings::{RawServoStyleSetBorrowed, RawServoStyleSetOwned, ServoNodeDataOwned};
|
||||
use gecko_bindings::bindings::{RawServoStyleSetBorrowedMut, RawGeckoDocumentBorrowed};
|
||||
use gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed};
|
||||
use gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong};
|
||||
use gecko_bindings::bindings::{ServoComputedValuesBorrowedOrNull, ServoDeclarationBlock};
|
||||
use gecko_bindings::bindings::{ServoDeclarationBlockBorrowed, ServoDeclarationBlockStrong};
|
||||
use gecko_bindings::bindings::{ThreadSafePrincipalHolder, ThreadSafeURIHolder, nsHTMLCSSStyleSheet};
|
||||
use gecko_bindings::bindings::RawGeckoDocumentBorrowed;
|
||||
use gecko_bindings::ptr::{GeckoArcPrincipal, GeckoArcURI};
|
||||
use gecko_bindings::structs::{SheetParsingMode, nsIAtom};
|
||||
use gecko_bindings::structs::ServoElementSnapshot;
|
||||
|
@ -234,7 +232,7 @@ pub extern "C" fn Servo_StyleSheet_Release(sheet: RawServoStyleSheetBorrowed) ->
|
|||
#[no_mangle]
|
||||
pub extern "C" fn Servo_ComputedValues_Get(node: RawGeckoNodeBorrowed)
|
||||
-> ServoComputedValuesStrong {
|
||||
let node = unsafe { GeckoNode(node) };
|
||||
let node = GeckoNode(node);
|
||||
let arc_cv = match node.borrow_data().map_or(None, |data| data.style.clone()) {
|
||||
Some(style) => style,
|
||||
None => {
|
||||
|
@ -291,7 +289,7 @@ pub extern "C" fn Servo_ComputedValues_GetForPseudoElement(parent_style: ServoCo
|
|||
let data = PerDocumentStyleData::from_ffi_mut(raw_data);
|
||||
data.flush_stylesheets();
|
||||
|
||||
let element = unsafe { GeckoElement(match_element) };
|
||||
let element = GeckoElement(match_element);
|
||||
|
||||
|
||||
match GeckoSelectorImpl::pseudo_element_cascade_type(&pseudo) {
|
||||
|
@ -424,7 +422,7 @@ pub extern "C" fn Servo_ComputeRestyleHint(element: RawGeckoElementBorrowed,
|
|||
raw_data: RawServoStyleSetBorrowed) -> nsRestyleHint {
|
||||
let per_doc_data = PerDocumentStyleData::from_ffi(raw_data);
|
||||
let snapshot = unsafe { GeckoElementSnapshot::from_raw(snapshot) };
|
||||
let element = unsafe { GeckoElement(element) };
|
||||
let element = GeckoElement(element);
|
||||
|
||||
// NB: This involves an FFI call, we can get rid of it easily if needed.
|
||||
let current_state = element.get_state();
|
||||
|
|
|
@ -19,7 +19,6 @@ use gecko_bindings::bindings::{Gecko_IsLink, Gecko_IsRootElement, Gecko_IsTextNo
|
|||
use gecko_bindings::bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink};
|
||||
use gecko_bindings::bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsElement, Gecko_SetNodeData};
|
||||
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
|
||||
use gecko_bindings::bindings::{RawGeckoElementBorrowed, RawGeckoNodeBorrowed};
|
||||
use gecko_bindings::bindings::Gecko_ClassOrClassList;
|
||||
use gecko_bindings::bindings::Gecko_GetNodeData;
|
||||
use gecko_bindings::bindings::Gecko_GetStyleContext;
|
||||
|
@ -36,7 +35,6 @@ use selectors::parser::{AttrSelector, NamespaceConstraint};
|
|||
use snapshot::GeckoElementSnapshot;
|
||||
use snapshot_helpers;
|
||||
use std::fmt;
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::BitOr;
|
||||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
|
|
Загрузка…
Ссылка в новой задаче