mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use isize for Au::from_px.
This commit is contained in:
parent
7b45a4384d
commit
683749c999
2 changed files with 5 additions and 5 deletions
|
@ -345,8 +345,8 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
// wide.
|
||||
let image_aspect_ratio = (image.width as f64) / (image.height as f64);
|
||||
let bounds_aspect_ratio = bounds.size.width.to_subpx() / bounds.size.height.to_subpx();
|
||||
let intrinsic_size = Size2D(Au::from_px(image.width as int),
|
||||
Au::from_px(image.height as int));
|
||||
let intrinsic_size = Size2D(Au::from_px(image.width as isize),
|
||||
Au::from_px(image.height as isize));
|
||||
match (style.get_background().background_size.clone(),
|
||||
image_aspect_ratio < bounds_aspect_ratio) {
|
||||
(background_size::T::Contain, false) | (background_size::T::Cover, true) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue