style: Add bindings for box shadows, and remove nsCSSShadowArray and friends.

Differential Revision: https://phabricator.services.mozilla.com/D30547
This commit is contained in:
Emilio Cobos Álvarez 2019-05-16 23:04:32 +00:00
parent a109fbb7c8
commit 5f6c8d9060
11 changed files with 46 additions and 220 deletions

View file

@ -19,9 +19,10 @@
ToResolvedValue,
ToShmem,
)]
pub struct BoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> {
#[repr(C)]
pub struct GenericBoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> {
/// The base shadow.
pub base: SimpleShadow<Color, SizeLength, BlurShapeLength>,
pub base: GenericSimpleShadow<Color, SizeLength, BlurShapeLength>,
/// The spread radius.
pub spread: ShapeLength,
/// Whether this is an inset box shadow.
@ -30,6 +31,8 @@ pub struct BoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> {
pub inset: bool,
}
pub use self::GenericBoxShadow as BoxShadow;
/// A generic value for a single `filter`.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[animation(no_bound(Url))]
@ -100,7 +103,8 @@ pub enum Filter<Angle, Factor, Length, DropShadow, Url> {
ToResolvedValue,
ToShmem,
)]
pub struct SimpleShadow<Color, SizeLength, ShapeLength> {
#[repr(C)]
pub struct GenericSimpleShadow<Color, SizeLength, ShapeLength> {
/// Color.
pub color: Color,
/// Horizontal radius.
@ -110,3 +114,5 @@ pub struct SimpleShadow<Color, SizeLength, ShapeLength> {
/// Blur radius.
pub blur: ShapeLength,
}
pub use self::GenericSimpleShadow as SimpleShadow;