Skip to content

Commit

Permalink
layout: add HTMLMediaFrameSource trait and HTMLMediaData struct
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyusa authored and ferjm committed Oct 8, 2018
1 parent 6e3c2fe commit 623229d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/script_layout_interface/lib.rs
Expand Up @@ -115,6 +115,7 @@ pub enum LayoutElementType {
HTMLIFrameElement,
HTMLImageElement,
HTMLInputElement,
HTMLMediaElement,
HTMLObjectElement,
HTMLParagraphElement,
HTMLTableCellElement,
Expand Down Expand Up @@ -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>,
}

0 comments on commit 623229d

Please sign in to comment.