From 006bef5eb5a96744b0dae1e8cc8fec2bbee0edc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 27 Aug 2018 16:32:09 +0200 Subject: [PATCH] layout: set building information for media fragment --- components/layout/display_list/builder.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index f473b98584a..8e903d2ceba 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -1999,6 +1999,22 @@ impl FragmentDisplayListBuilding for Fragment { } } }, + SpecificFragmentInfo::Media(ref fragment_info) => { + if let Some((ref image_key, _, _)) = fragment_info.frame_source.get_current_frame() + { + let base = create_base_display_item(state); + state.add_image_item( + base, + webrender_api::ImageDisplayItem { + image_key: *image_key, + stretch_size: stacking_relative_border_box.size.to_layout(), + tile_spacing: LayoutSize::zero(), + image_rendering: ImageRendering::Auto, + alpha_type: webrender_api::AlphaType::PremultipliedAlpha, + }, + ); + } + } SpecificFragmentInfo::Canvas(ref canvas_fragment_info) => { let image_key = match canvas_fragment_info.source { CanvasFragmentSource::WebGL(image_key) => image_key,