style: Add bindings for LengthPercentage, and use it for text-indent.

Which is the only property that uses LengthPercentage alone.

Differential Revision: https://phabricator.services.mozilla.com/D17737
This commit is contained in:
Emilio Cobos Álvarez 2019-01-26 11:00:06 +01:00
parent 207ff730c2
commit 15f503d000
3 changed files with 25 additions and 4 deletions

View file

@ -73,11 +73,12 @@ impl ToComputedValue for specified::Length {
/// https://drafts.csswg.org/css-values-4/#typedef-length-percentage
#[allow(missing_docs)]
#[derive(Clone, Copy, Debug, MallocSizeOf, ToAnimatedZero)]
#[repr(C)]
pub struct LengthPercentage {
#[animation(constant)]
pub clamping_mode: AllowedNumericType,
length: Length,
percentage: Percentage,
#[animation(constant)]
pub clamping_mode: AllowedNumericType,
/// Whether we specified a percentage or not.
#[animation(constant)]
pub has_percentage: bool,
@ -678,6 +679,7 @@ impl NonNegativeLengthPercentage {
ToAnimatedValue,
ToAnimatedZero,
)]
#[repr(C)]
pub struct CSSPixelLength(CSSFloat);
impl CSSPixelLength {