diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2018-08-27 15:50:11 +0200 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2018-10-08 16:12:00 +0200 |
commit | 623229dd8a26c7cc31aac0070d9285bcdf9a59a9 (patch) | |
tree | c89eafc3cb10ec1f0d38e1ea8cf1cc330f12c0ac /components/script_layout_interface/lib.rs | |
parent | 6e3c2fe41a841ae178ea96e2f2b3b74212191737 (diff) | |
download | servo-623229dd8a26c7cc31aac0070d9285bcdf9a59a9.tar.gz servo-623229dd8a26c7cc31aac0070d9285bcdf9a59a9.zip |
layout: add HTMLMediaFrameSource trait and HTMLMediaData struct
Diffstat (limited to 'components/script_layout_interface/lib.rs')
-rw-r--r-- | components/script_layout_interface/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/components/script_layout_interface/lib.rs b/components/script_layout_interface/lib.rs index da1ab322fa9..0db0bbe3ef5 100644 --- a/components/script_layout_interface/lib.rs +++ b/components/script_layout_interface/lib.rs @@ -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>, +} |