mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use Au
instead of Length
in flexbox code (#30704)
* convert border and padding to app units in flexbox * convert margin to app units in flexbox * cleanup, fmt * add todo comment * fmt * add comment * use Length instead of CSSPixelLength: they are same
This commit is contained in:
parent
e44f17c3df
commit
3c57f2cb44
3 changed files with 78 additions and 29 deletions
|
@ -5,6 +5,7 @@
|
|||
use std::fmt;
|
||||
use std::ops::{Add, AddAssign, Sub};
|
||||
|
||||
use app_units::Au;
|
||||
use serde::Serialize;
|
||||
use style::logical_geometry::{
|
||||
BlockFlowDirection, InlineBaseDirection, PhysicalCorner, WritingMode,
|
||||
|
@ -21,6 +22,7 @@ pub type PhysicalSize<U> = euclid::Size2D<U, CSSPixel>;
|
|||
pub type PhysicalRect<U> = euclid::Rect<U, CSSPixel>;
|
||||
pub type PhysicalSides<U> = euclid::SideOffsets2D<U, CSSPixel>;
|
||||
pub type LengthOrAuto = AutoOr<Length>;
|
||||
pub type AuOrAuto = AutoOr<Au>;
|
||||
pub type LengthPercentageOrAuto<'a> = AutoOr<&'a LengthPercentage>;
|
||||
|
||||
#[derive(Clone, Serialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue