mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +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
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue