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:
atbrakhi 2023-11-08 15:23:43 +01:00 committed by GitHub
parent e44f17c3df
commit 3c57f2cb44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 78 additions and 29 deletions

View file

@ -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)]