aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/compositor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/compositing/compositor.rs')
-rw-r--r--components/compositing/compositor.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index 71528e8b88a..bfc2fa1abc6 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -714,6 +714,16 @@ impl<Window: WindowMethods> IOCompositor<Window> {
let _ = sender.send(());
}
+ (Msg::GetScrollOffset(pipeline_id, layer_id, sender), ShutdownState::NotShuttingDown) => {
+ match self.find_layer_with_pipeline_and_layer_id(pipeline_id, layer_id) {
+ Some(ref layer) => {
+ let typed = layer.extra_data.borrow().scroll_offset;
+ let _ = sender.send(Point2D::new(typed.x.get(), typed.y.get()));
+ },
+ None => {},
+ }
+ }
+
// When we are shutting_down, we need to avoid performing operations
// such as Paint that may crash because we have begun tearing down
// the rest of our resources.