diff options
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 7348431d4f3..b7215cfd92b 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1493,25 +1493,21 @@ impl<'dom> LayoutNodeHelpers<'dom> for LayoutDom<'dom, Node> { #[allow(unsafe_code)] fn image_url(self) -> Option<ServoUrl> { - unsafe { - self.downcast::<HTMLImageElement>() - .expect("not an image!") - .image_url() - } + self.downcast::<HTMLImageElement>() + .expect("not an image!") + .image_url() } #[allow(unsafe_code)] fn image_data(self) -> Option<(Option<StdArc<Image>>, Option<ImageMetadata>)> { - unsafe { self.downcast::<HTMLImageElement>().map(|e| e.image_data()) } + self.downcast::<HTMLImageElement>().map(|e| e.image_data()) } #[allow(unsafe_code)] fn image_density(self) -> Option<f64> { - unsafe { - self.downcast::<HTMLImageElement>() - .expect("not an image!") - .image_density() - } + self.downcast::<HTMLImageElement>() + .expect("not an image!") + .image_density() } fn canvas_data(self) -> Option<HTMLCanvasData> { |