mirror of
https://github.com/servo/servo.git
synced 2025-06-16 20:34:30 +00:00
format script_layout_interface
This commit is contained in:
parent
8c3b192466
commit
ae469b016d
3 changed files with 123 additions and 82 deletions
|
@ -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_))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue