mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Remove unused subpage field from page
This commit is contained in:
parent
ec91fa2cfd
commit
e265b6b15b
2 changed files with 3 additions and 8 deletions
|
@ -8,7 +8,7 @@ use dom::document::{Document, DocumentHelpers};
|
||||||
use dom::node::NodeHelpers;
|
use dom::node::NodeHelpers;
|
||||||
use dom::window::Window;
|
use dom::window::Window;
|
||||||
|
|
||||||
use msg::constellation_msg::{PipelineId, SubpageId};
|
use msg::constellation_msg::PipelineId;
|
||||||
use util::smallvec::SmallVec;
|
use util::smallvec::SmallVec;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
@ -20,9 +20,6 @@ pub struct Page {
|
||||||
/// Pipeline id associated with this page.
|
/// Pipeline id associated with this page.
|
||||||
id: PipelineId,
|
id: PipelineId,
|
||||||
|
|
||||||
/// Subpage id associated with this page, if any.
|
|
||||||
subpage_id: Option<SubpageId>,
|
|
||||||
|
|
||||||
/// The outermost frame containing the document and window.
|
/// The outermost frame containing the document and window.
|
||||||
frame: DOMRefCell<Option<Frame>>,
|
frame: DOMRefCell<Option<Frame>>,
|
||||||
|
|
||||||
|
@ -65,10 +62,9 @@ impl IterablePage for Rc<Page> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Page {
|
impl Page {
|
||||||
pub fn new(id: PipelineId, subpage_id: Option<SubpageId>, url: Url) -> Page {
|
pub fn new(id: PipelineId, url: Url) -> Page {
|
||||||
Page {
|
Page {
|
||||||
id: id,
|
id: id,
|
||||||
subpage_id: subpage_id,
|
|
||||||
frame: DOMRefCell::new(None),
|
frame: DOMRefCell::new(None),
|
||||||
url: url,
|
url: url,
|
||||||
needs_reflow: Cell::new(true),
|
needs_reflow: Cell::new(true),
|
||||||
|
|
|
@ -909,8 +909,7 @@ impl ScriptTask {
|
||||||
let cx = cx.as_ref().unwrap();
|
let cx = cx.as_ref().unwrap();
|
||||||
|
|
||||||
// Create a new frame tree entry.
|
// Create a new frame tree entry.
|
||||||
let page = Rc::new(Page::new(incomplete.pipeline_id, incomplete.subpage_id.map(|p| p.1),
|
let page = Rc::new(Page::new(incomplete.pipeline_id, final_url.clone()));
|
||||||
final_url.clone()));
|
|
||||||
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