mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
a0df9f76de
commit
f0b5d02901
4 changed files with 16 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue