From 40b3b749bf6bd41f6e43bcf7a4588dbbbc479c74 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 28 Oct 2015 11:54:44 +0100 Subject: [PATCH 1/3] Remove unused fields from ScriptReflow. --- components/script/dom/window.rs | 2 -- components/script/layout_interface.rs | 4 ---- 2 files changed, 6 deletions(-) diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index abe693696fd..e86668c9ae2 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -917,9 +917,7 @@ impl Window { }, document: self.Document().r().upcast::().to_trusted_node_address(), window_size: window_size, - script_chan: self.control_chan.clone(), script_join_chan: join_chan, - id: last_reflow_id.get(), query_type: query_type, }; diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index 5c41a04363c..6dab946f6fb 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -175,14 +175,10 @@ pub struct ScriptReflow { pub reflow_info: Reflow, /// The document node. pub document: TrustedNodeAddress, - /// The channel through which messages can be sent back to the script task. - pub script_chan: Sender, /// The current window size. pub window_size: WindowSizeData, /// The channel that we send a notification to. pub script_join_chan: Sender<()>, - /// Unique identifier - pub id: u32, /// The type of query if any to perform during this reflow. pub query_type: ReflowQueryType, } From 02692d201fda67a1a50c9cb1f86e8a8e3e1674ee Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 28 Oct 2015 11:57:05 +0100 Subject: [PATCH 2/3] Remove unused Window::last_reflow_id. --- components/script/dom/window.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index e86668c9ae2..279cd5cf800 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -163,9 +163,6 @@ pub struct Window { /// Subpage id associated with this page, if any. parent_info: Option<(PipelineId, SubpageId)>, - /// Unique id for last reflow request; used for confirming completion reply. - last_reflow_id: Cell, - /// Global static data related to the DOM. dom_static: GlobalStaticData, @@ -901,9 +898,6 @@ impl Window { // Layout will let us know when it's done. let (join_chan, join_port) = channel(); - let last_reflow_id = &self.last_reflow_id; - last_reflow_id.set(last_reflow_id.get() + 1); - // On debug mode, print the reflow event information. if opts::get().relayout_event { debug_reflow_events(&goal, &query_type, &reason); @@ -1264,7 +1258,6 @@ impl Window { constellation_chan: constellation_chan, page_clip_rect: Cell::new(MAX_RECT), fragment_name: DOMRefCell::new(None), - last_reflow_id: Cell::new(0), resize_event: Cell::new(None), next_subpage_id: Cell::new(SubpageId(0)), layout_chan: layout_chan, From 7fc93c0770cb55cf31cbadc3daff385f60fbbd7f Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 28 Oct 2015 12:03:48 +0100 Subject: [PATCH 3/3] Remove unused Window::control_chan. --- components/script/dom/window.rs | 6 +----- components/script/script_task.rs | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 279cd5cf800..ad75e2ce5b7 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -54,7 +54,7 @@ use profile_traits::mem; use rustc_serialize::base64::{FromBase64, STANDARD, ToBase64}; use script_task::{ScriptChan, ScriptPort, MainThreadScriptMsg}; use script_task::{SendableMainThreadScriptChan, MainThreadScriptChan, MainThreadTimerEventChan}; -use script_traits::{ConstellationControlMsg, TimerEventChan, TimerEventId, TimerEventRequest, TimerSource}; +use script_traits::{TimerEventChan, TimerEventId, TimerEventRequest, TimerSource}; use selectors::parser::PseudoElement; use std::ascii::AsciiExt; use std::borrow::ToOwned; @@ -109,8 +109,6 @@ pub struct Window { eventtarget: EventTarget, #[ignore_heap_size_of = "trait objects are hard"] script_chan: MainThreadScriptChan, - #[ignore_heap_size_of = "channels are hard"] - control_chan: Sender, console: MutNullableHeap>, crypto: MutNullableHeap>, navigator: MutNullableHeap>, @@ -1204,7 +1202,6 @@ impl Window { page: Rc, script_chan: MainThreadScriptChan, image_cache_chan: ImageCacheChan, - control_chan: Sender, compositor: IpcSender, image_cache_task: ImageCacheTask, resource_task: Arc, @@ -1230,7 +1227,6 @@ impl Window { eventtarget: EventTarget::new_inherited(), script_chan: script_chan, image_cache_chan: image_cache_chan, - control_chan: control_chan, console: Default::default(), crypto: Default::default(), compositor: compositor, diff --git a/components/script/script_task.rs b/components/script/script_task.rs index fa427db6ff1..4ad97a5235e 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -1588,7 +1588,6 @@ impl ScriptTask { page.clone(), MainThreadScriptChan(sender.clone()), self.image_cache_channel.clone(), - self.control_chan.clone(), self.compositor.borrow_mut().clone(), self.image_cache_task.clone(), self.resource_task.clone(),