style: Use the style system's LengthPercentage for shape-margin.

This also makes us pass a few WPTs because we stop losing precision when
serializing the computed value.

Differential Revision: https://phabricator.services.mozilla.com/D17738
This commit is contained in:
Emilio Cobos Álvarez 2019-01-26 11:00:22 +01:00
parent 15f503d000
commit 13e12d23f3
2 changed files with 2 additions and 1 deletions

View file

@ -1396,7 +1396,7 @@ impl Clone for ${style_struct.gecko_struct_name} {
"MozLength": impl_style_coord,
"MozScriptMinSize": impl_absolute_length,
"MozScriptSizeMultiplier": impl_simple,
"NonNegativeLengthPercentage": impl_style_coord,
"NonNegativeLengthPercentage": impl_simple,
"NonNegativeNumber": impl_simple,
"Number": impl_simple,
"Opacity": impl_simple,

View file

@ -174,6 +174,7 @@ impl SpecifiedValueInfo for CounterStyleOrNone {
ToComputedValue,
ToCss,
)]
#[repr(transparent)]
pub struct NonNegative<T>(pub T);
/// A wrapper of greater-than-or-equal-to-one values.