Remove layout_is_idle.

Code on the script thread can only observe self.layout_join_port being Some()
between the time it is set in force_reflow, and the join_layout call later in
that function, and no significant code is called in that code.

This implies that layout_is_idle will always return true, so there is no
reason for the function to exist.
This commit is contained in:
Ms2ger 2015-10-22 15:54:38 +02:00
parent af448374f9
commit 9d739cf684
2 changed files with 4 additions and 10 deletions

View file

@ -1133,10 +1133,6 @@ impl Window {
subpage_id subpage_id
} }
pub fn layout_is_idle(&self) -> bool {
self.layout_join_port.borrow().is_none()
}
pub fn get_pending_reflow_count(&self) -> u32 { pub fn get_pending_reflow_count(&self) -> u32 {
self.pending_reflow_count.get() self.pending_reflow_count.get()
} }

View file

@ -712,12 +712,10 @@ impl ScriptTask {
for page in page.iter() { for page in page.iter() {
// Only process a resize if layout is idle. // Only process a resize if layout is idle.
let window = page.window(); let window = page.window();
if window.r().layout_is_idle() { let resize_event = window.r().steal_resize_event();
let resize_event = window.r().steal_resize_event(); match resize_event {
match resize_event { Some(size) => resizes.push((window.r().pipeline(), size)),
Some(size) => resizes.push((window.r().pipeline(), size)), None => ()
None => ()
}
} }
} }
} }