mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Rename Au methods with f32/f64 instead of frac32/frac/subpx
This commit is contained in:
parent
32d5e24922
commit
8b522f2e7d
23 changed files with 99 additions and 99 deletions
|
@ -451,8 +451,8 @@ impl ReplacedImageFragmentInfo {
|
|||
if intrinsic_height == Au(0) {
|
||||
intrinsic_width
|
||||
} else {
|
||||
let ratio = intrinsic_width.to_frac32_px() /
|
||||
intrinsic_height.to_frac32_px();
|
||||
let ratio = intrinsic_width.to_f32_px() /
|
||||
intrinsic_height.to_f32_px();
|
||||
|
||||
let specified_height = ReplacedImageFragmentInfo::style_length(
|
||||
style_block_size,
|
||||
|
@ -466,7 +466,7 @@ impl ReplacedImageFragmentInfo {
|
|||
style_min_block_size,
|
||||
style_max_block_size,
|
||||
Au(0));
|
||||
Au::from_frac32_px(specified_height.to_frac32_px() * ratio)
|
||||
Au::from_f32_px(specified_height.to_f32_px() * ratio)
|
||||
}
|
||||
},
|
||||
MaybeAuto::Specified(w) => w,
|
||||
|
@ -503,8 +503,8 @@ impl ReplacedImageFragmentInfo {
|
|||
MaybeAuto::Auto => {
|
||||
let intrinsic_width = fragment_inline_size;
|
||||
let intrinsic_height = fragment_block_size;
|
||||
let scale = intrinsic_width.to_frac32_px() / inline_size.to_frac32_px();
|
||||
Au::from_frac32_px(intrinsic_height.to_frac32_px() / scale)
|
||||
let scale = intrinsic_width.to_f32_px() / inline_size.to_f32_px();
|
||||
Au::from_f32_px(intrinsic_height.to_f32_px() / scale)
|
||||
},
|
||||
MaybeAuto::Specified(h) => {
|
||||
h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue