Stop using int/uint in net_traits.

This commit is contained in:
Ms2ger 2015-04-06 15:57:35 +02:00
parent f22d920b4d
commit b50b21d1da
5 changed files with 17 additions and 13 deletions

View file

@ -327,15 +327,21 @@ impl ImageFragmentInfo {
/// Returns the original inline-size of the image.
pub fn image_inline_size(&mut self) -> Au {
let size = self.image.get_size(self.replaced_image_fragment_info.for_node).unwrap_or(Size2D::zero());
Au::from_px(if self.replaced_image_fragment_info.writing_mode_is_vertical { size.height }
else { size.width })
Au::from_px(if self.replaced_image_fragment_info.writing_mode_is_vertical {
size.height
} else {
size.width
} as isize)
}
/// Returns the original block-size of the image.
pub fn image_block_size(&mut self) -> Au {
let size = self.image.get_size(self.replaced_image_fragment_info.for_node).unwrap_or(Size2D::zero());
Au::from_px(if self.replaced_image_fragment_info.writing_mode_is_vertical { size.width }
else { size.height })
Au::from_px(if self.replaced_image_fragment_info.writing_mode_is_vertical {
size.width
} else {
size.height
} as isize)
}
/// Tile an image