mirror of
https://github.com/servo/servo.git
synced 2025-06-10 01:23:13 +00:00
Move is_image_data to the layout crate
It's only used there.
This commit is contained in:
parent
1120da6033
commit
ddef6211b3
2 changed files with 7 additions and 7 deletions
|
@ -128,12 +128,6 @@ 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_))
|
||||
}
|
||||
|
||||
/// Whether the pending image needs to be fetched or is waiting on an existing fetch.
|
||||
pub enum PendingImageState {
|
||||
Unrequested(ServoUrl),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue