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 @@ -509,7 +509,7 @@ impl LengthPercentage {
509
509
/// Returns the used value.
510
510
#[ inline]
511
511
pub fn to_used_value ( & self , containing_length : Au ) -> Au {
512
- Au :: from ( self . to_pixel_length ( containing_length) )
512
+ Au :: from_f32_px_truncate ( self . to_pixel_length ( containing_length) . px ( ) )
513
513
}
514
514
515
515
/// Returns the used value as CSSPixelLength.
@@ -522,7 +522,7 @@ impl LengthPercentage {
522
522
#[ inline]
523
523
pub fn maybe_to_used_value ( & self , container_len : Option < Au > ) -> Option < Au > {
524
524
self . maybe_percentage_relative_to ( container_len. map ( Length :: from) )
525
- . map ( Au :: from )
525
+ . map ( |p| Au :: from_f32_px_truncate ( p . px ( ) ) )
526
526
}
527
527
528
528
/// 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