File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ impl LengthPercentage {
514
514
/// Returns the used value.
515
515
#[ inline]
516
516
pub fn to_used_value ( & self , containing_length : Au ) -> Au {
517
- Au :: from ( self . to_pixel_length ( containing_length) )
517
+ Au :: from_f32_px_truncate ( self . to_pixel_length ( containing_length) . px ( ) )
518
518
}
519
519
520
520
/// Returns the used value as CSSPixelLength.
@@ -527,7 +527,7 @@ impl LengthPercentage {
527
527
#[ inline]
528
528
pub fn maybe_to_used_value ( & self , container_len : Option < Au > ) -> Option < Au > {
529
529
self . maybe_percentage_relative_to ( container_len. map ( Length :: from) )
530
- . map ( Au :: from )
530
+ . map ( |p| Au :: from_f32_px_truncate ( p . px ( ) ) )
531
531
}
532
532
533
533
/// If there are special rules for computing percentages in a value (e.g.
You can’t perform that action at this time.
0 commit comments