From 8b76bd7c190b39eb3bc1cc4d041aab9b04dfdf77 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 19 Jul 2016 11:03:21 +0530 Subject: [PATCH] Sync stylo bindings --- ports/geckolib/gecko_bindings/bindings.rs | 2 +- .../geckolib/gecko_bindings/structs_debug.rs | 51 +++++++++++++++++-- .../gecko_bindings/structs_release.rs | 51 +++++++++++++++++-- 3 files changed, 97 insertions(+), 7 deletions(-) diff --git a/ports/geckolib/gecko_bindings/bindings.rs b/ports/geckolib/gecko_bindings/bindings.rs index cd36f19b4dd..b65b0bc4e16 100644 --- a/ports/geckolib/gecko_bindings/bindings.rs +++ b/ports/geckolib/gecko_bindings/bindings.rs @@ -276,7 +276,7 @@ extern "C" { pub fn Servo_StyleSheetHasRules(sheet: *mut RawServoStyleSheet) -> bool; pub fn Servo_InitStyleSet() -> *mut RawServoStyleSet; pub fn Servo_DropStyleSet(set: *mut RawServoStyleSet); - pub fn Servo_ParseStyleAttribute(bytes: *const u8, length: u32, + pub fn Servo_ParseStyleAttribute(bytes: *const u8, length: u8, cache: *mut nsHTMLCSSStyleSheet) -> *mut ServoDeclarationBlock; pub fn Servo_DropDeclarationBlock(declarations: diff --git a/ports/geckolib/gecko_bindings/structs_debug.rs b/ports/geckolib/gecko_bindings/structs_debug.rs index fa6293b17ed..90598bb0893 100644 --- a/ports/geckolib/gecko_bindings/structs_debug.rs +++ b/ports/geckolib/gecko_bindings/structs_debug.rs @@ -1537,15 +1537,30 @@ pub struct nsWritingIterator { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStringComparator; +pub struct nsStringComparator { + pub _vftable: *const _vftable_nsStringComparator, +} +#[repr(C)] +pub struct _vftable_nsStringComparator { + pub _bindgen_empty_ctype_warning_fix: u64, +} impl ::std::clone::Clone for nsStringComparator { fn clone(&self) -> Self { *self } } +#[test] +fn bindgen_test_layout_nsStringComparator() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsDefaultStringComparator { pub _base: nsStringComparator, } +#[repr(C)] +pub struct _vftable_nsDefaultStringComparator { + pub _base: _vftable_nsStringComparator, +} impl ::std::clone::Clone for nsDefaultStringComparator { fn clone(&self) -> Self { *self } } @@ -1575,15 +1590,30 @@ fn bindgen_test_layout_nsAString_internal() { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCStringComparator; +pub struct nsCStringComparator { + pub _vftable: *const _vftable_nsCStringComparator, +} +#[repr(C)] +pub struct _vftable_nsCStringComparator { + pub _bindgen_empty_ctype_warning_fix: u64, +} impl ::std::clone::Clone for nsCStringComparator { fn clone(&self) -> Self { *self } } +#[test] +fn bindgen_test_layout_nsCStringComparator() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsDefaultCStringComparator { pub _base: nsCStringComparator, } +#[repr(C)] +pub struct _vftable_nsDefaultCStringComparator { + pub _base: _vftable_nsCStringComparator, +} impl ::std::clone::Clone for nsDefaultCStringComparator { fn clone(&self) -> Self { *self } } @@ -1620,6 +1650,10 @@ fn bindgen_test_layout_nsACString_internal() { pub struct nsCaseInsensitiveCStringComparator { pub _base: nsCStringComparator, } +#[repr(C)] +pub struct _vftable_nsCaseInsensitiveCStringComparator { + pub _base: _vftable_nsCStringComparator, +} impl ::std::clone::Clone for nsCaseInsensitiveCStringComparator { fn clone(&self) -> Self { *self } } @@ -2211,10 +2245,21 @@ pub struct nsTArray { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCOMPtr_helper; +pub struct nsCOMPtr_helper { + pub _vftable: *const _vftable_nsCOMPtr_helper, +} +#[repr(C)] +pub struct _vftable_nsCOMPtr_helper { + pub _bindgen_empty_ctype_warning_fix: u64, +} impl ::std::clone::Clone for nsCOMPtr_helper { fn clone(&self) -> Self { *self } } +#[test] +fn bindgen_test_layout_nsCOMPtr_helper() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsQueryInterface { diff --git a/ports/geckolib/gecko_bindings/structs_release.rs b/ports/geckolib/gecko_bindings/structs_release.rs index 5a5b1829011..a2da2f94d32 100644 --- a/ports/geckolib/gecko_bindings/structs_release.rs +++ b/ports/geckolib/gecko_bindings/structs_release.rs @@ -1537,15 +1537,30 @@ pub struct nsWritingIterator { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsStringComparator; +pub struct nsStringComparator { + pub _vftable: *const _vftable_nsStringComparator, +} +#[repr(C)] +pub struct _vftable_nsStringComparator { + pub _bindgen_empty_ctype_warning_fix: u64, +} impl ::std::clone::Clone for nsStringComparator { fn clone(&self) -> Self { *self } } +#[test] +fn bindgen_test_layout_nsStringComparator() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsDefaultStringComparator { pub _base: nsStringComparator, } +#[repr(C)] +pub struct _vftable_nsDefaultStringComparator { + pub _base: _vftable_nsStringComparator, +} impl ::std::clone::Clone for nsDefaultStringComparator { fn clone(&self) -> Self { *self } } @@ -1575,15 +1590,30 @@ fn bindgen_test_layout_nsAString_internal() { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCStringComparator; +pub struct nsCStringComparator { + pub _vftable: *const _vftable_nsCStringComparator, +} +#[repr(C)] +pub struct _vftable_nsCStringComparator { + pub _bindgen_empty_ctype_warning_fix: u64, +} impl ::std::clone::Clone for nsCStringComparator { fn clone(&self) -> Self { *self } } +#[test] +fn bindgen_test_layout_nsCStringComparator() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsDefaultCStringComparator { pub _base: nsCStringComparator, } +#[repr(C)] +pub struct _vftable_nsDefaultCStringComparator { + pub _base: _vftable_nsCStringComparator, +} impl ::std::clone::Clone for nsDefaultCStringComparator { fn clone(&self) -> Self { *self } } @@ -1620,6 +1650,10 @@ fn bindgen_test_layout_nsACString_internal() { pub struct nsCaseInsensitiveCStringComparator { pub _base: nsCStringComparator, } +#[repr(C)] +pub struct _vftable_nsCaseInsensitiveCStringComparator { + pub _base: _vftable_nsCStringComparator, +} impl ::std::clone::Clone for nsCaseInsensitiveCStringComparator { fn clone(&self) -> Self { *self } } @@ -2211,10 +2245,21 @@ pub struct nsTArray { } #[repr(C)] #[derive(Debug, Copy)] -pub struct nsCOMPtr_helper; +pub struct nsCOMPtr_helper { + pub _vftable: *const _vftable_nsCOMPtr_helper, +} +#[repr(C)] +pub struct _vftable_nsCOMPtr_helper { + pub _bindgen_empty_ctype_warning_fix: u64, +} impl ::std::clone::Clone for nsCOMPtr_helper { fn clone(&self) -> Self { *self } } +#[test] +fn bindgen_test_layout_nsCOMPtr_helper() { + assert_eq!(::std::mem::size_of::() , 8usize); + assert_eq!(::std::mem::align_of::() , 8usize); +} #[repr(C)] #[derive(Debug, Copy)] pub struct nsQueryInterface {