From 66f6c3a213476ea237eaa70feb46a1a5ebca8fe2 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 11 Dec 2014 12:29:31 +0100 Subject: [PATCH] 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. --- components/compositing/compositor.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index c5a11fa1605..6c39c3b1c7a 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -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); }