diff options
Diffstat (limited to 'components/script/page.rs')
-rw-r--r-- | components/script/page.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/components/script/page.rs b/components/script/page.rs index f3d54a421ae..f2e46c165ab 100644 --- a/components/script/page.rs +++ b/components/script/page.rs @@ -4,8 +4,7 @@ use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; use dom::bindings::codegen::InheritTypes::NodeCast; -use dom::bindings::js::{MutNullableJS, JS, JSRef, Temporary}; -use dom::bindings::js::OptionalRootable; +use dom::bindings::js::{JS, JSRef, Temporary, OptionalRootable}; use dom::bindings::trace::{Traceable, Untraceable}; use dom::bindings::utils::GlobalStaticData; use dom::document::{Document, DocumentHelpers}; @@ -29,14 +28,12 @@ use servo_net::resource_task::ResourceTask; use servo_util::str::DOMString; use std::cell::{Cell, RefCell, Ref, RefMut}; use std::comm::{channel, Receiver, Empty, Disconnected}; -use std::default::Default; use std::mem::replace; use std::rc::Rc; use url::Url; /// Encapsulates a handle to a frame and its associated layout information. #[jstraceable] -#[allow(unrooted_must_root)] // FIXME(#3543) should be must_root. pub struct Page { /// Pipeline id associated with this page. pub id: PipelineId, @@ -79,7 +76,7 @@ pub struct Page { pub resize_event: Untraceable<Cell<Option<WindowSizeData>>>, /// Pending scroll to fragment event, if any - pub fragment_node: MutNullableJS<Element>, + pub fragment_name: RefCell<Option<String>>, /// Associated resource task for use by DOM objects like XMLHttpRequest pub resource_task: Untraceable<ResourceTask>, @@ -153,7 +150,7 @@ impl Page { url: Untraceable::new(RefCell::new(None)), next_subpage_id: Traceable::new(Cell::new(SubpageId(0))), resize_event: Untraceable::new(Cell::new(None)), - fragment_node: Default::default(), + fragment_name: RefCell::new(None), last_reflow_id: Traceable::new(Cell::new(0)), resource_task: Untraceable::new(resource_task), constellation_chan: Untraceable::new(constellation_chan), |