diff options
author | Ms2ger <Ms2ger@gmail.com> | 2016-06-16 09:44:40 +0100 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-06-20 19:08:11 +0200 |
commit | 2c50318ee7c05ab926e27d225a3409c8da86c991 (patch) | |
tree | 2e9fabd857dc86c60f7a7b6f103da3d1b6137eac /components/script | |
parent | 65b93c20b7be0008ba6d49a49f8119524451ef95 (diff) | |
download | servo-2c50318ee7c05ab926e27d225a3409c8da86c991.tar.gz servo-2c50318ee7c05ab926e27d225a3409c8da86c991.zip |
Move is_image_data to script_layout_interface.
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/htmlobjectelement.rs | 5 | ||||
-rw-r--r-- | components/script/layout_interface.rs | 2 |
2 files changed, 0 insertions, 7 deletions
diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index 268ff17e9cf..13798632e17 100644 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -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> { diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index b06940ea227..350c8150109 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -27,8 +27,6 @@ use style::servo::Stylesheet; use url::Url; use util::ipc::OptionalOpaqueIpcSender; -pub use dom::htmlobjectelement::is_image_data; - /// Asynchronous messages that script can send to layout. pub enum Msg { /// Adds the given stylesheet to the document. |