mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
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:
parent
207ff730c2
commit
15f503d000
3 changed files with 25 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue