style: Use more compact and ffi-friendly types for some svg props.

No functional change yet.

Differential Revision: https://phabricator.services.mozilla.com/D36805
This commit is contained in:
Emilio Cobos Álvarez 2019-07-05 22:19:42 +00:00
parent a0df9f76de
commit f0b5d02901
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
4 changed files with 16 additions and 14 deletions

View file

@ -171,14 +171,17 @@ pub enum SVGLength<L> {
ToResolvedValue,
ToShmem,
)]
pub enum SVGStrokeDashArray<L> {
#[repr(C, u8)]
pub enum GenericSVGStrokeDashArray<L> {
/// `[ <length> | <percentage> | <number> ]#`
#[css(comma)]
Values(#[css(if_empty = "none", iterable)] Vec<L>),
Values(#[css(if_empty = "none", iterable)] crate::OwnedSlice<L>),
/// `context-value`
ContextValue,
}
pub use self::GenericSVGStrokeDashArray as SVGStrokeDashArray;
/// An SVG opacity value accepts `context-{fill,stroke}-opacity` in
/// addition to opacity value.
#[derive(
@ -197,7 +200,8 @@ pub enum SVGStrokeDashArray<L> {
ToResolvedValue,
ToShmem,
)]
pub enum SVGOpacity<OpacityType> {
#[repr(C, u8)]
pub enum GenericSVGOpacity<OpacityType> {
/// `<opacity-value>`
Opacity(OpacityType),
/// `context-fill-opacity`
@ -207,3 +211,5 @@ pub enum SVGOpacity<OpacityType> {
#[animation(error)]
ContextStrokeOpacity,
}
pub use self::GenericSVGOpacity as SVGOpacity;