All root layers should mask their content

Root layers that define the extent of iframes should always mask their
child content. This fixes a bug where root layers without an assigned
size and location do not spill over the entire scene.
This commit is contained in:
Martin Robinson 2014-12-11 12:29:31 +01:00
parent 80756a11d2
commit 66f6c3a213

View file

@ -1178,10 +1178,11 @@ fn create_root_layer_for_pipeline_and_rect(pipeline: &CompositionPipeline,
WantsScrollEvents,
opts::get().tile_size);
// All root layers mask to bounds.
*root_layer.masks_to_bounds.borrow_mut() = true;
match frame_rect {
Some(ref frame_rect) => {
*root_layer.masks_to_bounds.borrow_mut() = true;
let frame_rect = frame_rect.to_untyped();
*root_layer.bounds.borrow_mut() = Rect::from_untyped(&frame_rect);
}