Skip to content

Commit

Permalink
Change conversion from float to appunits of percentage calcuation,
Browse files Browse the repository at this point in the history
prevent the situation that child box size is calculated too large.

Signed-off-by: Asun0204 <[email protected]>
  • Loading branch information
Asun0204 committed Jan 9, 2025
1 parent dfed17b commit 6259dd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion style/values/computed/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ impl SubAssign for CSSPixelLength {
impl From<CSSPixelLength> for Au {
#[inline]
fn from(len: CSSPixelLength) -> Self {
Au::from_f32_px(len.0)
Au::from_f32_px_by_trunc(len.0)
}
}

Expand Down

0 comments on commit 6259dd8

Please sign in to comment.