Auto merge of #6603 - wjh:remove-url-from-page-6589, r=jdm

Remove url field from Page

Resolves issue [#6589](https://github.com/servo/servo/issues/6589).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6603)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-07-11 04:47:06 -06:00
commit 3d4122e7c1
2 changed files with 2 additions and 9 deletions

View file

@ -11,7 +11,6 @@ use dom::window::Window;
use msg::constellation_msg::PipelineId;
use std::cell::Cell;
use std::rc::Rc;
use url::Url;
/// Encapsulates a handle to a frame in a frame tree.
#[derive(JSTraceable)]
@ -22,11 +21,6 @@ pub struct Page {
/// The outermost frame containing the document and window.
frame: DOMRefCell<Option<Frame>>,
/// Cached copy of the most recent url loaded by the script, after all redirections.
/// TODO(tkuehn): this currently does not follow any particular caching policy
/// and simply caches pages forever (!).
url: Url,
/// Indicates if reflow is required when reloading.
needs_reflow: Cell<bool>,
@ -61,11 +55,10 @@ impl IterablePage for Rc<Page> {
}
impl Page {
pub fn new(id: PipelineId, url: Url) -> Page {
pub fn new(id: PipelineId) -> Page {
Page {
id: id,
frame: DOMRefCell::new(None),
url: url,
needs_reflow: Cell::new(true),
children: DOMRefCell::new(vec!()),
}

View file

@ -1196,7 +1196,7 @@ impl ScriptTask {
});
// Create a new frame tree entry.
let page = Rc::new(Page::new(incomplete.pipeline_id, final_url.clone()));
let page = Rc::new(Page::new(incomplete.pipeline_id));
if !root_page_exists {
// We have a new root frame tree.
*self.page.borrow_mut() = Some(page.clone());