mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Move is_image_data to script_layout_interface.
This commit is contained in:
parent
65b93c20b7
commit
2c50318ee7
4 changed files with 6 additions and 9 deletions
|
@ -100,3 +100,8 @@ pub struct TrustedNodeAddress(pub *const c_void);
|
|||
|
||||
#[allow(unsafe_code)]
|
||||
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"];
|
||||
TYPES.iter().any(|&type_| uri.starts_with(type_))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue