From 3befc8ce0b331f7ca2d594c2bbf6c593f985196b Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 11 Mar 2015 08:54:36 +1000 Subject: [PATCH] Make change page url message consistent with other compositor messages. This doesn't have any effect on functionality, it just simplifies a few upcoming changes with how FrameIds work. --- components/compositing/compositor.rs | 8 ++++---- components/compositing/compositor_task.rs | 2 +- components/compositing/constellation.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 02461adb15d..715c3bc8912 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -5,7 +5,7 @@ use compositor_layer::{CompositorData, CompositorLayer, WantsScrollEventsFlag}; use compositor_task::{CompositorEventListener, CompositorProxy, CompositorReceiver}; use compositor_task::{CompositorTask, LayerProperties, Msg}; -use constellation::{FrameId, SendableFrameTree}; +use constellation::SendableFrameTree; use pipeline::CompositionPipeline; use scrolling::ScrollingTimerProxy; use windowing; @@ -274,8 +274,8 @@ impl IOCompositor { self.change_page_title(pipeline_id, title); } - (Msg::ChangePageUrl(frame_id, url), ShutdownState::NotShuttingDown) => { - self.change_page_url(frame_id, url); + (Msg::ChangePageUrl(pipeline_id, url), ShutdownState::NotShuttingDown) => { + self.change_page_url(pipeline_id, url); } (Msg::PaintMsgDiscarded, ShutdownState::NotShuttingDown) => { @@ -441,7 +441,7 @@ impl IOCompositor { } } - fn change_page_url(&mut self, _: FrameId, url: Url) { + fn change_page_url(&mut self, _: PipelineId, url: Url) { self.window.set_page_url(url); } diff --git a/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs index 9458c7fa150..172716be5bf 100644 --- a/components/compositing/compositor_task.rs +++ b/components/compositing/compositor_task.rs @@ -202,7 +202,7 @@ pub enum Msg { /// Alerts the compositor that the current page has changed its title. ChangePageTitle(PipelineId, Option), /// Alerts the compositor that the current page has changed its URL. - ChangePageUrl(FrameId, Url), + ChangePageUrl(PipelineId, Url), /// Alerts the compositor that a `PaintMsg` has been discarded. PaintMsgDiscarded, /// Replaces the current frame tree, typically called during main frame navigation. diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index aff40db788d..3def1896346 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -335,7 +335,7 @@ impl NavigationContext { fn set_current(&mut self, new_frame: Rc, compositor_proxy: &mut CompositorProxy) { self.current = Some(new_frame.clone()); compositor_proxy.send(CompositorMsg::ChangePageUrl( - new_frame.id, + new_frame.pipeline.borrow().id, new_frame.pipeline.borrow().url.clone())); } }