aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/lib.rs
diff options
context:
space:
mode:
authorAnshul Malik <malikanshul29@gmail.com>2018-09-12 12:39:38 +0530
committerAnshul Malik <malikanshul29@gmail.com>2018-09-12 12:39:38 +0530
commitae469b016d024be5bafe395dd915d5a6f74072f6 (patch)
treef70850b6edc5b1aab09d4c2d32400cace3eb3040 /components/script_layout_interface/lib.rs
parent8c3b1924661e34923663a184d81366cbc8c3eaff (diff)
downloadservo-ae469b016d024be5bafe395dd915d5a6f74072f6.tar.gz
servo-ae469b016d024be5bafe395dd915d5a6f74072f6.zip
format script_layout_interface
Diffstat (limited to 'components/script_layout_interface/lib.rs')
-rw-r--r--components/script_layout_interface/lib.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/components/script_layout_interface/lib.rs b/components/script_layout_interface/lib.rs
index 36c2c2a57ca..53af4c302fd 100644
--- a/components/script_layout_interface/lib.rs
+++ b/components/script_layout_interface/lib.rs
@@ -15,13 +15,15 @@ extern crate canvas_traits;
extern crate cssparser;
extern crate euclid;
extern crate gfx_traits;
-#[macro_use] extern crate html5ever;
+#[macro_use]
+extern crate html5ever;
extern crate ipc_channel;
extern crate libc;
#[macro_use]
extern crate log;
extern crate malloc_size_of;
-#[macro_use] extern crate malloc_size_of_derive;
+#[macro_use]
+extern crate malloc_size_of_derive;
extern crate metrics;
extern crate msg;
extern crate net_traits;
@@ -98,7 +100,6 @@ impl DomParallelInfo {
}
}
-
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum LayoutNodeType {
Element(LayoutElementType),
@@ -126,7 +127,7 @@ pub enum LayoutElementType {
pub enum HTMLCanvasDataSource {
WebGL(webrender_api::ImageKey),
- Image(Option<IpcSender<CanvasMsg>>)
+ Image(Option<IpcSender<CanvasMsg>>),
}
pub struct HTMLCanvasData {
@@ -149,7 +150,8 @@ pub struct TrustedNodeAddress(pub *const c_void);
unsafe impl Send for TrustedNodeAddress {}
pub fn is_image_data(uri: &str) -> bool {
- static TYPES: &'static [&'static str] = &["data:image/png", "data:image/gif", "data:image/jpeg"];
+ static TYPES: &'static [&'static str] =
+ &["data:image/png", "data:image/gif", "data:image/jpeg"];
TYPES.iter().any(|&type_| uri.starts_with(type_))
}