mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
This commit is contained in:
parent
7b87085c18
commit
ef8edd4e87
168 changed files with 2247 additions and 2408 deletions
|
@ -34,7 +34,6 @@ use std::borrow::ToOwned;
|
|||
use std::cmp::{max, min};
|
||||
use std::collections::LinkedList;
|
||||
use std::fmt;
|
||||
use std::num::ToPrimitive;
|
||||
use std::str::FromStr;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -51,7 +50,6 @@ use url::Url;
|
|||
use util::geometry::{self, Au, ZERO_POINT};
|
||||
use util::logical_geometry::{LogicalRect, LogicalSize, LogicalMargin, WritingMode};
|
||||
use util::range::*;
|
||||
use util::smallvec::SmallVec;
|
||||
use util::str::is_whitespace;
|
||||
use util;
|
||||
|
||||
|
@ -453,8 +451,8 @@ impl ReplacedImageFragmentInfo {
|
|||
if intrinsic_height == Au(0) {
|
||||
intrinsic_width
|
||||
} else {
|
||||
let ratio = intrinsic_width.to_f32().unwrap() /
|
||||
intrinsic_height.to_f32().unwrap();
|
||||
let ratio = intrinsic_width.to_frac32_px() /
|
||||
intrinsic_height.to_frac32_px();
|
||||
|
||||
let specified_height = ReplacedImageFragmentInfo::style_length(
|
||||
style_block_size,
|
||||
|
@ -468,7 +466,7 @@ impl ReplacedImageFragmentInfo {
|
|||
style_min_block_size,
|
||||
style_max_block_size,
|
||||
Au(0));
|
||||
Au((specified_height.to_f32().unwrap() * ratio) as i32)
|
||||
Au::from_frac32_px(specified_height.to_frac32_px() * ratio)
|
||||
}
|
||||
},
|
||||
MaybeAuto::Specified(w) => w,
|
||||
|
@ -505,8 +503,8 @@ impl ReplacedImageFragmentInfo {
|
|||
MaybeAuto::Auto => {
|
||||
let intrinsic_width = fragment_inline_size;
|
||||
let intrinsic_height = fragment_block_size;
|
||||
let scale = intrinsic_width.to_f32().unwrap() / inline_size.to_f32().unwrap();
|
||||
Au((intrinsic_height.to_f32().unwrap() / scale) as i32)
|
||||
let scale = intrinsic_width.to_frac32_px() / inline_size.to_frac32_px();
|
||||
Au::from_frac32_px(intrinsic_height.to_frac32_px() / scale)
|
||||
},
|
||||
MaybeAuto::Specified(h) => {
|
||||
h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue