mirror of
https://github.com/servo/servo.git
synced 2025-06-08 16:43:28 +00:00
Remove Window::handle_reflow_complete_msg and ScriptTask::handle_reflow_complete_msg.
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. Since these functions do nothing useful if layout_join_port is None, there is no point in keeping them.
This commit is contained in:
parent
7cd3870977
commit
2456ddf4ba
2 changed files with 2 additions and 24 deletions
|
@ -935,8 +935,8 @@ impl ScriptTask {
|
|||
self.handle_navigate(pipeline_id, Some(subpage_id), load_data),
|
||||
ConstellationControlMsg::SendEvent(id, event) =>
|
||||
self.handle_event(id, event),
|
||||
ConstellationControlMsg::ReflowComplete(id, reflow_id) =>
|
||||
self.handle_reflow_complete_msg(id, reflow_id),
|
||||
ConstellationControlMsg::ReflowComplete(_id, _reflow_id) =>
|
||||
(),
|
||||
ConstellationControlMsg::ResizeInactive(id, new_size) =>
|
||||
self.handle_resize_inactive_msg(id, new_size),
|
||||
ConstellationControlMsg::Viewport(..) =>
|
||||
|
@ -1383,21 +1383,6 @@ impl ScriptTask {
|
|||
frame_element.r().unwrap().update_subpage_id(new_subpage_id);
|
||||
}
|
||||
|
||||
/// Handles a notification that reflow completed.
|
||||
fn handle_reflow_complete_msg(&self, pipeline_id: PipelineId, reflow_id: u32) {
|
||||
debug!("Script: Reflow {:?} complete for {:?}", reflow_id, pipeline_id);
|
||||
let page = self.root_page();
|
||||
match page.find(pipeline_id) {
|
||||
Some(page) => {
|
||||
let window = page.window();
|
||||
window.r().handle_reflow_complete_msg(reflow_id);
|
||||
}
|
||||
None => {
|
||||
assert!(self.closed_pipelines.borrow().contains(&pipeline_id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Window was resized, but this script was not active, so don't reflow yet
|
||||
fn handle_resize_inactive_msg(&self, id: PipelineId, new_size: WindowSizeData) {
|
||||
let page = self.root_page();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue