layout: add HTMLMediaFrameSource trait and HTMLMediaData struct

This commit is contained in:
Víctor Manuel Jáquez Leal 2018-08-27 15:50:11 +02:00 committed by Fernando Jiménez Moreno
parent 6e3c2fe41a
commit 623229dd8a

View file

@ -115,6 +115,7 @@ pub enum LayoutElementType {
HTMLIFrameElement,
HTMLImageElement,
HTMLInputElement,
HTMLMediaElement,
HTMLObjectElement,
HTMLParagraphElement,
HTMLTableCellElement,
@ -170,3 +171,13 @@ pub struct PendingImage {
pub node: UntrustedNodeAddress,
pub id: PendingImageId,
}
/// FIXME(victor): probably this doesn't belong here
pub trait HTMLMediaFrameSource: Send + Sync + 'static {
fn get_current_frame(&self) -> Option<(webrender_api::ImageKey, i32, i32)>;
fn clone_boxed(&self) -> Box<HTMLMediaFrameSource>;
}
pub struct HTMLMediaData {
pub frame_source: Box<HTMLMediaFrameSource>,
}