mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
servo: Merge #6603 - Remove url field from Page (from wjh:remove-url-from-page-6589); r=jdm
Resolves issue [#6589](https://github.com/servo/servo/issues/6589). Source-Repo: https://github.com/servo/servo Source-Revision: 3d4122e7c1e9e412d88f69b853af5265a4c9f0fe
This commit is contained in:
parent
40b58b5744
commit
6bcbf87f94
@ -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!()),
|
||||
}
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user