diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2016-12-07 17:35:29 -1000 |
---|---|---|
committer | Cameron McCormack <cam@mcc.id.au> | 2016-12-08 00:27:32 -1000 |
commit | 5832507e56b519689434fdf88418f95c95c2fa97 (patch) | |
tree | 03d5d2e60587a14d1a919e5df7d8325204f91b9f | |
parent | f7d64c66daa882da1b1231dff3f7e6c42ba34b59 (diff) | |
download | servo-5832507e56b519689434fdf88418f95c95c2fa97.tar.gz servo-5832507e56b519689434fdf88418f95c95c2fa97.zip |
stylo: Whitelist some stuff to work-around bindgen generating too many tests.
-rwxr-xr-x | components/style/binding_tools/regen.py | 3 | ||||
-rw-r--r-- | components/style/gecko_bindings/structs_debug.rs | 70 | ||||
-rw-r--r-- | components/style/gecko_bindings/structs_release.rs | 70 |
3 files changed, 143 insertions, 0 deletions
diff --git a/components/style/binding_tools/regen.py b/components/style/binding_tools/regen.py index 20eb4a59444..e78595aee40 100755 --- a/components/style/binding_tools/regen.py +++ b/components/style/binding_tools/regen.py @@ -99,6 +99,9 @@ COMPILATION_TARGETS = { "mozilla::LazyComputeBehavior", "mozilla::css::SheetParsingMode", "mozilla::SkipRootBehavior", + "mozilla::DisplayItemClip", # Needed because bindgen generates + # specialization tests for this even + # though it shouldn't. ".*ThreadSafe.*Holder", "AnonymousContent", "AudioContext", diff --git a/components/style/gecko_bindings/structs_debug.rs b/components/style/gecko_bindings/structs_debug.rs index 54c37a8b7b4..cddc39a833f 100644 --- a/components/style/gecko_bindings/structs_debug.rs +++ b/components/style/gecko_bindings/structs_debug.rs @@ -1190,6 +1190,23 @@ pub mod root { pub mod gfx { #[allow(unused_imports)] use self::super::super::super::root; + pub type Float = f32; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct Color { + pub r: root::mozilla::gfx::Float, + pub g: root::mozilla::gfx::Float, + pub b: root::mozilla::gfx::Float, + pub a: root::mozilla::gfx::Float, + } + #[test] + fn bindgen_test_layout_Color() { + assert_eq!(::std::mem::size_of::<Color>() , 16usize); + assert_eq!(::std::mem::align_of::<Color>() , 4usize); + } + impl Clone for Color { + fn clone(&self) -> Self { *self } + } #[repr(C)] #[derive(Debug, Copy)] pub struct SourceSurface { @@ -1198,6 +1215,22 @@ pub mod root { impl Clone for SourceSurface { fn clone(&self) -> Self { *self } } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct DrawTarget { + pub _address: u8, + } + impl Clone for DrawTarget { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct Path { + pub _address: u8, + } + impl Clone for Path { + fn clone(&self) -> Self { *self } + } } pub mod layers { #[allow(unused_imports)] @@ -3128,6 +3161,43 @@ pub mod root { 8usize); } /** + * An DisplayItemClip represents the intersection of an optional rectangle + * with a list of rounded rectangles (which is often empty), all in appunits. + * It can represent everything CSS clipping can do to an element (except for + * SVG clip-path), including no clipping at all. + */ + #[repr(C)] + #[derive(Debug)] + pub struct DisplayItemClip { + pub mClipRect: root::nsRect, + pub mRoundedClipRects: root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>, + pub mHaveClipRect: bool, + } + pub type DisplayItemClip_Color = root::mozilla::gfx::Color; + pub type DisplayItemClip_DrawTarget = root::mozilla::gfx::DrawTarget; + pub type DisplayItemClip_Path = root::mozilla::gfx::Path; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct DisplayItemClip_RoundedRect { + pub mRect: root::nsRect, + pub mRadii: [root::nscoord; 8usize], + } + #[test] + fn bindgen_test_layout_DisplayItemClip_RoundedRect() { + assert_eq!(::std::mem::size_of::<DisplayItemClip_RoundedRect>() , + 48usize); + assert_eq!(::std::mem::align_of::<DisplayItemClip_RoundedRect>() , + 4usize); + } + impl Clone for DisplayItemClip_RoundedRect { + fn clone(&self) -> Self { *self } + } + #[test] + fn bindgen_test_layout_DisplayItemClip() { + assert_eq!(::std::mem::size_of::<DisplayItemClip>() , 32usize); + assert_eq!(::std::mem::align_of::<DisplayItemClip>() , 8usize); + } + /** * This struct represents a combined color from a numeric color and * the current foreground color (currentcolor keyword). * Conceptually, the formula is "color * (1 - p) + currentcolor * p" diff --git a/components/style/gecko_bindings/structs_release.rs b/components/style/gecko_bindings/structs_release.rs index 164d5e85e8d..0f8d92c6f35 100644 --- a/components/style/gecko_bindings/structs_release.rs +++ b/components/style/gecko_bindings/structs_release.rs @@ -1185,6 +1185,23 @@ pub mod root { pub mod gfx { #[allow(unused_imports)] use self::super::super::super::root; + pub type Float = f32; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct Color { + pub r: root::mozilla::gfx::Float, + pub g: root::mozilla::gfx::Float, + pub b: root::mozilla::gfx::Float, + pub a: root::mozilla::gfx::Float, + } + #[test] + fn bindgen_test_layout_Color() { + assert_eq!(::std::mem::size_of::<Color>() , 16usize); + assert_eq!(::std::mem::align_of::<Color>() , 4usize); + } + impl Clone for Color { + fn clone(&self) -> Self { *self } + } #[repr(C)] #[derive(Debug, Copy)] pub struct SourceSurface { @@ -1193,6 +1210,22 @@ pub mod root { impl Clone for SourceSurface { fn clone(&self) -> Self { *self } } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct DrawTarget { + pub _address: u8, + } + impl Clone for DrawTarget { + fn clone(&self) -> Self { *self } + } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct Path { + pub _address: u8, + } + impl Clone for Path { + fn clone(&self) -> Self { *self } + } } pub mod layers { #[allow(unused_imports)] @@ -3094,6 +3127,43 @@ pub mod root { 8usize); } /** + * An DisplayItemClip represents the intersection of an optional rectangle + * with a list of rounded rectangles (which is often empty), all in appunits. + * It can represent everything CSS clipping can do to an element (except for + * SVG clip-path), including no clipping at all. + */ + #[repr(C)] + #[derive(Debug)] + pub struct DisplayItemClip { + pub mClipRect: root::nsRect, + pub mRoundedClipRects: root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>, + pub mHaveClipRect: bool, + } + pub type DisplayItemClip_Color = root::mozilla::gfx::Color; + pub type DisplayItemClip_DrawTarget = root::mozilla::gfx::DrawTarget; + pub type DisplayItemClip_Path = root::mozilla::gfx::Path; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct DisplayItemClip_RoundedRect { + pub mRect: root::nsRect, + pub mRadii: [root::nscoord; 8usize], + } + #[test] + fn bindgen_test_layout_DisplayItemClip_RoundedRect() { + assert_eq!(::std::mem::size_of::<DisplayItemClip_RoundedRect>() , + 48usize); + assert_eq!(::std::mem::align_of::<DisplayItemClip_RoundedRect>() , + 4usize); + } + impl Clone for DisplayItemClip_RoundedRect { + fn clone(&self) -> Self { *self } + } + #[test] + fn bindgen_test_layout_DisplayItemClip() { + assert_eq!(::std::mem::size_of::<DisplayItemClip>() , 32usize); + assert_eq!(::std::mem::align_of::<DisplayItemClip>() , 8usize); + } + /** * This struct represents a combined color from a numeric color and * the current foreground color (currentcolor keyword). * Conceptually, the formula is "color * (1 - p) + currentcolor * p" |