Skip to content

Commit

Permalink
Update clip-path glue to use StyleShapeSource
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Feb 21, 2017
1 parent a68f656 commit c49c5ec
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 111 deletions.
4 changes: 2 additions & 2 deletions components/style/build_gecko.rs
Expand Up @@ -391,8 +391,8 @@ mod bindings {
"StyleAnimation",
"StyleBasicShape",
"StyleBasicShapeType",
"StyleClipPath",
"StyleGeometryBox",
"StyleShapeSource",
"StyleTransition",
"mozilla::UniquePtr",
"mozilla::DefaultDelete",
Expand Down Expand Up @@ -531,7 +531,7 @@ mod bindings {
"SheetParsingMode",
"StyleBasicShape",
"StyleBasicShapeType",
"StyleClipPath",
"StyleShapeSource",
"nsCSSKeyword",
"nsCSSPropertyID",
"nsCSSShadowArray",
Expand Down
10 changes: 5 additions & 5 deletions components/style/gecko_bindings/bindings.rs
Expand Up @@ -26,7 +26,7 @@ use gecko_bindings::structs::ServoElementSnapshot;
use gecko_bindings::structs::SheetParsingMode;
use gecko_bindings::structs::StyleBasicShape;
use gecko_bindings::structs::StyleBasicShapeType;
use gecko_bindings::structs::StyleClipPath;
use gecko_bindings::structs::StyleShapeSource;
use gecko_bindings::structs::nsCSSKeyword;
use gecko_bindings::structs::nsCSSPropertyID;
use gecko_bindings::structs::nsCSSShadowArray;
Expand Down Expand Up @@ -691,18 +691,18 @@ extern "C" {
calc: nsStyleCoord_CalcValue);
}
extern "C" {
pub fn Gecko_CopyClipPathValueFrom(dst: *mut StyleClipPath,
src: *const StyleClipPath);
pub fn Gecko_CopyClipPathValueFrom(dst: *mut StyleShapeSource,
src: *const StyleShapeSource);
}
extern "C" {
pub fn Gecko_DestroyClipPath(clip: *mut StyleClipPath);
pub fn Gecko_DestroyClipPath(clip: *mut StyleShapeSource);
}
extern "C" {
pub fn Gecko_NewBasicShape(type_: StyleBasicShapeType)
-> *mut StyleBasicShape;
}
extern "C" {
pub fn Gecko_StyleClipPath_SetURLValue(clip: *mut StyleClipPath,
pub fn Gecko_StyleClipPath_SetURLValue(clip: *mut StyleShapeSource,
uri: ServoBundledURI);
}
extern "C" {
Expand Down
110 changes: 59 additions & 51 deletions components/style/gecko_bindings/structs_debug.rs
Expand Up @@ -5719,15 +5719,6 @@ pub mod root {
pub enum StyleHyphens { None = 0, Manual = 1, Auto = 2, }
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StyleShapeOutsideShapeBox {
NoBox = 0,
Content = 1,
Padding = 2,
Border = 3,
Margin = 4,
}
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum StyleShapeRadius { ClosestSide = 0, FarthestSide = 1, }
#[repr(u8)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -7013,23 +7004,66 @@ pub mod root {
}
#[repr(C)]
#[derive(Debug)]
pub struct StyleShapeSource<ReferenceBox> {
pub __bindgen_anon_1: root::mozilla::StyleShapeSource__bindgen_ty_1<ReferenceBox>,
pub struct StyleShapeSource {
pub __bindgen_anon_1: root::mozilla::StyleShapeSource__bindgen_ty_1,
pub mType: root::mozilla::StyleShapeSourceType,
pub mReferenceBox: ReferenceBox,
pub mReferenceBox: root::mozilla::StyleGeometryBox,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct StyleShapeSource__bindgen_ty_1<ReferenceBox> {
#[derive(Debug, Copy)]
pub struct StyleShapeSource__bindgen_ty_1 {
pub mBasicShape: root::__BindgenUnionField<*mut root::mozilla::StyleBasicShape>,
pub mURL: root::__BindgenUnionField<*mut root::mozilla::css::URLValue>,
pub bindgen_union_field: u64,
pub _phantom_0: ::std::marker::PhantomData<ReferenceBox>,
}
pub type StyleClipPath =
root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>;
pub type StyleShapeOutside =
root::mozilla::StyleShapeSource<root::mozilla::StyleShapeOutsideShapeBox>;
#[test]
fn bindgen_test_layout_StyleShapeSource__bindgen_ty_1() {
assert_eq!(::std::mem::size_of::<StyleShapeSource__bindgen_ty_1>()
, 8usize , concat ! (
"Size of: " , stringify ! (
StyleShapeSource__bindgen_ty_1 ) ));
assert_eq! (::std::mem::align_of::<StyleShapeSource__bindgen_ty_1>()
, 8usize , concat ! (
"Alignment of " , stringify ! (
StyleShapeSource__bindgen_ty_1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const StyleShapeSource__bindgen_ty_1 )
) . mBasicShape as * const _ as usize } , 0usize ,
concat ! (
"Alignment of field: " , stringify ! (
StyleShapeSource__bindgen_ty_1 ) , "::" , stringify !
( mBasicShape ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const StyleShapeSource__bindgen_ty_1 )
) . mURL as * const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! (
StyleShapeSource__bindgen_ty_1 ) , "::" , stringify !
( mURL ) ));
}
impl Clone for StyleShapeSource__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[test]
fn bindgen_test_layout_StyleShapeSource() {
assert_eq!(::std::mem::size_of::<StyleShapeSource>() , 16usize ,
concat ! (
"Size of: " , stringify ! ( StyleShapeSource ) ));
assert_eq! (::std::mem::align_of::<StyleShapeSource>() , 8usize ,
concat ! (
"Alignment of " , stringify ! ( StyleShapeSource ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const StyleShapeSource ) ) . mType as *
const _ as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! (
StyleShapeSource ) , "::" , stringify ! ( mType ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const StyleShapeSource ) ) .
mReferenceBox as * const _ as usize } , 9usize ,
concat ! (
"Alignment of field: " , stringify ! (
StyleShapeSource ) , "::" , stringify ! (
mReferenceBox ) ));
}
/**
* A property-value pair specified on a keyframe.
*/
Expand Down Expand Up @@ -21284,7 +21318,7 @@ pub mod root {
pub mAnimationFillModeCount: u32,
pub mAnimationPlayStateCount: u32,
pub mAnimationIterationCountCount: u32,
pub mShapeOutside: root::mozilla::StyleShapeOutside,
pub mShapeOutside: root::mozilla::StyleShapeSource,
}
#[test]
fn bindgen_test_layout_nsStyleDisplay() {
Expand Down Expand Up @@ -24961,7 +24995,7 @@ pub mod root {
#[derive(Debug)]
pub struct nsStyleSVGReset {
pub mMask: root::nsStyleImageLayers,
pub mClipPath: root::mozilla::StyleClipPath,
pub mClipPath: root::mozilla::StyleShapeSource,
pub mStopColor: root::nscolor,
pub mFloodColor: root::nscolor,
pub mLightingColor: root::nscolor,
Expand Down Expand Up @@ -27021,32 +27055,6 @@ pub mod root {
}
#[test]
fn __bindgen_test_layout_template_98() {
assert_eq!(::std::mem::size_of::<root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>>()
, 16usize , concat ! (
"Size of template specialization: " , stringify ! (
root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>
) ));
assert_eq!(::std::mem::align_of::<root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::mozilla::StyleShapeSource<root::mozilla::StyleGeometryBox>
) ));
}
#[test]
fn __bindgen_test_layout_template_99() {
assert_eq!(::std::mem::size_of::<root::mozilla::StyleShapeSource<root::mozilla::StyleShapeOutsideShapeBox>>()
, 16usize , concat ! (
"Size of template specialization: " , stringify ! (
root::mozilla::StyleShapeSource<root::mozilla::StyleShapeOutsideShapeBox>
) ));
assert_eq!(::std::mem::align_of::<root::mozilla::StyleShapeSource<root::mozilla::StyleShapeOutsideShapeBox>>()
, 8usize , concat ! (
"Alignment of template specialization: " , stringify ! (
root::mozilla::StyleShapeSource<root::mozilla::StyleShapeOutsideShapeBox>
) ));
}
#[test]
fn __bindgen_test_layout_template_100() {
assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat
! (
"Size of template specialization: " , stringify ! (
Expand All @@ -27057,7 +27065,7 @@ pub mod root {
[u64; 18usize] ) ));
}
#[test]
fn __bindgen_test_layout_template_101() {
fn __bindgen_test_layout_template_99() {
assert_eq!(::std::mem::size_of::<root::nsTArray<root::mozilla::DisplayItemClip_RoundedRect>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
Expand All @@ -27070,7 +27078,7 @@ pub mod root {
) ));
}
#[test]
fn __bindgen_test_layout_template_102() {
fn __bindgen_test_layout_template_100() {
assert_eq!(::std::mem::size_of::<root::RefPtr<root::mozilla::dom::DOMRect>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
Expand All @@ -27081,7 +27089,7 @@ pub mod root {
root::RefPtr<root::mozilla::dom::DOMRect> ) ));
}
#[test]
fn __bindgen_test_layout_template_103() {
fn __bindgen_test_layout_template_101() {
assert_eq!(::std::mem::size_of::<u64>() , 8usize , concat ! (
"Size of template specialization: " , stringify ! ( u64 )
));
Expand All @@ -27090,7 +27098,7 @@ pub mod root {
u64 ) ));
}
#[test]
fn __bindgen_test_layout_template_104() {
fn __bindgen_test_layout_template_102() {
assert_eq!(::std::mem::size_of::<root::nsTArray<*mut root::mozilla::css::DocumentRule>>()
, 8usize , concat ! (
"Size of template specialization: " , stringify ! (
Expand Down

0 comments on commit c49c5ec

Please sign in to comment.