mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Separate script and layout messages, issue #8843
This commit is contained in:
parent
d2e7fd8221
commit
655268d111
11 changed files with 80 additions and 27 deletions
|
@ -24,7 +24,7 @@ use net_traits::storage_task::StorageTask;
|
|||
use profile_traits::mem as profile_mem;
|
||||
use profile_traits::time;
|
||||
use script_traits::{ConstellationControlMsg, InitialScriptState};
|
||||
use script_traits::{LayoutControlMsg, NewLayoutInfo, ScriptMsg as ConstellationMsg};
|
||||
use script_traits::{LayoutControlMsg, LayoutMsg, NewLayoutInfo, ScriptMsg};
|
||||
use script_traits::{ScriptToCompositorMsg, ScriptTaskFactory, TimerEventRequest};
|
||||
use std::mem;
|
||||
use std::sync::mpsc::{Receiver, Sender, channel};
|
||||
|
@ -79,7 +79,9 @@ pub struct InitialPipelineState {
|
|||
/// If `None`, this is the root.
|
||||
pub parent_info: Option<(PipelineId, SubpageId)>,
|
||||
/// A channel to the associated constellation.
|
||||
pub constellation_chan: ConstellationChan<ConstellationMsg>,
|
||||
pub constellation_chan: ConstellationChan<ScriptMsg>,
|
||||
/// A channel for the layout task to send messages to the constellation.
|
||||
pub layout_to_constellation_chan: ConstellationChan<LayoutMsg>,
|
||||
/// A channel to the associated paint task.
|
||||
pub painter_chan: ConstellationChan<PaintMsg>,
|
||||
/// A channel to schedule timer events.
|
||||
|
@ -207,6 +209,7 @@ impl Pipeline {
|
|||
time_profiler_chan: state.time_profiler_chan.clone(),
|
||||
mem_profiler_chan: state.mem_profiler_chan.clone(),
|
||||
window_size: window_size,
|
||||
layout_to_constellation_chan: state.layout_to_constellation_chan,
|
||||
script_chan: script_chan,
|
||||
load_data: state.load_data.clone(),
|
||||
failure: failure,
|
||||
|
@ -347,7 +350,8 @@ impl Pipeline {
|
|||
pub struct UnprivilegedPipelineContent {
|
||||
id: PipelineId,
|
||||
parent_info: Option<(PipelineId, SubpageId)>,
|
||||
constellation_chan: ConstellationChan<ConstellationMsg>,
|
||||
constellation_chan: ConstellationChan<ScriptMsg>,
|
||||
layout_to_constellation_chan: ConstellationChan<LayoutMsg>,
|
||||
scheduler_chan: IpcSender<TimerEventRequest>,
|
||||
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||
script_to_compositor_chan: IpcSender<ScriptToCompositorMsg>,
|
||||
|
@ -386,6 +390,7 @@ impl UnprivilegedPipelineContent {
|
|||
control_chan: self.script_chan.clone(),
|
||||
control_port: mem::replace(&mut self.script_port, None).unwrap(),
|
||||
constellation_chan: self.constellation_chan.clone(),
|
||||
layout_to_constellation_chan: self.layout_to_constellation_chan.clone(),
|
||||
scheduler_chan: self.scheduler_chan.clone(),
|
||||
failure_info: self.failure.clone(),
|
||||
resource_task: self.resource_task,
|
||||
|
@ -405,7 +410,7 @@ impl UnprivilegedPipelineContent {
|
|||
self.parent_info.is_some(),
|
||||
layout_pair,
|
||||
self.pipeline_port.unwrap(),
|
||||
self.constellation_chan,
|
||||
self.layout_to_constellation_chan,
|
||||
self.failure,
|
||||
self.script_chan.clone(),
|
||||
self.layout_to_paint_chan.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue