diff --git a/src/components/compositing/compositor.rs b/src/components/compositing/compositor.rs index 016634c373b..2f9c76545a6 100644 --- a/src/components/compositing/compositor.rs +++ b/src/components/compositing/compositor.rs @@ -527,8 +527,7 @@ impl IOCompositor { point: Point2D) { let page_window = self.page_window(); let (ask, move): (bool, bool) = match self.scene.root { - Some(ref layer) if layer.extra_data.borrow().pipeline.id == pipeline_id && - !layer.extra_data.borrow().hidden => { + Some(ref layer) if layer.extra_data.borrow().pipeline.id == pipeline_id => { (true, events::move(layer.clone(), pipeline_id, layer_id, point, page_window)) } @@ -746,7 +745,7 @@ impl IOCompositor { let scale = self.device_pixels_per_page_px(); let page_window = self.page_window(); match self.scene.root { - Some(ref mut layer) if !layer.extra_data.borrow().hidden => { + Some(ref mut layer) => { let rect = Rect(Point2D(0f32, 0f32), page_window.to_untyped()); let recomposite = CompositorData::send_buffer_requests_recursively(layer.clone(), @@ -755,9 +754,6 @@ impl IOCompositor { scale.get()); self.recomposite = self.recomposite || recomposite; } - Some(_) => { - debug!("Compositor: root layer is hidden!"); - } None => { } } } diff --git a/src/components/compositing/compositor_data.rs b/src/components/compositing/compositor_data.rs index b5ade69b2f2..56f295f9f6f 100644 --- a/src/components/compositing/compositor_data.rs +++ b/src/components/compositing/compositor_data.rs @@ -43,13 +43,8 @@ pub struct CompositorData { /// The size of the underlying page in page coordinates. This is an option /// because we may not know the size of the page until layout is finished completely. - /// if we have no size yet, the layer is hidden until a size message is recieved. pub page_size: Option>, - /// When set to true, this layer is ignored by its parents. This is useful for - /// soft deletion or when waiting on a page size. - pub hidden: bool, - /// The behavior of this layer when a scroll message is received. pub wants_scroll_events: WantsScrollEventsFlag, @@ -88,7 +83,6 @@ impl CompositorData { id: layer_id, scroll_offset: TypedPoint2D(0f32, 0f32), page_size: page_size, - hidden: false, wants_scroll_events: wants_scroll_events, scroll_policy: scroll_policy, cpu_painting: cpu_painting, @@ -188,14 +182,11 @@ impl CompositorData { } }; - layer.children().iter().filter(|x| !x.extra_data.borrow().hidden) - .map(send_child_buffer_request) - .any(|b| b) || redisplay + layer.children().iter().map(send_child_buffer_request).any(|b| b) || redisplay } // Move the sublayer to an absolute position in page coordinates relative to its parent, // and clip the layer to the specified size in page coordinates. - // If the layer is hidden and has a defined page size, unhide it. // This method returns false if the specified layer is not found. pub fn set_clipping_rect(layer: Rc>, pipeline_id: PipelineId, @@ -209,12 +200,6 @@ impl CompositorData { Some(child_node) => { debug!("compositor_data: node found for set_clipping_rect()"); *child_node.bounds.borrow_mut() = new_rect; - - // If possible, unhide child - let mut child_data = child_node.extra_data.borrow_mut(); - if child_data.hidden && child_data.page_size.is_some() { - child_data.hidden = false; - } true } None => { diff --git a/src/components/compositing/events.rs b/src/components/compositing/events.rs index 9c464c91864..f10d1ce50d9 100644 --- a/src/components/compositing/events.rs +++ b/src/components/compositing/events.rs @@ -46,11 +46,6 @@ pub fn handle_scroll_event(layer: Rc>, cursor: TypedPoint2D, window_size: TypedSize2D) -> bool { - // If this layer is hidden, neither it nor its children will scroll. - if layer.extra_data.borrow().hidden { - return false - } - // If this layer doesn't want scroll events, neither it nor its children can handle scroll // events. if layer.extra_data.borrow().wants_scroll_events != WantsScrollEvents { @@ -130,10 +125,6 @@ pub fn send_mouse_event(layer: Rc>, event: MouseWindowEvent, cursor: TypedPoint2D) { let cursor = cursor - layer.extra_data.borrow().scroll_offset; for child in layer.children().iter() { - if child.extra_data.borrow().hidden { - continue; - } - let rect: TypedRect = Rect::from_untyped(&*child.bounds.borrow()); if rect.contains(&cursor) { send_mouse_event(child.clone(), event, cursor - rect.origin);