mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Remove url field from Page
This commit is contained in:
parent
243446eff3
commit
58a31b07b4
2 changed files with 2 additions and 9 deletions
|
@ -11,7 +11,6 @@ use dom::window::Window;
|
||||||
use msg::constellation_msg::PipelineId;
|
use msg::constellation_msg::PipelineId;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use url::Url;
|
|
||||||
|
|
||||||
/// Encapsulates a handle to a frame in a frame tree.
|
/// Encapsulates a handle to a frame in a frame tree.
|
||||||
#[derive(JSTraceable)]
|
#[derive(JSTraceable)]
|
||||||
|
@ -22,11 +21,6 @@ pub struct Page {
|
||||||
/// The outermost frame containing the document and window.
|
/// The outermost frame containing the document and window.
|
||||||
frame: DOMRefCell<Option<Frame>>,
|
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.
|
/// Indicates if reflow is required when reloading.
|
||||||
needs_reflow: Cell<bool>,
|
needs_reflow: Cell<bool>,
|
||||||
|
|
||||||
|
@ -61,11 +55,10 @@ impl IterablePage for Rc<Page> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Page {
|
impl Page {
|
||||||
pub fn new(id: PipelineId, url: Url) -> Page {
|
pub fn new(id: PipelineId) -> Page {
|
||||||
Page {
|
Page {
|
||||||
id: id,
|
id: id,
|
||||||
frame: DOMRefCell::new(None),
|
frame: DOMRefCell::new(None),
|
||||||
url: url,
|
|
||||||
needs_reflow: Cell::new(true),
|
needs_reflow: Cell::new(true),
|
||||||
children: DOMRefCell::new(vec!()),
|
children: DOMRefCell::new(vec!()),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1196,7 +1196,7 @@ impl ScriptTask {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create a new frame tree entry.
|
// 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 {
|
if !root_page_exists {
|
||||||
// We have a new root frame tree.
|
// We have a new root frame tree.
|
||||||
*self.page.borrow_mut() = Some(page.clone());
|
*self.page.borrow_mut() = Some(page.clone());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue