aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/compositing/compositor.rs16
-rw-r--r--components/compositing/compositor_task.rs6
-rw-r--r--components/compositing/constellation.rs4
-rw-r--r--components/compositing/headless.rs2
4 files changed, 14 insertions, 14 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs
index 3ed89b37604..bf5370c4a92 100644
--- a/components/compositing/compositor.rs
+++ b/components/compositing/compositor.rs
@@ -315,9 +315,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
chan.send(Some(self.window.native_metadata())).unwrap();
}
- (Msg::SetLayerOrigin(pipeline_id, layer_id, origin),
+ (Msg::SetLayerRect(pipeline_id, layer_id, rect),
ShutdownState::NotShuttingDown) => {
- self.set_layer_origin(pipeline_id, layer_id, origin);
+ self.set_layer_rect(pipeline_id, layer_id, &rect);
}
(Msg::AssignPaintedBuffers(pipeline_id, epoch, replies), ShutdownState::NotShuttingDown) => {
@@ -721,15 +721,15 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.composition_request = CompositionRequest::CompositeOnScrollTimeout(timestamp);
}
- fn set_layer_origin(&mut self,
- pipeline_id: PipelineId,
- layer_id: LayerId,
- new_origin: Point2D<f32>) {
+ fn set_layer_rect(&mut self,
+ pipeline_id: PipelineId,
+ layer_id: LayerId,
+ new_rect: &Rect<f32>) {
match self.find_layer_with_pipeline_and_layer_id(pipeline_id, layer_id) {
Some(ref layer) => {
- layer.bounds.borrow_mut().origin = Point2D::from_untyped(&new_origin)
+ *layer.bounds.borrow_mut() = Rect::from_untyped(new_rect)
}
- None => panic!("Compositor received SetLayerOrigin for nonexistent \
+ None => panic!("Compositor received SetLayerRect for nonexistent \
layer: {:?}", pipeline_id),
};
diff --git a/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs
index f3504aa6704..e3c1a5102d1 100644
--- a/components/compositing/compositor_task.rs
+++ b/components/compositing/compositor_task.rs
@@ -188,8 +188,8 @@ pub enum Msg {
/// Tells the compositor to create a descendant layer for a pipeline if necessary (i.e. if no
/// layer with that ID exists).
CreateOrUpdateDescendantLayer(LayerProperties),
- /// Alerts the compositor that the specified layer's origin has changed.
- SetLayerOrigin(PipelineId, LayerId, Point2D<f32>),
+ /// Alerts the compositor that the specified layer's rect has changed.
+ SetLayerRect(PipelineId, LayerId, Rect<f32>),
/// Scroll a page in a window
ScrollFragmentPoint(PipelineId, LayerId, Point2D<f32>),
/// Requests that the compositor assign the painted buffers to the given layers.
@@ -231,7 +231,7 @@ impl Debug for Msg {
Msg::GetGraphicsMetadata(..) => write!(f, "GetGraphicsMetadata"),
Msg::CreateOrUpdateBaseLayer(..) => write!(f, "CreateOrUpdateBaseLayer"),
Msg::CreateOrUpdateDescendantLayer(..) => write!(f, "CreateOrUpdateDescendantLayer"),
- Msg::SetLayerOrigin(..) => write!(f, "SetLayerOrigin"),
+ Msg::SetLayerRect(..) => write!(f, "SetLayerRect"),
Msg::ScrollFragmentPoint(..) => write!(f, "ScrollFragmentPoint"),
Msg::AssignPaintedBuffers(..) => write!(f, "AssignPaintedBuffers"),
Msg::ChangeReadyState(..) => write!(f, "ChangeReadyState"),
diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs
index daf2cb2503d..2d370eca4e5 100644
--- a/components/compositing/constellation.rs
+++ b/components/compositing/constellation.rs
@@ -681,10 +681,10 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
initial_viewport: rect.size * ScaleFactor(1.0),
device_pixel_ratio: device_pixel_ratio,
})).unwrap();
- compositor_proxy.send(CompositorMsg::SetLayerOrigin(
+ compositor_proxy.send(CompositorMsg::SetLayerRect(
pipeline.id,
LayerId::null(),
- rect.to_untyped().origin));
+ rect.to_untyped()));
} else {
already_sent.insert(pipeline.id);
}
diff --git a/components/compositing/headless.rs b/components/compositing/headless.rs
index 3c57b0e3b82..0c38846d1d0 100644
--- a/components/compositing/headless.rs
+++ b/components/compositing/headless.rs
@@ -104,7 +104,7 @@ impl CompositorEventListener for NullCompositor {
Msg::CreateOrUpdateBaseLayer(..) |
Msg::CreateOrUpdateDescendantLayer(..) |
- Msg::SetLayerOrigin(..) |
+ Msg::SetLayerRect(..) |
Msg::AssignPaintedBuffers(..) |
Msg::ChangeReadyState(..) |
Msg::ChangePaintState(..) |