diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-10-02 13:25:45 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-10-02 14:21:06 +0200 |
commit | a3392610c3414a86a2294073bdc59c78c237bfda (patch) | |
tree | 549cc165a6a48da00ac9a6e4f715f3978112f79f /components/script/dom/htmlcanvaselement.rs | |
parent | b8dbf2dddd88516f85370c49015133435750003d (diff) | |
download | servo-a3392610c3414a86a2294073bdc59c78c237bfda.tar.gz servo-a3392610c3414a86a2294073bdc59c78c237bfda.zip |
Make HTMLCanvasElement::get_size return a Size2D<u32>
The changes keep trickling down.
Diffstat (limited to 'components/script/dom/htmlcanvaselement.rs')
-rw-r--r-- | components/script/dom/htmlcanvaselement.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs index 00b04db7ee8..2d50830fba1 100644 --- a/components/script/dom/htmlcanvaselement.rs +++ b/components/script/dom/htmlcanvaselement.rs @@ -98,8 +98,8 @@ impl HTMLCanvasElement { } } - pub fn get_size(&self) -> Size2D<i32> { - Size2D::new(self.Width() as i32, self.Height() as i32) + pub fn get_size(&self) -> Size2D<u32> { + Size2D::new(self.Width(), self.Height()) } pub fn origin_is_clean(&self) -> bool { @@ -277,7 +277,7 @@ impl HTMLCanvasElement { self.Height() != 0 && self.Width() != 0 } - pub fn fetch_all_data(&self) -> Option<(Vec<u8>, Size2D<i32>)> { + pub fn fetch_all_data(&self) -> Option<(Vec<u8>, Size2D<u32>)> { let size = self.get_size(); if size.width == 0 || size.height == 0 { |