mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
layout: set building information for media fragment
This commit is contained in:
parent
bdd3e2c835
commit
006bef5eb5
1 changed files with 16 additions and 0 deletions
|
@ -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) => {
|
SpecificFragmentInfo::Canvas(ref canvas_fragment_info) => {
|
||||||
let image_key = match canvas_fragment_info.source {
|
let image_key = match canvas_fragment_info.source {
|
||||||
CanvasFragmentSource::WebGL(image_key) => image_key,
|
CanvasFragmentSource::WebGL(image_key) => image_key,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue