Move is_image_data to script_layout_interface.

This commit is contained in:
Ms2ger 2016-06-16 09:44:40 +01:00
parent 65b93c20b7
commit 2c50318ee7
4 changed files with 6 additions and 9 deletions

View file

@ -68,11 +68,6 @@ impl<'a> ProcessDataURL for &'a HTMLObjectElement {
}
}
pub fn is_image_data(uri: &str) -> bool {
static TYPES: &'static [&'static str] = &["data:image/png", "data:image/gif", "data:image/jpeg"];
TYPES.iter().any(|&type_| uri.starts_with(type_))
}
impl HTMLObjectElementMethods for HTMLObjectElement {
// https://html.spec.whatwg.org/multipage/#dom-cva-validity
fn Validity(&self) -> Root<ValidityState> {