From ee890ecff26d88026c463ea8c9e80e9090275275 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 6 Jul 2016 10:51:32 -0700 Subject: [PATCH 1/2] Update binding blacklist to account for rename of nsProxyReleaseEvent to ProxyReleaseEvent. --- ports/geckolib/gecko_bindings/tools/regen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/geckolib/gecko_bindings/tools/regen.py b/ports/geckolib/gecko_bindings/tools/regen.py index d252edda4471..c21f56f68145 100755 --- a/ports/geckolib/gecko_bindings/tools/regen.py +++ b/ports/geckolib/gecko_bindings/tools/regen.py @@ -78,7 +78,7 @@ ], "blacklist": [ "IsDestructibleFallbackImpl", "IsDestructibleFallback", - "nsProxyReleaseEvent", "FallibleTArray", "nsTArray_Impl", + "ProxyReleaseEvent", "FallibleTArray", "nsTArray_Impl", "__is_tuple_like_impl", "tuple_size", "tuple", "__make_pair_return_impl", "__make_pair_return", "tuple_element", "_Itup_cat", "AnimationEffectTimingProperties", From a57c52c406464bf15420fcac8bb05f64830860de Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 6 Jul 2016 10:48:14 -0700 Subject: [PATCH 2/2] Regenerate bindings. --- ports/geckolib/gecko_bindings/bindings.rs | 4 -- .../geckolib/gecko_bindings/structs_debug.rs | 58 +++++++++---------- .../gecko_bindings/structs_release.rs | 58 +++++++++---------- ports/geckolib/wrapper.rs | 2 +- 4 files changed, 59 insertions(+), 63 deletions(-) diff --git a/ports/geckolib/gecko_bindings/bindings.rs b/ports/geckolib/gecko_bindings/bindings.rs index 50ef0775bf8a..174333ca1ffa 100644 --- a/ports/geckolib/gecko_bindings/bindings.rs +++ b/ports/geckolib/gecko_bindings/bindings.rs @@ -298,10 +298,6 @@ extern "C" { pub fn Servo_RestyleSubtree(node: *mut RawGeckoNode, set: *mut RawServoStyleSet); pub fn Servo_StyleWorkerThreadCount() -> u32; - pub fn Gecko_GetAttrAsUTF8(element: *mut RawGeckoElement, - ns: *mut nsIAtom, name: *mut nsIAtom, - length: *mut u32) - -> *const ::std::os::raw::c_char; pub fn Gecko_Construct_nsStyleFont(ptr: *mut nsStyleFont); pub fn Gecko_CopyConstruct_nsStyleFont(ptr: *mut nsStyleFont, other: *const nsStyleFont); diff --git a/ports/geckolib/gecko_bindings/structs_debug.rs b/ports/geckolib/gecko_bindings/structs_debug.rs index 30e1e2d65f99..13274054e3bc 100644 --- a/ports/geckolib/gecko_bindings/structs_debug.rs +++ b/ports/geckolib/gecko_bindings/structs_debug.rs @@ -909,7 +909,7 @@ pub const NS_STYLE_BLEND_SATURATION: ::std::os::raw::c_uint = 13; pub const NS_STYLE_BLEND_COLOR: ::std::os::raw::c_uint = 14; pub const NS_STYLE_BLEND_LUMINOSITY: ::std::os::raw::c_uint = 15; pub const NS_STYLE_MASK_COMPOSITE_ADD: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_MASK_COMPOSITE_SUBSTRACT: ::std::os::raw::c_uint = 1; +pub const NS_STYLE_MASK_COMPOSITE_SUBTRACT: ::std::os::raw::c_uint = 1; pub const NS_STYLE_MASK_COMPOSITE_INTERSECT: ::std::os::raw::c_uint = 2; pub const NS_STYLE_MASK_COMPOSITE_EXCLUDE: ::std::os::raw::c_uint = 3; pub const NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN: ::std::os::raw::c_uint @@ -2690,34 +2690,6 @@ pub struct _vftable_nsIURI { impl ::std::clone::Clone for nsIURI { fn clone(&self) -> Self { *self } } -/** - * Enum defining the mode in which a sheet is to be parsed. This is - * usually, but not always, the same as the cascade level at which the - * sheet will apply (see nsStyleSet.h). Most of the Loader APIs only - * support loading of author sheets. - * - * Author sheets are the normal case: styles embedded in or linked - * from HTML pages. They are also the most restricted. - * - * User sheets can do anything author sheets can do, and also get - * access to a few CSS extensions that are not yet suitable for - * exposure on the public Web, but are very useful for expressing - * user style overrides, such as @-moz-document rules. - * - * Agent sheets have access to all author- and user-sheet features - * plus more extensions that are necessary for internal use but, - * again, not yet suitable for exposure on the public Web. Some of - * these are outright unsafe to expose; in particular, incorrect - * styling of anonymous box pseudo-elements can violate layout - * invariants. - */ -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SheetParsingMode { - eAuthorSheetFeatures = 0, - eUserSheetFeatures = 1, - eAgentSheetFeatures = 2, -} pub type nsLoadFlags = u32; #[repr(C)] #[derive(Debug, Copy)] @@ -2748,6 +2720,34 @@ pub enum nsIRequest_nsIRequest_h_unnamed_7 { impl ::std::clone::Clone for nsIRequest { fn clone(&self) -> Self { *self } } +/** + * Enum defining the mode in which a sheet is to be parsed. This is + * usually, but not always, the same as the cascade level at which the + * sheet will apply (see nsStyleSet.h). Most of the Loader APIs only + * support loading of author sheets. + * + * Author sheets are the normal case: styles embedded in or linked + * from HTML pages. They are also the most restricted. + * + * User sheets can do anything author sheets can do, and also get + * access to a few CSS extensions that are not yet suitable for + * exposure on the public Web, but are very useful for expressing + * user style overrides, such as @-moz-document rules. + * + * Agent sheets have access to all author- and user-sheet features + * plus more extensions that are necessary for internal use but, + * again, not yet suitable for exposure on the public Web. Some of + * these are outright unsafe to expose; in particular, incorrect + * styling of anonymous box pseudo-elements can violate layout + * invariants. + */ +#[repr(u32)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum SheetParsingMode { + eAuthorSheetFeatures = 0, + eUserSheetFeatures = 1, + eAgentSheetFeatures = 2, +} /** * A class for holding strong references to handle-managed objects. * diff --git a/ports/geckolib/gecko_bindings/structs_release.rs b/ports/geckolib/gecko_bindings/structs_release.rs index a7ce48de72d1..90378f6adba0 100644 --- a/ports/geckolib/gecko_bindings/structs_release.rs +++ b/ports/geckolib/gecko_bindings/structs_release.rs @@ -909,7 +909,7 @@ pub const NS_STYLE_BLEND_SATURATION: ::std::os::raw::c_uint = 13; pub const NS_STYLE_BLEND_COLOR: ::std::os::raw::c_uint = 14; pub const NS_STYLE_BLEND_LUMINOSITY: ::std::os::raw::c_uint = 15; pub const NS_STYLE_MASK_COMPOSITE_ADD: ::std::os::raw::c_uint = 0; -pub const NS_STYLE_MASK_COMPOSITE_SUBSTRACT: ::std::os::raw::c_uint = 1; +pub const NS_STYLE_MASK_COMPOSITE_SUBTRACT: ::std::os::raw::c_uint = 1; pub const NS_STYLE_MASK_COMPOSITE_INTERSECT: ::std::os::raw::c_uint = 2; pub const NS_STYLE_MASK_COMPOSITE_EXCLUDE: ::std::os::raw::c_uint = 3; pub const NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN: ::std::os::raw::c_uint @@ -2669,34 +2669,6 @@ pub struct _vftable_nsIURI { impl ::std::clone::Clone for nsIURI { fn clone(&self) -> Self { *self } } -/** - * Enum defining the mode in which a sheet is to be parsed. This is - * usually, but not always, the same as the cascade level at which the - * sheet will apply (see nsStyleSet.h). Most of the Loader APIs only - * support loading of author sheets. - * - * Author sheets are the normal case: styles embedded in or linked - * from HTML pages. They are also the most restricted. - * - * User sheets can do anything author sheets can do, and also get - * access to a few CSS extensions that are not yet suitable for - * exposure on the public Web, but are very useful for expressing - * user style overrides, such as @-moz-document rules. - * - * Agent sheets have access to all author- and user-sheet features - * plus more extensions that are necessary for internal use but, - * again, not yet suitable for exposure on the public Web. Some of - * these are outright unsafe to expose; in particular, incorrect - * styling of anonymous box pseudo-elements can violate layout - * invariants. - */ -#[repr(u32)] -#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub enum SheetParsingMode { - eAuthorSheetFeatures = 0, - eUserSheetFeatures = 1, - eAgentSheetFeatures = 2, -} pub type nsLoadFlags = u32; #[repr(C)] #[derive(Debug, Copy)] @@ -2727,6 +2699,34 @@ pub enum nsIRequest_nsIRequest_h_unnamed_7 { impl ::std::clone::Clone for nsIRequest { fn clone(&self) -> Self { *self } } +/** + * Enum defining the mode in which a sheet is to be parsed. This is + * usually, but not always, the same as the cascade level at which the + * sheet will apply (see nsStyleSet.h). Most of the Loader APIs only + * support loading of author sheets. + * + * Author sheets are the normal case: styles embedded in or linked + * from HTML pages. They are also the most restricted. + * + * User sheets can do anything author sheets can do, and also get + * access to a few CSS extensions that are not yet suitable for + * exposure on the public Web, but are very useful for expressing + * user style overrides, such as @-moz-document rules. + * + * Agent sheets have access to all author- and user-sheet features + * plus more extensions that are necessary for internal use but, + * again, not yet suitable for exposure on the public Web. Some of + * these are outright unsafe to expose; in particular, incorrect + * styling of anonymous box pseudo-elements can violate layout + * invariants. + */ +#[repr(u32)] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub enum SheetParsingMode { + eAuthorSheetFeatures = 0, + eUserSheetFeatures = 1, + eAgentSheetFeatures = 2, +} /** * A class for holding strong references to handle-managed objects. * diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs index 29f3ee999002..e615fcd93592 100644 --- a/ports/geckolib/wrapper.rs +++ b/ports/geckolib/wrapper.rs @@ -10,7 +10,7 @@ use gecko_bindings::bindings::Gecko_ClassOrClassList; use gecko_bindings::bindings::Gecko_GetElementId; use gecko_bindings::bindings::Gecko_GetNodeData; use gecko_bindings::bindings::ServoNodeData; -use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetAttrAsUTF8, Gecko_GetDocumentElement}; +use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetDocumentElement}; use gecko_bindings::bindings::{Gecko_GetFirstChild, Gecko_GetFirstChildElement}; use gecko_bindings::bindings::{Gecko_GetLastChild, Gecko_GetLastChildElement}; use gecko_bindings::bindings::{Gecko_GetNextSibling, Gecko_GetNextSiblingElement};