diff options
-rw-r--r-- | components/compositing/compositor_task.rs | 7 | ||||
-rw-r--r-- | components/compositing/constellation.rs | 4 | ||||
-rw-r--r-- | components/compositing/headless.rs | 2 | ||||
-rw-r--r-- | components/msg/constellation_msg.rs | 2 | ||||
-rw-r--r-- | components/script/script_task.rs | 7 |
5 files changed, 11 insertions, 11 deletions
diff --git a/components/compositing/compositor_task.rs b/components/compositing/compositor_task.rs index cfbb5acb2a6..8b5510f25f6 100644 --- a/components/compositing/compositor_task.rs +++ b/components/compositing/compositor_task.rs @@ -25,7 +25,6 @@ use servo_util::time::TimeProfilerChan; use std::comm::{channel, Sender, Receiver}; use std::fmt::{FormatError, Formatter, Show}; use std::rc::Rc; -use url::Url; /// Sends messages to the compositor. This is a trait supplied by the port because the method used /// to communicate with the compositor may have to kick OS event loops awake, communicate cross- @@ -191,8 +190,8 @@ pub enum Msg { SetIds(SendableFrameTree, Sender<()>, ConstellationChan), /// Sends an updated version of the frame tree. FrameTreeUpdateMsg(FrameTreeDiff, Sender<()>), - /// The load of a page for a given URL has completed. - LoadComplete(PipelineId, Url), + /// The load of a page has completed. + LoadComplete, /// Indicates that the scrolling timeout with the given starting timestamp has happened and a /// composite should happen. (See the `scrolling` module.) ScrollTimeout(u64), @@ -214,7 +213,7 @@ impl Show for Msg { RenderMsgDiscarded(..) => write!(f, "RenderMsgDiscarded"), SetIds(..) => write!(f, "SetIds"), FrameTreeUpdateMsg(..) => write!(f, "FrameTreeUpdateMsg"), - LoadComplete(..) => write!(f, "LoadComplete"), + LoadComplete => write!(f, "LoadComplete"), ScrollTimeout(..) => write!(f, "ScrollTimeout"), } } diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index d8831c02c90..8b6902135ef 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -434,9 +434,9 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> { } // A page loaded through one of several methods above has completed all parsing, // script, and reflow messages have been sent. - LoadCompleteMsg(pipeline_id, url) => { + LoadCompleteMsg => { debug!("constellation got load complete message"); - self.compositor_proxy.send(LoadComplete(pipeline_id, url)); + self.compositor_proxy.send(LoadComplete); } // Handle a forward or back request NavigateMsg(direction) => { diff --git a/components/compositing/headless.rs b/components/compositing/headless.rs index eaeb09eb7da..9174750aa50 100644 --- a/components/compositing/headless.rs +++ b/components/compositing/headless.rs @@ -104,7 +104,7 @@ impl CompositorEventListener for NullCompositor { CreateOrUpdateDescendantLayer(..) | SetLayerOrigin(..) | Paint(..) | ChangeReadyState(..) | ChangeRenderState(..) | ScrollFragmentPoint(..) | - LoadComplete(..) | RenderMsgDiscarded(..) | ScrollTimeout(..) => () + LoadComplete | RenderMsgDiscarded(..) | ScrollTimeout(..) => () } true } diff --git a/components/msg/constellation_msg.rs b/components/msg/constellation_msg.rs index f05c16dfb42..7d6dee33fe7 100644 --- a/components/msg/constellation_msg.rs +++ b/components/msg/constellation_msg.rs @@ -197,7 +197,7 @@ pub enum Msg { ExitMsg, FailureMsg(Failure), InitLoadUrlMsg(Url), - LoadCompleteMsg(PipelineId, Url), + LoadCompleteMsg, FrameRectMsg(PipelineId, SubpageId, Rect<f32>), LoadUrlMsg(PipelineId, LoadData), ScriptLoadedURLInIFrameMsg(Url, PipelineId, SubpageId, IFrameSandboxState), diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 087e3fdf043..c407795bd63 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -751,7 +751,7 @@ impl ScriptTask { /// The entry point to document loading. Defines bindings, sets up the window and document /// objects, parses HTML and CSS, and kicks off initial layout. fn load(&self, pipeline_id: PipelineId, load_data: LoadData) { - let url = load_data.url.clone(); + let mut url = load_data.url.clone(); debug!("ScriptTask: loading {} on page {}", url, pipeline_id); let page = self.page.borrow_mut(); @@ -818,6 +818,7 @@ impl ScriptTask { } parse_html(&*page, *document, parser_input, self.resource_task.clone(), Some(load_data)); + url = page.get_url().clone(); document.set_ready_state(DocumentReadyStateValues::Interactive); @@ -853,10 +854,10 @@ impl ScriptTask { let wintarget: JSRef<EventTarget> = EventTargetCast::from_ref(*window); let _ = wintarget.dispatch_event_with_target(Some(doctarget), *event); - *page.fragment_name.borrow_mut() = url.fragment.clone(); + *page.fragment_name.borrow_mut() = url.fragment; let ConstellationChan(ref chan) = self.constellation_chan; - chan.send(LoadCompleteMsg(page.id, url)); + chan.send(LoadCompleteMsg); } fn scroll_fragment_point(&self, pipeline_id: PipelineId, node: JSRef<Element>) { |