layout: use Au in BoxFragment (#31794)

* use au in BoxFragement

* review fix
This commit is contained in:
atbrakhi 2024-03-22 10:00:39 +05:30 committed by GitHub
parent 0b863de846
commit 95e69fe4ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 98 additions and 100 deletions

View file

@ -140,6 +140,18 @@ impl ToWebRender for PhysicalSides<Length> {
}
}
impl ToWebRender for PhysicalSides<Au> {
type Type = units::LayoutSideOffsets;
fn to_webrender(&self) -> Self::Type {
units::LayoutSideOffsets::new(
self.top.to_f32_px(),
self.right.to_f32_px(),
self.bottom.to_f32_px(),
self.left.to_f32_px(),
)
}
}
impl ToWebRender for ComputedTextDecorationStyle {
type Type = LineStyle;
fn to_webrender(&self) -> Self::Type {