Resync bindings

This commit is contained in:
Manish Goregaokar 2016-08-17 11:46:52 +05:30
parent 0d4d1b539e
commit 2fdbce0743
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
8 changed files with 68 additions and 83 deletions

View file

@ -34,6 +34,7 @@ ${helpers.predefined_type("fill-opacity", "Opacity", "1.0",
products="gecko", animatable=False)}
${helpers.single_keyword("fill-rule", "nonzero evenodd",
gecko_enum_prefix="StyleFillRule",
products="gecko", animatable=False)}
${helpers.single_keyword("shape-rendering",
@ -57,5 +58,5 @@ ${helpers.predefined_type("stroke-opacity", "Opacity", "1.0",
// Section 14 - Clipping, Masking and Compositing
${helpers.single_keyword("clip-rule", "nonzero evenodd",
products="gecko",
gecko_constant_prefix="NS_STYLE_FILL_RULE",
gecko_enum_prefix="StyleFillRule",
animatable=False)}

View file

@ -69,7 +69,7 @@ COMPILATION_TARGETS = {
"nsAString", "nsSubstring", "nsTSubstring", "nsTString",
"nsISupportsBase.h", "nsCOMPtr.h", "nsIAtom.h", "nsIURI.h",
"nsAutoPtr.h", "nsColor.h", "nsCoord.h", "nsPoint.h", "nsRect.h",
"nsMargin.h", "nsThemeConstants.h", "nsCSSProperty.h",
"nsMargin.h", "nsThemeConstants.h", "nsCSSProperty.h", "nsCSSPropertyID.h",
"CSSVariableValues.h", "nsFont.h", "nsTHashtable.h",
"PLDHashTable.h", "nsColor.h", "nsStyleStruct.h", "nsStyleCoord.h",
"RefPtr.h", "nsISupportsImpl.h", "gfxFontConstants.h",

View file

@ -1,10 +1,10 @@
/* automatically generated by rust-bindgen */
use heapsize::HeapSizeOf;
#[derive(Copy, Clone)] pub enum nsINode {}
#[derive(Copy, Clone)] pub enum nsIDocument {}
#[derive(Copy, Clone)] pub enum nsIPrincipal {}
#[derive(Copy, Clone)] pub enum nsIURI {}
pub enum nsINode {}
pub enum nsIDocument {}
pub enum nsIPrincipal {}
pub enum nsIURI {}
pub type ServoComputedValuesStrong = ::sugar::refptr::Strong<ServoComputedValues>;
pub type ServoComputedValuesBorrowed<'a> = ::sugar::refptr::Borrowed<'a, ServoComputedValues>;
pub type RawServoStyleSheetStrong = ::sugar::refptr::Strong<RawServoStyleSheet>;

View file

@ -189,12 +189,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 NSID_LENGTH: ::std::os::raw::c_uint = 39;
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 DOM_USER_DATA: ::std::os::raw::c_uint = 1;
pub const SMIL_MAPPED_ATTR_ANIMVAL: ::std::os::raw::c_uint = 2;
@ -804,8 +798,6 @@ pub const NS_STYLE_DOMINANT_BASELINE_TEXT_AFTER_EDGE: ::std::os::raw::c_uint =
pub const NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE: ::std::os::raw::c_uint
=
11;
pub const NS_STYLE_FILL_RULE_NONZERO: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_FILL_RULE_EVENODD: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_IMAGE_RENDERING_AUTO: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY: ::std::os::raw::c_uint =
@ -2797,12 +2789,6 @@ impl ::std::clone::Clone for nsIExpandedPrincipal {
fn clone(&self) -> Self { *self }
}
#[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)]
pub struct nsIURI {
pub _base: nsISupports,
@ -2854,7 +2840,7 @@ impl ::std::clone::Clone for nsIRequest {
#[repr(C)]
#[derive(Debug, Copy)]
pub struct EventStates {
pub mStates: ::std::os::raw::c_ulong,
pub mStates: ::std::os::raw::c_ulonglong,
}
impl ::std::clone::Clone for EventStates {
fn clone(&self) -> Self { *self }
@ -2984,7 +2970,7 @@ fn bindgen_test_layout_nsMutationGuard() {
extern "C" {
#[link_name = "_ZN15nsMutationGuard11sGenerationE"]
pub static mut nsMutationGuard_consts_sGeneration:
::std::os::raw::c_ulong;
::std::os::raw::c_ulonglong;
}
pub type Float = f32;
#[repr(i8)]
@ -3514,6 +3500,7 @@ pub enum nsChangeHint {
nsChangeHint_UpdateComputedBSize = 16777216,
nsChangeHint_UpdateUsesOpacity = 33554432,
nsChangeHint_UpdateBackgroundPosition = 67108864,
nsChangeHint_AllHints = 134217727,
}
pub type nsChangeHint_size_t = ::std::os::raw::c_int;
/**
@ -4004,6 +3991,9 @@ pub enum StyleClipPathGeometryBox {
}
#[repr(i8)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum StyleFillRule { Nonzero = 0, Evenodd = 1, }
#[repr(i8)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum StyleFloat {
None_ = 0,
Left = 1,
@ -4052,21 +4042,21 @@ pub enum StyleUserSelect {
MozAll = 8,
MozText = 9,
}
pub const eCSSProperty_COUNT_DUMMY: nsCSSProperty =
nsCSSProperty::eCSSProperty_z_index;
pub const eCSSProperty_all: nsCSSProperty =
nsCSSProperty::eCSSProperty_COUNT_no_shorthands;
pub const eCSSProperty_COUNT_DUMMY2: nsCSSProperty =
nsCSSProperty::eCSSProperty_transition;
pub const eCSSPropertyAlias_WordWrap: nsCSSProperty =
nsCSSProperty::eCSSProperty_COUNT;
pub const eCSSProperty_COUNT_DUMMY3: nsCSSProperty =
nsCSSProperty::eCSSPropertyAlias_WebkitUserSelect;
pub const eCSSPropertyExtra_no_properties: nsCSSProperty =
nsCSSProperty::eCSSProperty_COUNT_with_aliases;
pub const eCSSProperty_COUNT_DUMMY: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_z_index;
pub const eCSSProperty_all: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_COUNT_no_shorthands;
pub const eCSSProperty_COUNT_DUMMY2: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_transition;
pub const eCSSPropertyAlias_WordWrap: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_COUNT;
pub const eCSSProperty_COUNT_DUMMY3: nsCSSPropertyID =
nsCSSPropertyID::eCSSPropertyAlias_WebkitUserSelect;
pub const eCSSPropertyExtra_no_properties: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_COUNT_with_aliases;
#[repr(i32)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum nsCSSProperty {
pub enum nsCSSPropertyID {
eCSSProperty_UNKNOWN = -1,
eCSSProperty_align_content = 0,
eCSSProperty_align_items = 1,
@ -5082,8 +5072,8 @@ fn bindgen_test_layout_nsCSSValueGradient() {
pub struct nsCSSValueTokenStream {
pub mRefCnt: nsAutoRefCnt,
pub _mOwningThread: nsAutoOwningThread,
pub mPropertyID: nsCSSProperty,
pub mShorthandPropertyID: nsCSSProperty,
pub mPropertyID: nsCSSPropertyID,
pub mShorthandPropertyID: nsCSSPropertyID,
pub mTokenStream: nsString,
pub mBaseURI: nsCOMPtr<nsIURI>,
pub mSheetURI: nsCOMPtr<nsIURI>,
@ -5823,10 +5813,10 @@ fn bindgen_test_layout_nsStyleImageLayers() {
extern "C" {
#[link_name = "_ZN18nsStyleImageLayers21kBackgroundLayerTableE"]
pub static mut nsStyleImageLayers_consts_kBackgroundLayerTable:
*const nsCSSProperty;
*const nsCSSPropertyID;
#[link_name = "_ZN18nsStyleImageLayers15kMaskLayerTableE"]
pub static mut nsStyleImageLayers_consts_kMaskLayerTable:
*const nsCSSProperty;
*const nsCSSPropertyID;
}
#[repr(C)]
pub struct nsStyleBackground {
@ -6357,7 +6347,7 @@ pub struct StyleTransition {
pub mTimingFunction: nsTimingFunction,
pub mDuration: f32,
pub mDelay: f32,
pub mProperty: nsCSSProperty,
pub mProperty: nsCSSPropertyID,
pub mUnknownProperty: nsCOMPtr<nsIAtom>,
}
#[test]
@ -6388,7 +6378,7 @@ pub struct StyleBasicShape {
pub mRefCnt: nsAutoRefCnt,
pub _mOwningThread: nsAutoOwningThread,
pub mType: StyleBasicShapeType,
pub mFillRule: i32,
pub mFillRule: StyleFillRule,
pub mCoordinates: nsTArray<nsStyleCoord>,
pub mPosition: nsStyleImageLayers_Position,
pub mRadius: nsStyleCorners,
@ -6738,10 +6728,10 @@ pub struct nsStyleSVG {
pub mFillOpacity: f32,
pub mStrokeMiterlimit: f32,
pub mStrokeOpacity: f32,
pub mClipRule: u8,
pub mClipRule: StyleFillRule,
pub mColorInterpolation: u8,
pub mColorInterpolationFilters: u8,
pub mFillRule: u8,
pub mFillRule: StyleFillRule,
pub mPaintOrder: u8,
pub mShapeRendering: u8,
pub mStrokeLinecap: u8,

View file

@ -189,12 +189,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 NSID_LENGTH: ::std::os::raw::c_uint = 39;
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 DOM_USER_DATA: ::std::os::raw::c_uint = 1;
pub const SMIL_MAPPED_ATTR_ANIMVAL: ::std::os::raw::c_uint = 2;
@ -804,8 +798,6 @@ pub const NS_STYLE_DOMINANT_BASELINE_TEXT_AFTER_EDGE: ::std::os::raw::c_uint =
pub const NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE: ::std::os::raw::c_uint
=
11;
pub const NS_STYLE_FILL_RULE_NONZERO: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_FILL_RULE_EVENODD: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_IMAGE_RENDERING_AUTO: ::std::os::raw::c_uint = 0;
pub const NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED: ::std::os::raw::c_uint = 1;
pub const NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY: ::std::os::raw::c_uint =
@ -2776,12 +2768,6 @@ impl ::std::clone::Clone for nsIExpandedPrincipal {
fn clone(&self) -> Self { *self }
}
#[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)]
pub struct nsIURI {
pub _base: nsISupports,
@ -2833,7 +2819,7 @@ impl ::std::clone::Clone for nsIRequest {
#[repr(C)]
#[derive(Debug, Copy)]
pub struct EventStates {
pub mStates: ::std::os::raw::c_ulong,
pub mStates: ::std::os::raw::c_ulonglong,
}
impl ::std::clone::Clone for EventStates {
fn clone(&self) -> Self { *self }
@ -2963,7 +2949,7 @@ fn bindgen_test_layout_nsMutationGuard() {
extern "C" {
#[link_name = "_ZN15nsMutationGuard11sGenerationE"]
pub static mut nsMutationGuard_consts_sGeneration:
::std::os::raw::c_ulong;
::std::os::raw::c_ulonglong;
}
pub type Float = f32;
#[repr(i8)]
@ -3493,6 +3479,7 @@ pub enum nsChangeHint {
nsChangeHint_UpdateComputedBSize = 16777216,
nsChangeHint_UpdateUsesOpacity = 33554432,
nsChangeHint_UpdateBackgroundPosition = 67108864,
nsChangeHint_AllHints = 134217727,
}
pub type nsChangeHint_size_t = ::std::os::raw::c_int;
/**
@ -3983,6 +3970,9 @@ pub enum StyleClipPathGeometryBox {
}
#[repr(i8)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum StyleFillRule { Nonzero = 0, Evenodd = 1, }
#[repr(i8)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum StyleFloat {
None_ = 0,
Left = 1,
@ -4031,21 +4021,21 @@ pub enum StyleUserSelect {
MozAll = 8,
MozText = 9,
}
pub const eCSSProperty_COUNT_DUMMY: nsCSSProperty =
nsCSSProperty::eCSSProperty_z_index;
pub const eCSSProperty_all: nsCSSProperty =
nsCSSProperty::eCSSProperty_COUNT_no_shorthands;
pub const eCSSProperty_COUNT_DUMMY2: nsCSSProperty =
nsCSSProperty::eCSSProperty_transition;
pub const eCSSPropertyAlias_WordWrap: nsCSSProperty =
nsCSSProperty::eCSSProperty_COUNT;
pub const eCSSProperty_COUNT_DUMMY3: nsCSSProperty =
nsCSSProperty::eCSSPropertyAlias_WebkitUserSelect;
pub const eCSSPropertyExtra_no_properties: nsCSSProperty =
nsCSSProperty::eCSSProperty_COUNT_with_aliases;
pub const eCSSProperty_COUNT_DUMMY: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_z_index;
pub const eCSSProperty_all: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_COUNT_no_shorthands;
pub const eCSSProperty_COUNT_DUMMY2: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_transition;
pub const eCSSPropertyAlias_WordWrap: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_COUNT;
pub const eCSSProperty_COUNT_DUMMY3: nsCSSPropertyID =
nsCSSPropertyID::eCSSPropertyAlias_WebkitUserSelect;
pub const eCSSPropertyExtra_no_properties: nsCSSPropertyID =
nsCSSPropertyID::eCSSProperty_COUNT_with_aliases;
#[repr(i32)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum nsCSSProperty {
pub enum nsCSSPropertyID {
eCSSProperty_UNKNOWN = -1,
eCSSProperty_align_content = 0,
eCSSProperty_align_items = 1,
@ -5061,8 +5051,8 @@ fn bindgen_test_layout_nsCSSValueGradient() {
pub struct nsCSSValueTokenStream {
pub mRefCnt: nsAutoRefCnt,
pub _mOwningThread: nsAutoOwningThread,
pub mPropertyID: nsCSSProperty,
pub mShorthandPropertyID: nsCSSProperty,
pub mPropertyID: nsCSSPropertyID,
pub mShorthandPropertyID: nsCSSPropertyID,
pub mTokenStream: nsString,
pub mBaseURI: nsCOMPtr<nsIURI>,
pub mSheetURI: nsCOMPtr<nsIURI>,
@ -5801,10 +5791,10 @@ fn bindgen_test_layout_nsStyleImageLayers() {
extern "C" {
#[link_name = "_ZN18nsStyleImageLayers21kBackgroundLayerTableE"]
pub static mut nsStyleImageLayers_consts_kBackgroundLayerTable:
*const nsCSSProperty;
*const nsCSSPropertyID;
#[link_name = "_ZN18nsStyleImageLayers15kMaskLayerTableE"]
pub static mut nsStyleImageLayers_consts_kMaskLayerTable:
*const nsCSSProperty;
*const nsCSSPropertyID;
}
#[repr(C)]
pub struct nsStyleBackground {
@ -6335,7 +6325,7 @@ pub struct StyleTransition {
pub mTimingFunction: nsTimingFunction,
pub mDuration: f32,
pub mDelay: f32,
pub mProperty: nsCSSProperty,
pub mProperty: nsCSSPropertyID,
pub mUnknownProperty: nsCOMPtr<nsIAtom>,
}
#[test]
@ -6366,7 +6356,7 @@ pub struct StyleBasicShape {
pub mRefCnt: nsAutoRefCnt,
pub _mOwningThread: nsAutoOwningThread,
pub mType: StyleBasicShapeType,
pub mFillRule: i32,
pub mFillRule: StyleFillRule,
pub mCoordinates: nsTArray<nsStyleCoord>,
pub mPosition: nsStyleImageLayers_Position,
pub mRadius: nsStyleCorners,
@ -6715,10 +6705,10 @@ pub struct nsStyleSVG {
pub mFillOpacity: f32,
pub mStrokeMiterlimit: f32,
pub mStrokeOpacity: f32,
pub mClipRule: u8,
pub mClipRule: StyleFillRule,
pub mColorInterpolation: u8,
pub mColorInterpolationFilters: u8,
pub mFillRule: u8,
pub mFillRule: StyleFillRule,
pub mPaintOrder: u8,
pub mShapeRendering: u8,
pub mStrokeLinecap: u8,

View file

@ -5,4 +5,4 @@
mod ns_style_auto_array;
pub mod ns_style_coord;
mod ns_t_array;
pub mod refptr;
pub mod refptr;

View file

@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use std::marker::PhantomData;
use std::mem::{forget, transmute};
use std::ptr;
@ -89,7 +93,7 @@ pub struct Borrowed<'a, T: 'a> {
impl<'a, T> Copy for Borrowed<'a, T> {}
impl<'a, T> Clone for Borrowed<'a, T> {
fn clone(&self) -> Self {*self}
fn clone(&self) -> Self { *self }
}
impl<'a, T> Borrowed<'a, T> {

View file

@ -8,8 +8,8 @@ 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::RawServoStyleSet;
use gecko_bindings::bindings::{RawGeckoDocument, RawGeckoElement, RawGeckoNode};
use gecko_bindings::bindings::{RawServoStyleSheetBorrowed, ServoComputedValuesBorrowed};
use gecko_bindings::bindings::{RawServoStyleSheetStrong, ServoComputedValuesStrong};
use gecko_bindings::bindings::{ServoDeclarationBlock, ServoNodeData, ThreadSafePrincipalHolder};