mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #12599 - Manishearth:sync, r=heycam
Resync stylo bindings Now at gecko-dev 13b9d03a21091cfcd797ab89decec2dde9114781 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12599) <!-- Reviewable:end -->
This commit is contained in:
commit
d6266c7cee
9 changed files with 118 additions and 107 deletions
|
@ -18,11 +18,15 @@ def to_camel_case(ident):
|
||||||
|
|
||||||
class Keyword(object):
|
class Keyword(object):
|
||||||
def __init__(self, name, values, gecko_constant_prefix=None,
|
def __init__(self, name, values, gecko_constant_prefix=None,
|
||||||
|
gecko_enum_prefix=None,
|
||||||
extra_gecko_values=None, extra_servo_values=None):
|
extra_gecko_values=None, extra_servo_values=None):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.values = values.split()
|
self.values = values.split()
|
||||||
|
if gecko_constant_prefix and gecko_enum_prefix:
|
||||||
|
raise TypeError("Only one of gecko_constant_prefix and gecko_enum_prefix can be specified")
|
||||||
self.gecko_constant_prefix = gecko_constant_prefix or \
|
self.gecko_constant_prefix = gecko_constant_prefix or \
|
||||||
"NS_STYLE_" + self.name.upper().replace("-", "_")
|
"NS_STYLE_" + self.name.upper().replace("-", "_")
|
||||||
|
self.gecko_enum_prefix = gecko_enum_prefix
|
||||||
self.extra_gecko_values = (extra_gecko_values or "").split()
|
self.extra_gecko_values = (extra_gecko_values or "").split()
|
||||||
self.extra_servo_values = (extra_servo_values or "").split()
|
self.extra_servo_values = (extra_servo_values or "").split()
|
||||||
|
|
||||||
|
@ -41,7 +45,18 @@ class Keyword(object):
|
||||||
raise Exception("Bad product: " + product)
|
raise Exception("Bad product: " + product)
|
||||||
|
|
||||||
def gecko_constant(self, value):
|
def gecko_constant(self, value):
|
||||||
return self.gecko_constant_prefix + "_" + value.replace("-moz-", "").replace("-", "_").upper()
|
if self.gecko_enum_prefix:
|
||||||
|
if value == "none":
|
||||||
|
return self.gecko_enum_prefix + "::None_"
|
||||||
|
else:
|
||||||
|
parts = value.replace("-moz-", "").split("-")
|
||||||
|
parts = [p.title() for p in parts]
|
||||||
|
return self.gecko_enum_prefix + "::" + "".join(parts)
|
||||||
|
else:
|
||||||
|
return self.gecko_constant_prefix + "_" + value.replace("-moz-", "").replace("-", "_").upper()
|
||||||
|
|
||||||
|
def needs_cast(self):
|
||||||
|
return self.gecko_enum_prefix is None
|
||||||
|
|
||||||
|
|
||||||
class Longhand(object):
|
class Longhand(object):
|
||||||
|
|
|
@ -194,7 +194,11 @@ def set_gecko_property(ffi_name, expr):
|
||||||
// FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
|
// FIXME(bholley): Align binary representations and ditch |match| for cast + static_asserts
|
||||||
let result = match v {
|
let result = match v {
|
||||||
% for value in keyword.values_for('gecko'):
|
% for value in keyword.values_for('gecko'):
|
||||||
Keyword::${to_rust_ident(value)} => structs::${keyword.gecko_constant(value)} as u8,
|
% if keyword.needs_cast():
|
||||||
|
Keyword::${to_rust_ident(value)} => structs::${keyword.gecko_constant(value)} as u8,
|
||||||
|
% else:
|
||||||
|
Keyword::${to_rust_ident(value)} => structs::${keyword.gecko_constant(value)},
|
||||||
|
% endif
|
||||||
% endfor
|
% endfor
|
||||||
};
|
};
|
||||||
${set_gecko_property(gecko_ffi_name, "result")}
|
${set_gecko_property(gecko_ffi_name, "result")}
|
||||||
|
|
|
@ -289,7 +289,8 @@
|
||||||
<%def name="single_keyword_computed(name, values, **kwargs)">
|
<%def name="single_keyword_computed(name, values, **kwargs)">
|
||||||
<%
|
<%
|
||||||
keyword_kwargs = {a: kwargs.pop(a, None) for a in [
|
keyword_kwargs = {a: kwargs.pop(a, None) for a in [
|
||||||
'gecko_constant_prefix', 'extra_gecko_values', 'extra_servo_values'
|
'gecko_constant_prefix', 'gecko_enum_prefix',
|
||||||
|
'extra_gecko_values', 'extra_servo_values',
|
||||||
]}
|
]}
|
||||||
%>
|
%>
|
||||||
<%call expr="longhand(name, keyword=Keyword(name, values, **keyword_kwargs), **kwargs)">
|
<%call expr="longhand(name, keyword=Keyword(name, values, **keyword_kwargs), **kwargs)">
|
||||||
|
@ -317,7 +318,8 @@
|
||||||
<%def name="keyword_list(name, values, **kwargs)">
|
<%def name="keyword_list(name, values, **kwargs)">
|
||||||
<%
|
<%
|
||||||
keyword_kwargs = {a: kwargs.pop(a, None) for a in [
|
keyword_kwargs = {a: kwargs.pop(a, None) for a in [
|
||||||
'gecko_constant_prefix', 'extra_gecko_values', 'extra_servo_values'
|
'gecko_constant_prefix', 'gecko_enum_prefix',
|
||||||
|
'extra_gecko_values', 'extra_servo_values',
|
||||||
]}
|
]}
|
||||||
%>
|
%>
|
||||||
<%call expr="longhand(name, keyword=Keyword(name, values, **keyword_kwargs), **kwargs)">
|
<%call expr="longhand(name, keyword=Keyword(name, values, **keyword_kwargs), **kwargs)">
|
||||||
|
|
|
@ -82,6 +82,6 @@ ${helpers.single_keyword("box-decoration-break", "slice clone",
|
||||||
|
|
||||||
${helpers.single_keyword("-moz-float-edge", "content-box margin-box",
|
${helpers.single_keyword("-moz-float-edge", "content-box margin-box",
|
||||||
gecko_ffi_name="mFloatEdge",
|
gecko_ffi_name="mFloatEdge",
|
||||||
gecko_constant_prefix="NS_STYLE_FLOAT_EDGE",
|
gecko_enum_prefix="StyleFloatEdge",
|
||||||
products="gecko",
|
products="gecko",
|
||||||
animatable=False)}
|
animatable=False)}
|
||||||
|
|
|
@ -71,5 +71,5 @@ ${helpers.single_keyword("-moz-user-modify", "read-only read-write write-only",
|
||||||
${helpers.single_keyword("-moz-user-focus",
|
${helpers.single_keyword("-moz-user-focus",
|
||||||
"ignore normal select-after select-before select-menu select-same select-all none",
|
"ignore normal select-after select-before select-menu select-same select-all none",
|
||||||
products="gecko", gecko_ffi_name="mUserFocus",
|
products="gecko", gecko_ffi_name="mUserFocus",
|
||||||
gecko_constant_prefix="NS_STYLE_USER_FOCUS",
|
gecko_enum_prefix="StyleUserFocus",
|
||||||
animatable=False)}
|
animatable=False)}
|
||||||
|
|
|
@ -365,11 +365,11 @@ extern "C" {
|
||||||
set: *mut RawServoStyleSet);
|
set: *mut RawServoStyleSet);
|
||||||
pub fn Servo_RestyleSubtree(node: *mut RawGeckoNode,
|
pub fn Servo_RestyleSubtree(node: *mut RawGeckoNode,
|
||||||
set: *mut RawServoStyleSet);
|
set: *mut RawServoStyleSet);
|
||||||
|
pub fn Servo_StyleWorkerThreadCount() -> u32;
|
||||||
pub fn Servo_ComputeRestyleHint(element: *mut RawGeckoElement,
|
pub fn Servo_ComputeRestyleHint(element: *mut RawGeckoElement,
|
||||||
snapshot: *mut ServoElementSnapshot,
|
snapshot: *mut ServoElementSnapshot,
|
||||||
set: *mut RawServoStyleSet)
|
set: *mut RawServoStyleSet)
|
||||||
-> nsRestyleHint;
|
-> nsRestyleHint;
|
||||||
pub fn Servo_StyleWorkerThreadCount() -> u32;
|
|
||||||
pub fn Gecko_Construct_nsStyleFont(ptr: *mut nsStyleFont);
|
pub fn Gecko_Construct_nsStyleFont(ptr: *mut nsStyleFont);
|
||||||
pub fn Gecko_CopyConstruct_nsStyleFont(ptr: *mut nsStyleFont,
|
pub fn Gecko_CopyConstruct_nsStyleFont(ptr: *mut nsStyleFont,
|
||||||
other: *const nsStyleFont);
|
other: *const nsStyleFont);
|
||||||
|
|
|
@ -188,12 +188,6 @@ pub const NS_ERROR_MODULE_BASE_OFFSET: ::std::os::raw::c_uint = 69;
|
||||||
pub const MOZ_STRING_WITH_OBSOLETE_API: ::std::os::raw::c_uint = 1;
|
pub const MOZ_STRING_WITH_OBSOLETE_API: ::std::os::raw::c_uint = 1;
|
||||||
pub const NSID_LENGTH: ::std::os::raw::c_uint = 39;
|
pub const NSID_LENGTH: ::std::os::raw::c_uint = 39;
|
||||||
pub const NS_NUMBER_OF_FLAGS_IN_REFCNT: ::std::os::raw::c_uint = 2;
|
pub const NS_NUMBER_OF_FLAGS_IN_REFCNT: ::std::os::raw::c_uint = 2;
|
||||||
pub const _STL_PAIR_H: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const _GLIBCXX_UTILITY: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const __cpp_lib_tuple_element_t: ::std::os::raw::c_uint = 201402;
|
|
||||||
pub const __cpp_lib_tuples_by_type: ::std::os::raw::c_uint = 201304;
|
|
||||||
pub const __cpp_lib_exchange_function: ::std::os::raw::c_uint = 201304;
|
|
||||||
pub const __cpp_lib_integer_sequence: ::std::os::raw::c_uint = 201304;
|
|
||||||
pub const NS_EVENT_STATE_HIGHEST_SERVO_BIT: ::std::os::raw::c_uint = 6;
|
pub const NS_EVENT_STATE_HIGHEST_SERVO_BIT: ::std::os::raw::c_uint = 6;
|
||||||
pub const DOM_USER_DATA: ::std::os::raw::c_uint = 1;
|
pub const DOM_USER_DATA: ::std::os::raw::c_uint = 1;
|
||||||
pub const SMIL_MAPPED_ATTR_ANIMVAL: ::std::os::raw::c_uint = 2;
|
pub const SMIL_MAPPED_ATTR_ANIMVAL: ::std::os::raw::c_uint = 2;
|
||||||
|
@ -212,29 +206,6 @@ pub const NS_CORNER_BOTTOM_RIGHT_X: ::std::os::raw::c_uint = 4;
|
||||||
pub const NS_CORNER_BOTTOM_RIGHT_Y: ::std::os::raw::c_uint = 5;
|
pub const NS_CORNER_BOTTOM_RIGHT_Y: ::std::os::raw::c_uint = 5;
|
||||||
pub const NS_CORNER_BOTTOM_LEFT_X: ::std::os::raw::c_uint = 6;
|
pub const NS_CORNER_BOTTOM_LEFT_X: ::std::os::raw::c_uint = 6;
|
||||||
pub const NS_CORNER_BOTTOM_LEFT_Y: ::std::os::raw::c_uint = 7;
|
pub const NS_CORNER_BOTTOM_LEFT_Y: ::std::os::raw::c_uint = 7;
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_NOBOX: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_CONTENT: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_PADDING: ::std::os::raw::c_uint = 2;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_BORDER: ::std::os::raw::c_uint = 3;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_MARGIN: ::std::os::raw::c_uint = 4;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_FILL: ::std::os::raw::c_uint = 5;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_STROKE: ::std::os::raw::c_uint = 6;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_VIEW: ::std::os::raw::c_uint = 7;
|
|
||||||
pub const NS_STYLE_BASIC_SHAPE_POLYGON: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_BASIC_SHAPE_CIRCLE: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_BASIC_SHAPE_ELLIPSE: ::std::os::raw::c_uint = 2;
|
|
||||||
pub const NS_STYLE_BASIC_SHAPE_INSET: ::std::os::raw::c_uint = 3;
|
|
||||||
pub const NS_STYLE_BOX_SHADOW_INSET: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_FLOAT_EDGE_CONTENT_BOX: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_FLOAT_EDGE_MARGIN_BOX: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_NONE: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_IGNORE: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_NORMAL: ::std::os::raw::c_uint = 2;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_ALL: ::std::os::raw::c_uint = 3;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_BEFORE: ::std::os::raw::c_uint = 4;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_AFTER: ::std::os::raw::c_uint = 5;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_SAME: ::std::os::raw::c_uint = 6;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_MENU: ::std::os::raw::c_uint = 7;
|
|
||||||
pub const NS_STYLE_USER_SELECT_NONE: ::std::os::raw::c_uint = 0;
|
pub const NS_STYLE_USER_SELECT_NONE: ::std::os::raw::c_uint = 0;
|
||||||
pub const NS_STYLE_USER_SELECT_TEXT: ::std::os::raw::c_uint = 1;
|
pub const NS_STYLE_USER_SELECT_TEXT: ::std::os::raw::c_uint = 1;
|
||||||
pub const NS_STYLE_USER_SELECT_ELEMENT: ::std::os::raw::c_uint = 2;
|
pub const NS_STYLE_USER_SELECT_ELEMENT: ::std::os::raw::c_uint = 2;
|
||||||
|
@ -511,10 +482,6 @@ pub const NS_STYLE_FLOAT_LEFT: ::std::os::raw::c_uint = 1;
|
||||||
pub const NS_STYLE_FLOAT_RIGHT: ::std::os::raw::c_uint = 2;
|
pub const NS_STYLE_FLOAT_RIGHT: ::std::os::raw::c_uint = 2;
|
||||||
pub const NS_STYLE_FLOAT_INLINE_START: ::std::os::raw::c_uint = 3;
|
pub const NS_STYLE_FLOAT_INLINE_START: ::std::os::raw::c_uint = 3;
|
||||||
pub const NS_STYLE_FLOAT_INLINE_END: ::std::os::raw::c_uint = 4;
|
pub const NS_STYLE_FLOAT_INLINE_END: ::std::os::raw::c_uint = 4;
|
||||||
pub const NS_STYLE_CLIP_PATH_NONE: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_CLIP_PATH_URL: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_CLIP_PATH_SHAPE: ::std::os::raw::c_uint = 2;
|
|
||||||
pub const NS_STYLE_CLIP_PATH_BOX: ::std::os::raw::c_uint = 3;
|
|
||||||
pub const NS_STYLE_FILTER_NONE: ::std::os::raw::c_uint = 0;
|
pub const NS_STYLE_FILTER_NONE: ::std::os::raw::c_uint = 0;
|
||||||
pub const NS_STYLE_FILTER_URL: ::std::os::raw::c_uint = 1;
|
pub const NS_STYLE_FILTER_URL: ::std::os::raw::c_uint = 1;
|
||||||
pub const NS_STYLE_FILTER_BLUR: ::std::os::raw::c_uint = 2;
|
pub const NS_STYLE_FILTER_BLUR: ::std::os::raw::c_uint = 2;
|
||||||
|
@ -2735,12 +2702,6 @@ impl ::std::clone::Clone for nsIExpandedPrincipal {
|
||||||
fn clone(&self) -> Self { *self }
|
fn clone(&self) -> Self { *self }
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
|
||||||
pub struct _Make_integer_sequence<_Tp, _ISeq> {
|
|
||||||
pub _phantom0: ::std::marker::PhantomData<_Tp>,
|
|
||||||
pub _phantom1: ::std::marker::PhantomData<_ISeq>,
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct nsIURI {
|
pub struct nsIURI {
|
||||||
pub _base: nsISupports,
|
pub _base: nsISupports,
|
||||||
|
@ -2792,7 +2753,7 @@ impl ::std::clone::Clone for nsIRequest {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct EventStates {
|
pub struct EventStates {
|
||||||
pub mStates: ::std::os::raw::c_ulong,
|
pub mStates: ::std::os::raw::c_ulonglong,
|
||||||
}
|
}
|
||||||
impl ::std::clone::Clone for EventStates {
|
impl ::std::clone::Clone for EventStates {
|
||||||
fn clone(&self) -> Self { *self }
|
fn clone(&self) -> Self { *self }
|
||||||
|
@ -2922,7 +2883,7 @@ fn bindgen_test_layout_nsMutationGuard() {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#[link_name = "_ZN15nsMutationGuard11sGenerationE"]
|
#[link_name = "_ZN15nsMutationGuard11sGenerationE"]
|
||||||
pub static mut nsMutationGuard_consts_sGeneration:
|
pub static mut nsMutationGuard_consts_sGeneration:
|
||||||
::std::os::raw::c_ulong;
|
::std::os::raw::c_ulonglong;
|
||||||
}
|
}
|
||||||
pub type Float = f32;
|
pub type Float = f32;
|
||||||
#[repr(i8)]
|
#[repr(i8)]
|
||||||
|
@ -3022,6 +2983,7 @@ pub enum FontType {
|
||||||
SKIA = 3,
|
SKIA = 3,
|
||||||
CAIRO = 4,
|
CAIRO = 4,
|
||||||
COREGRAPHICS = 5,
|
COREGRAPHICS = 5,
|
||||||
|
FONTCONFIG = 6,
|
||||||
}
|
}
|
||||||
#[repr(i8)]
|
#[repr(i8)]
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
@ -3918,7 +3880,43 @@ fn bindgen_test_layout_nsFont() {
|
||||||
}
|
}
|
||||||
#[repr(i8)]
|
#[repr(i8)]
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleBasicShape { Polygon = 0, Circle = 1, Ellipse = 2, Inset = 3, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
pub enum StyleBoxSizing { Content = 0, Border = 1, }
|
pub enum StyleBoxSizing { Content = 0, Border = 1, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleBoxShadowType { Inset = 0, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleClipPathType { None_ = 0, URL = 1, Shape = 2, Box = 3, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleClipShapeSizing {
|
||||||
|
NoBox = 0,
|
||||||
|
Content = 1,
|
||||||
|
Padding = 2,
|
||||||
|
Border = 3,
|
||||||
|
Margin = 4,
|
||||||
|
Fill = 5,
|
||||||
|
Stroke = 6,
|
||||||
|
View = 7,
|
||||||
|
}
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleFloatEdge { ContentBox = 0, MarginBox = 1, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleUserFocus {
|
||||||
|
None_ = 0,
|
||||||
|
Ignore = 1,
|
||||||
|
Normal = 2,
|
||||||
|
SelectAll = 3,
|
||||||
|
SelectBefore = 4,
|
||||||
|
SelectAfter = 5,
|
||||||
|
SelectSame = 6,
|
||||||
|
SelectMenu = 7,
|
||||||
|
}
|
||||||
pub const eCSSProperty_COUNT_DUMMY: nsCSSProperty =
|
pub const eCSSProperty_COUNT_DUMMY: nsCSSProperty =
|
||||||
nsCSSProperty::eCSSProperty_z_index;
|
nsCSSProperty::eCSSProperty_z_index;
|
||||||
pub const eCSSProperty_all: nsCSSProperty =
|
pub const eCSSProperty_all: nsCSSProperty =
|
||||||
|
@ -5598,7 +5596,7 @@ pub struct nsStyleBorder {
|
||||||
pub mBorderImageFill: u8,
|
pub mBorderImageFill: u8,
|
||||||
pub mBorderImageRepeatH: u8,
|
pub mBorderImageRepeatH: u8,
|
||||||
pub mBorderImageRepeatV: u8,
|
pub mBorderImageRepeatV: u8,
|
||||||
pub mFloatEdge: u8,
|
pub mFloatEdge: StyleFloatEdge,
|
||||||
pub mBoxDecorationBreak: u8,
|
pub mBoxDecorationBreak: u8,
|
||||||
pub mComputedBorder: nsMargin,
|
pub mComputedBorder: nsMargin,
|
||||||
pub mBorder: nsMargin,
|
pub mBorder: nsMargin,
|
||||||
|
@ -6171,7 +6169,7 @@ fn bindgen_test_layout_nsCursorImage() {
|
||||||
pub struct nsStyleUserInterface {
|
pub struct nsStyleUserInterface {
|
||||||
pub mUserInput: u8,
|
pub mUserInput: u8,
|
||||||
pub mUserModify: u8,
|
pub mUserModify: u8,
|
||||||
pub mUserFocus: u8,
|
pub mUserFocus: StyleUserFocus,
|
||||||
pub mPointerEvents: u8,
|
pub mPointerEvents: u8,
|
||||||
pub mCursor: u8,
|
pub mCursor: u8,
|
||||||
pub mCursorArrayLength: u32,
|
pub mCursorArrayLength: u32,
|
||||||
|
@ -6334,9 +6332,9 @@ fn bindgen_test_layout_nsStyleBasicShape() {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct nsStyleClipPath {
|
pub struct nsStyleClipPath {
|
||||||
pub mType: i32,
|
|
||||||
pub nsStyleClipPath_nsStyleStruct_h_unnamed_29: nsStyleClipPath_nsStyleStruct_h_unnamed_29,
|
pub nsStyleClipPath_nsStyleStruct_h_unnamed_29: nsStyleClipPath_nsStyleStruct_h_unnamed_29,
|
||||||
pub mSizingBox: u8,
|
pub mType: StyleClipPathType,
|
||||||
|
pub mSizingBox: StyleClipShapeSizing,
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
|
@ -6358,7 +6356,7 @@ fn bindgen_test_layout_nsStyleClipPath_nsStyleStruct_h_unnamed_29() {
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn bindgen_test_layout_nsStyleClipPath() {
|
fn bindgen_test_layout_nsStyleClipPath() {
|
||||||
assert_eq!(::std::mem::size_of::<nsStyleClipPath>() , 24usize);
|
assert_eq!(::std::mem::size_of::<nsStyleClipPath>() , 16usize);
|
||||||
assert_eq!(::std::mem::align_of::<nsStyleClipPath>() , 8usize);
|
assert_eq!(::std::mem::align_of::<nsStyleClipPath>() , 8usize);
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
@ -6406,7 +6404,7 @@ pub struct nsStyleSVGReset {
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn bindgen_test_layout_nsStyleSVGReset() {
|
fn bindgen_test_layout_nsStyleSVGReset() {
|
||||||
assert_eq!(::std::mem::size_of::<nsStyleSVGReset>() , 216usize);
|
assert_eq!(::std::mem::size_of::<nsStyleSVGReset>() , 208usize);
|
||||||
assert_eq!(::std::mem::align_of::<nsStyleSVGReset>() , 8usize);
|
assert_eq!(::std::mem::align_of::<nsStyleSVGReset>() , 8usize);
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
|
|
@ -188,12 +188,6 @@ pub const NS_ERROR_MODULE_BASE_OFFSET: ::std::os::raw::c_uint = 69;
|
||||||
pub const MOZ_STRING_WITH_OBSOLETE_API: ::std::os::raw::c_uint = 1;
|
pub const MOZ_STRING_WITH_OBSOLETE_API: ::std::os::raw::c_uint = 1;
|
||||||
pub const NSID_LENGTH: ::std::os::raw::c_uint = 39;
|
pub const NSID_LENGTH: ::std::os::raw::c_uint = 39;
|
||||||
pub const NS_NUMBER_OF_FLAGS_IN_REFCNT: ::std::os::raw::c_uint = 2;
|
pub const NS_NUMBER_OF_FLAGS_IN_REFCNT: ::std::os::raw::c_uint = 2;
|
||||||
pub const _STL_PAIR_H: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const _GLIBCXX_UTILITY: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const __cpp_lib_tuple_element_t: ::std::os::raw::c_uint = 201402;
|
|
||||||
pub const __cpp_lib_tuples_by_type: ::std::os::raw::c_uint = 201304;
|
|
||||||
pub const __cpp_lib_exchange_function: ::std::os::raw::c_uint = 201304;
|
|
||||||
pub const __cpp_lib_integer_sequence: ::std::os::raw::c_uint = 201304;
|
|
||||||
pub const NS_EVENT_STATE_HIGHEST_SERVO_BIT: ::std::os::raw::c_uint = 6;
|
pub const NS_EVENT_STATE_HIGHEST_SERVO_BIT: ::std::os::raw::c_uint = 6;
|
||||||
pub const DOM_USER_DATA: ::std::os::raw::c_uint = 1;
|
pub const DOM_USER_DATA: ::std::os::raw::c_uint = 1;
|
||||||
pub const SMIL_MAPPED_ATTR_ANIMVAL: ::std::os::raw::c_uint = 2;
|
pub const SMIL_MAPPED_ATTR_ANIMVAL: ::std::os::raw::c_uint = 2;
|
||||||
|
@ -212,29 +206,6 @@ pub const NS_CORNER_BOTTOM_RIGHT_X: ::std::os::raw::c_uint = 4;
|
||||||
pub const NS_CORNER_BOTTOM_RIGHT_Y: ::std::os::raw::c_uint = 5;
|
pub const NS_CORNER_BOTTOM_RIGHT_Y: ::std::os::raw::c_uint = 5;
|
||||||
pub const NS_CORNER_BOTTOM_LEFT_X: ::std::os::raw::c_uint = 6;
|
pub const NS_CORNER_BOTTOM_LEFT_X: ::std::os::raw::c_uint = 6;
|
||||||
pub const NS_CORNER_BOTTOM_LEFT_Y: ::std::os::raw::c_uint = 7;
|
pub const NS_CORNER_BOTTOM_LEFT_Y: ::std::os::raw::c_uint = 7;
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_NOBOX: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_CONTENT: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_PADDING: ::std::os::raw::c_uint = 2;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_BORDER: ::std::os::raw::c_uint = 3;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_MARGIN: ::std::os::raw::c_uint = 4;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_FILL: ::std::os::raw::c_uint = 5;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_STROKE: ::std::os::raw::c_uint = 6;
|
|
||||||
pub const NS_STYLE_CLIP_SHAPE_SIZING_VIEW: ::std::os::raw::c_uint = 7;
|
|
||||||
pub const NS_STYLE_BASIC_SHAPE_POLYGON: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_BASIC_SHAPE_CIRCLE: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_BASIC_SHAPE_ELLIPSE: ::std::os::raw::c_uint = 2;
|
|
||||||
pub const NS_STYLE_BASIC_SHAPE_INSET: ::std::os::raw::c_uint = 3;
|
|
||||||
pub const NS_STYLE_BOX_SHADOW_INSET: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_FLOAT_EDGE_CONTENT_BOX: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_FLOAT_EDGE_MARGIN_BOX: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_NONE: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_IGNORE: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_NORMAL: ::std::os::raw::c_uint = 2;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_ALL: ::std::os::raw::c_uint = 3;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_BEFORE: ::std::os::raw::c_uint = 4;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_AFTER: ::std::os::raw::c_uint = 5;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_SAME: ::std::os::raw::c_uint = 6;
|
|
||||||
pub const NS_STYLE_USER_FOCUS_SELECT_MENU: ::std::os::raw::c_uint = 7;
|
|
||||||
pub const NS_STYLE_USER_SELECT_NONE: ::std::os::raw::c_uint = 0;
|
pub const NS_STYLE_USER_SELECT_NONE: ::std::os::raw::c_uint = 0;
|
||||||
pub const NS_STYLE_USER_SELECT_TEXT: ::std::os::raw::c_uint = 1;
|
pub const NS_STYLE_USER_SELECT_TEXT: ::std::os::raw::c_uint = 1;
|
||||||
pub const NS_STYLE_USER_SELECT_ELEMENT: ::std::os::raw::c_uint = 2;
|
pub const NS_STYLE_USER_SELECT_ELEMENT: ::std::os::raw::c_uint = 2;
|
||||||
|
@ -511,10 +482,6 @@ pub const NS_STYLE_FLOAT_LEFT: ::std::os::raw::c_uint = 1;
|
||||||
pub const NS_STYLE_FLOAT_RIGHT: ::std::os::raw::c_uint = 2;
|
pub const NS_STYLE_FLOAT_RIGHT: ::std::os::raw::c_uint = 2;
|
||||||
pub const NS_STYLE_FLOAT_INLINE_START: ::std::os::raw::c_uint = 3;
|
pub const NS_STYLE_FLOAT_INLINE_START: ::std::os::raw::c_uint = 3;
|
||||||
pub const NS_STYLE_FLOAT_INLINE_END: ::std::os::raw::c_uint = 4;
|
pub const NS_STYLE_FLOAT_INLINE_END: ::std::os::raw::c_uint = 4;
|
||||||
pub const NS_STYLE_CLIP_PATH_NONE: ::std::os::raw::c_uint = 0;
|
|
||||||
pub const NS_STYLE_CLIP_PATH_URL: ::std::os::raw::c_uint = 1;
|
|
||||||
pub const NS_STYLE_CLIP_PATH_SHAPE: ::std::os::raw::c_uint = 2;
|
|
||||||
pub const NS_STYLE_CLIP_PATH_BOX: ::std::os::raw::c_uint = 3;
|
|
||||||
pub const NS_STYLE_FILTER_NONE: ::std::os::raw::c_uint = 0;
|
pub const NS_STYLE_FILTER_NONE: ::std::os::raw::c_uint = 0;
|
||||||
pub const NS_STYLE_FILTER_URL: ::std::os::raw::c_uint = 1;
|
pub const NS_STYLE_FILTER_URL: ::std::os::raw::c_uint = 1;
|
||||||
pub const NS_STYLE_FILTER_BLUR: ::std::os::raw::c_uint = 2;
|
pub const NS_STYLE_FILTER_BLUR: ::std::os::raw::c_uint = 2;
|
||||||
|
@ -2714,12 +2681,6 @@ impl ::std::clone::Clone for nsIExpandedPrincipal {
|
||||||
fn clone(&self) -> Self { *self }
|
fn clone(&self) -> Self { *self }
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
|
||||||
pub struct _Make_integer_sequence<_Tp, _ISeq> {
|
|
||||||
pub _phantom0: ::std::marker::PhantomData<_Tp>,
|
|
||||||
pub _phantom1: ::std::marker::PhantomData<_ISeq>,
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct nsIURI {
|
pub struct nsIURI {
|
||||||
pub _base: nsISupports,
|
pub _base: nsISupports,
|
||||||
|
@ -2771,7 +2732,7 @@ impl ::std::clone::Clone for nsIRequest {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
pub struct EventStates {
|
pub struct EventStates {
|
||||||
pub mStates: ::std::os::raw::c_ulong,
|
pub mStates: ::std::os::raw::c_ulonglong,
|
||||||
}
|
}
|
||||||
impl ::std::clone::Clone for EventStates {
|
impl ::std::clone::Clone for EventStates {
|
||||||
fn clone(&self) -> Self { *self }
|
fn clone(&self) -> Self { *self }
|
||||||
|
@ -2901,7 +2862,7 @@ fn bindgen_test_layout_nsMutationGuard() {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#[link_name = "_ZN15nsMutationGuard11sGenerationE"]
|
#[link_name = "_ZN15nsMutationGuard11sGenerationE"]
|
||||||
pub static mut nsMutationGuard_consts_sGeneration:
|
pub static mut nsMutationGuard_consts_sGeneration:
|
||||||
::std::os::raw::c_ulong;
|
::std::os::raw::c_ulonglong;
|
||||||
}
|
}
|
||||||
pub type Float = f32;
|
pub type Float = f32;
|
||||||
#[repr(i8)]
|
#[repr(i8)]
|
||||||
|
@ -3001,6 +2962,7 @@ pub enum FontType {
|
||||||
SKIA = 3,
|
SKIA = 3,
|
||||||
CAIRO = 4,
|
CAIRO = 4,
|
||||||
COREGRAPHICS = 5,
|
COREGRAPHICS = 5,
|
||||||
|
FONTCONFIG = 6,
|
||||||
}
|
}
|
||||||
#[repr(i8)]
|
#[repr(i8)]
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
@ -3897,7 +3859,43 @@ fn bindgen_test_layout_nsFont() {
|
||||||
}
|
}
|
||||||
#[repr(i8)]
|
#[repr(i8)]
|
||||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleBasicShape { Polygon = 0, Circle = 1, Ellipse = 2, Inset = 3, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
pub enum StyleBoxSizing { Content = 0, Border = 1, }
|
pub enum StyleBoxSizing { Content = 0, Border = 1, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleBoxShadowType { Inset = 0, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleClipPathType { None_ = 0, URL = 1, Shape = 2, Box = 3, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleClipShapeSizing {
|
||||||
|
NoBox = 0,
|
||||||
|
Content = 1,
|
||||||
|
Padding = 2,
|
||||||
|
Border = 3,
|
||||||
|
Margin = 4,
|
||||||
|
Fill = 5,
|
||||||
|
Stroke = 6,
|
||||||
|
View = 7,
|
||||||
|
}
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleFloatEdge { ContentBox = 0, MarginBox = 1, }
|
||||||
|
#[repr(i8)]
|
||||||
|
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||||
|
pub enum StyleUserFocus {
|
||||||
|
None_ = 0,
|
||||||
|
Ignore = 1,
|
||||||
|
Normal = 2,
|
||||||
|
SelectAll = 3,
|
||||||
|
SelectBefore = 4,
|
||||||
|
SelectAfter = 5,
|
||||||
|
SelectSame = 6,
|
||||||
|
SelectMenu = 7,
|
||||||
|
}
|
||||||
pub const eCSSProperty_COUNT_DUMMY: nsCSSProperty =
|
pub const eCSSProperty_COUNT_DUMMY: nsCSSProperty =
|
||||||
nsCSSProperty::eCSSProperty_z_index;
|
nsCSSProperty::eCSSProperty_z_index;
|
||||||
pub const eCSSProperty_all: nsCSSProperty =
|
pub const eCSSProperty_all: nsCSSProperty =
|
||||||
|
@ -5576,7 +5574,7 @@ pub struct nsStyleBorder {
|
||||||
pub mBorderImageFill: u8,
|
pub mBorderImageFill: u8,
|
||||||
pub mBorderImageRepeatH: u8,
|
pub mBorderImageRepeatH: u8,
|
||||||
pub mBorderImageRepeatV: u8,
|
pub mBorderImageRepeatV: u8,
|
||||||
pub mFloatEdge: u8,
|
pub mFloatEdge: StyleFloatEdge,
|
||||||
pub mBoxDecorationBreak: u8,
|
pub mBoxDecorationBreak: u8,
|
||||||
pub mComputedBorder: nsMargin,
|
pub mComputedBorder: nsMargin,
|
||||||
pub mBorder: nsMargin,
|
pub mBorder: nsMargin,
|
||||||
|
@ -6148,7 +6146,7 @@ fn bindgen_test_layout_nsCursorImage() {
|
||||||
pub struct nsStyleUserInterface {
|
pub struct nsStyleUserInterface {
|
||||||
pub mUserInput: u8,
|
pub mUserInput: u8,
|
||||||
pub mUserModify: u8,
|
pub mUserModify: u8,
|
||||||
pub mUserFocus: u8,
|
pub mUserFocus: StyleUserFocus,
|
||||||
pub mPointerEvents: u8,
|
pub mPointerEvents: u8,
|
||||||
pub mCursor: u8,
|
pub mCursor: u8,
|
||||||
pub mCursorArrayLength: u32,
|
pub mCursorArrayLength: u32,
|
||||||
|
@ -6311,9 +6309,9 @@ fn bindgen_test_layout_nsStyleBasicShape() {
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct nsStyleClipPath {
|
pub struct nsStyleClipPath {
|
||||||
pub mType: i32,
|
|
||||||
pub nsStyleClipPath_nsStyleStruct_h_unnamed_29: nsStyleClipPath_nsStyleStruct_h_unnamed_29,
|
pub nsStyleClipPath_nsStyleStruct_h_unnamed_29: nsStyleClipPath_nsStyleStruct_h_unnamed_29,
|
||||||
pub mSizingBox: u8,
|
pub mType: StyleClipPathType,
|
||||||
|
pub mSizingBox: StyleClipShapeSizing,
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy)]
|
#[derive(Debug, Copy)]
|
||||||
|
@ -6335,7 +6333,7 @@ fn bindgen_test_layout_nsStyleClipPath_nsStyleStruct_h_unnamed_29() {
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn bindgen_test_layout_nsStyleClipPath() {
|
fn bindgen_test_layout_nsStyleClipPath() {
|
||||||
assert_eq!(::std::mem::size_of::<nsStyleClipPath>() , 24usize);
|
assert_eq!(::std::mem::size_of::<nsStyleClipPath>() , 16usize);
|
||||||
assert_eq!(::std::mem::align_of::<nsStyleClipPath>() , 8usize);
|
assert_eq!(::std::mem::align_of::<nsStyleClipPath>() , 8usize);
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
@ -6383,7 +6381,7 @@ pub struct nsStyleSVGReset {
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn bindgen_test_layout_nsStyleSVGReset() {
|
fn bindgen_test_layout_nsStyleSVGReset() {
|
||||||
assert_eq!(::std::mem::size_of::<nsStyleSVGReset>() , 208usize);
|
assert_eq!(::std::mem::size_of::<nsStyleSVGReset>() , 200usize);
|
||||||
assert_eq!(::std::mem::align_of::<nsStyleSVGReset>() , 8usize);
|
assert_eq!(::std::mem::align_of::<nsStyleSVGReset>() , 8usize);
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
|
|
@ -98,7 +98,6 @@ COMPILATION_TARGETS = {
|
||||||
"ImageValue", "URLValue", "URLValueData", "nsIPrincipal",
|
"ImageValue", "URLValue", "URLValueData", "nsIPrincipal",
|
||||||
"nsDataHashtable", "imgIRequest"
|
"nsDataHashtable", "imgIRequest"
|
||||||
],
|
],
|
||||||
"unsafe_field_types": ["nsStyleUnion", "nsStyleUnit"],
|
|
||||||
},
|
},
|
||||||
# Generation of the ffi bindings.
|
# Generation of the ffi bindings.
|
||||||
"bindings": {
|
"bindings": {
|
||||||
|
@ -257,11 +256,6 @@ def build(objdir, target_name, kind_name=None,
|
||||||
flags.append("-match")
|
flags.append("-match")
|
||||||
flags.append(header.format(objdir))
|
flags.append(header.format(objdir))
|
||||||
|
|
||||||
if "unsafe_field_types" in current_target:
|
|
||||||
for ty in current_target["unsafe_field_types"]:
|
|
||||||
flags.append("-unsafe-field-type")
|
|
||||||
flags.append(ty.format(objdir))
|
|
||||||
|
|
||||||
if "blacklist" in current_target:
|
if "blacklist" in current_target:
|
||||||
for ty in current_target["blacklist"]:
|
for ty in current_target["blacklist"]:
|
||||||
flags.append("-blacklist-type")
|
flags.append("-blacklist-type")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue