removed a call to copy in servo.rc and renamed NavigationContext.navigate ==> NavigationContext.load

This commit is contained in:
Tim Kuehn 2013-07-29 15:02:06 -07:00
parent df5306e358
commit ec30e97ddf
2 changed files with 6 additions and 6 deletions

View file

@ -177,8 +177,8 @@ impl NavigationContext {
self.current.get() self.current.get()
} }
/// Navigates to a new set of page frames, returning all evicted frame trees /// Loads a new set of page frames, returning all evicted frame trees
pub fn navigate(&mut self, frame_tree: @mut FrameTree) -> ~[@mut FrameTree] { pub fn load(&mut self, frame_tree: @mut FrameTree) -> ~[@mut FrameTree] {
debug!("navigating to %?", frame_tree); debug!("navigating to %?", frame_tree);
let evicted = replace(&mut self.next, ~[]); let evicted = replace(&mut self.next, ~[]);
if self.current.is_some() { if self.current.is_some() {
@ -627,11 +627,11 @@ impl Constellation {
frame.pipeline.grant_paint_permission(); frame.pipeline.grant_paint_permission();
} }
// Don't navigate on Navigate type (or None, as in the case of parsed iframes that finish // Don't call navigation_context.load() on a Navigate type (or None, as in the case of
// loading) // parsed iframes that finish loading)
match frame_tree.pipeline.navigation_type { match frame_tree.pipeline.navigation_type {
Some(constellation_msg::Load) => { Some(constellation_msg::Load) => {
let evicted = self.navigation_context.navigate(frame_tree); let evicted = self.navigation_context.load(frame_tree);
for evicted.iter().advance |frame_tree| { for evicted.iter().advance |frame_tree| {
// exit any pipelines that don't exist outside the evicted frame trees // exit any pipelines that don't exist outside the evicted frame trees
for frame_tree.iter().advance |frame| { for frame_tree.iter().advance |frame| {

View file

@ -133,7 +133,7 @@ fn run(opts: &Opts) {
// Send the URL command to the constellation. // Send the URL command to the constellation.
for opts.urls.iter().advance |filename| { for opts.urls.iter().advance |filename| {
constellation_chan.send(InitLoadUrlMsg(make_url(copy *filename, None))) constellation_chan.send(InitLoadUrlMsg(make_url(filename.clone(), None)))
} }
// Wait for the compositor to shut down. // Wait for the compositor to shut down.