style: Support the type() function in image-set

Differential Revision: https://phabricator.services.mozilla.com/D109201
This commit is contained in:
Oriol Brufau 2023-05-17 00:30:20 +02:00
parent 7567ddd262
commit 773ddf31fe
4 changed files with 71 additions and 8 deletions

View file

@ -432,4 +432,11 @@ impl Device {
};
SideOffsets2D::new(top, right, bottom, left)
}
/// Returns true if the given MIME type is supported
pub fn is_supported_mime_type(&self, mime_type: &str) -> bool {
unsafe {
bindings::Gecko_IsSupportedImageMimeType(mime_type.as_ptr(), mime_type.len() as u32)
}
}
}