mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Bug 1374233 - Part 9: Add NonNegativeLengthOrPercentageOrNumber for stroke-{width|dasharry}.
Also add SVGWidth which use NonNegativeSVGLengthOrPercentage as the LengthType for stroke-width. MozReview-Commit-ID: 8gD0fVe2eAe
This commit is contained in:
parent
b37f270c65
commit
bd0a098ef1
9 changed files with 64 additions and 46 deletions
|
@ -98,7 +98,7 @@ impl<ColorType: Parse> Parse for SVGPaint<ColorType> {
|
|||
|
||||
/// An SVG length value supports `context-value` in addition to length.
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, HasViewportPercentage, ToComputedValue, ToCss)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, HasViewportPercentage, ToAnimatedValue, ToComputedValue, ToCss)]
|
||||
pub enum SVGLength<LengthType> {
|
||||
/// `<length> | <percentage> | <number>`
|
||||
Length(LengthType),
|
||||
|
@ -108,7 +108,7 @@ pub enum SVGLength<LengthType> {
|
|||
|
||||
/// Generic value for stroke-dasharray.
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, PartialEq, HasViewportPercentage, ToComputedValue)]
|
||||
#[derive(Clone, Debug, PartialEq, HasViewportPercentage, ToAnimatedValue, ToComputedValue)]
|
||||
pub enum SVGStrokeDashArray<LengthType> {
|
||||
/// `[ <length> | <percentage> | <number> ]#`
|
||||
Values(Vec<LengthType>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue