Auto merge of #8239 - Ms2ger:ScriptReflow, r=pcwalton

Remove unused code around ScriptReflow.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8239)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-03 15:29:17 +05:30
commit 9a800becdf
3 changed files with 1 additions and 19 deletions

View file

@ -54,7 +54,7 @@ use profile_traits::mem;
use rustc_serialize::base64::{FromBase64, STANDARD, ToBase64}; use rustc_serialize::base64::{FromBase64, STANDARD, ToBase64};
use script_task::{ScriptChan, ScriptPort, MainThreadScriptMsg}; use script_task::{ScriptChan, ScriptPort, MainThreadScriptMsg};
use script_task::{SendableMainThreadScriptChan, MainThreadScriptChan, MainThreadTimerEventChan}; 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 selectors::parser::PseudoElement;
use std::ascii::AsciiExt; use std::ascii::AsciiExt;
use std::borrow::ToOwned; use std::borrow::ToOwned;
@ -109,8 +109,6 @@ pub struct Window {
eventtarget: EventTarget, eventtarget: EventTarget,
#[ignore_heap_size_of = "trait objects are hard"] #[ignore_heap_size_of = "trait objects are hard"]
script_chan: MainThreadScriptChan, script_chan: MainThreadScriptChan,
#[ignore_heap_size_of = "channels are hard"]
control_chan: Sender<ConstellationControlMsg>,
console: MutNullableHeap<JS<Console>>, console: MutNullableHeap<JS<Console>>,
crypto: MutNullableHeap<JS<Crypto>>, crypto: MutNullableHeap<JS<Crypto>>,
navigator: MutNullableHeap<JS<Navigator>>, navigator: MutNullableHeap<JS<Navigator>>,
@ -163,9 +161,6 @@ pub struct Window {
/// Subpage id associated with this page, if any. /// Subpage id associated with this page, if any.
parent_info: Option<(PipelineId, SubpageId)>, parent_info: Option<(PipelineId, SubpageId)>,
/// Unique id for last reflow request; used for confirming completion reply.
last_reflow_id: Cell<u32>,
/// Global static data related to the DOM. /// Global static data related to the DOM.
dom_static: GlobalStaticData, dom_static: GlobalStaticData,
@ -901,9 +896,6 @@ impl Window {
// Layout will let us know when it's done. // Layout will let us know when it's done.
let (join_chan, join_port) = channel(); 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. // On debug mode, print the reflow event information.
if opts::get().relayout_event { if opts::get().relayout_event {
debug_reflow_events(&goal, &query_type, &reason); debug_reflow_events(&goal, &query_type, &reason);
@ -917,9 +909,7 @@ impl Window {
}, },
document: self.Document().r().upcast::<Node>().to_trusted_node_address(), document: self.Document().r().upcast::<Node>().to_trusted_node_address(),
window_size: window_size, window_size: window_size,
script_chan: self.control_chan.clone(),
script_join_chan: join_chan, script_join_chan: join_chan,
id: last_reflow_id.get(),
query_type: query_type, query_type: query_type,
}; };
@ -1212,7 +1202,6 @@ impl Window {
page: Rc<Page>, page: Rc<Page>,
script_chan: MainThreadScriptChan, script_chan: MainThreadScriptChan,
image_cache_chan: ImageCacheChan, image_cache_chan: ImageCacheChan,
control_chan: Sender<ConstellationControlMsg>,
compositor: IpcSender<ScriptToCompositorMsg>, compositor: IpcSender<ScriptToCompositorMsg>,
image_cache_task: ImageCacheTask, image_cache_task: ImageCacheTask,
resource_task: Arc<ResourceTask>, resource_task: Arc<ResourceTask>,
@ -1238,7 +1227,6 @@ impl Window {
eventtarget: EventTarget::new_inherited(), eventtarget: EventTarget::new_inherited(),
script_chan: script_chan, script_chan: script_chan,
image_cache_chan: image_cache_chan, image_cache_chan: image_cache_chan,
control_chan: control_chan,
console: Default::default(), console: Default::default(),
crypto: Default::default(), crypto: Default::default(),
compositor: compositor, compositor: compositor,
@ -1266,7 +1254,6 @@ impl Window {
constellation_chan: constellation_chan, constellation_chan: constellation_chan,
page_clip_rect: Cell::new(MAX_RECT), page_clip_rect: Cell::new(MAX_RECT),
fragment_name: DOMRefCell::new(None), fragment_name: DOMRefCell::new(None),
last_reflow_id: Cell::new(0),
resize_event: Cell::new(None), resize_event: Cell::new(None),
next_subpage_id: Cell::new(SubpageId(0)), next_subpage_id: Cell::new(SubpageId(0)),
layout_chan: layout_chan, layout_chan: layout_chan,

View file

@ -175,14 +175,10 @@ pub struct ScriptReflow {
pub reflow_info: Reflow, pub reflow_info: Reflow,
/// The document node. /// The document node.
pub document: TrustedNodeAddress, pub document: TrustedNodeAddress,
/// The channel through which messages can be sent back to the script task.
pub script_chan: Sender<ConstellationControlMsg>,
/// The current window size. /// The current window size.
pub window_size: WindowSizeData, pub window_size: WindowSizeData,
/// The channel that we send a notification to. /// The channel that we send a notification to.
pub script_join_chan: Sender<()>, pub script_join_chan: Sender<()>,
/// Unique identifier
pub id: u32,
/// The type of query if any to perform during this reflow. /// The type of query if any to perform during this reflow.
pub query_type: ReflowQueryType, pub query_type: ReflowQueryType,
} }

View file

@ -1588,7 +1588,6 @@ impl ScriptTask {
page.clone(), page.clone(),
MainThreadScriptChan(sender.clone()), MainThreadScriptChan(sender.clone()),
self.image_cache_channel.clone(), self.image_cache_channel.clone(),
self.control_chan.clone(),
self.compositor.borrow_mut().clone(), self.compositor.borrow_mut().clone(),
self.image_cache_task.clone(), self.image_cache_task.clone(),
self.resource_task.clone(), self.resource_task.clone(),