mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Remove ScriptThread::layout_to_constellation_chan.
Instead, pass it along in NewLayoutInfo when needed.
This commit is contained in:
parent
1640ade0b3
commit
4f893ee96e
3 changed files with 7 additions and 10 deletions
|
@ -166,6 +166,7 @@ impl Pipeline {
|
||||||
paint_chan: layout_to_paint_chan.clone().to_opaque(),
|
paint_chan: layout_to_paint_chan.clone().to_opaque(),
|
||||||
panic_chan: state.panic_chan.clone(),
|
panic_chan: state.panic_chan.clone(),
|
||||||
pipeline_port: pipeline_port,
|
pipeline_port: pipeline_port,
|
||||||
|
layout_to_constellation_chan: state.layout_to_constellation_chan.clone(),
|
||||||
layout_shutdown_chan: layout_shutdown_chan.clone(),
|
layout_shutdown_chan: layout_shutdown_chan.clone(),
|
||||||
content_process_shutdown_chan: layout_content_process_shutdown_chan.clone(),
|
content_process_shutdown_chan: layout_content_process_shutdown_chan.clone(),
|
||||||
};
|
};
|
||||||
|
@ -410,7 +411,6 @@ impl UnprivilegedPipelineContent {
|
||||||
control_chan: self.script_chan.clone(),
|
control_chan: self.script_chan.clone(),
|
||||||
control_port: mem::replace(&mut self.script_port, None).expect("No script port."),
|
control_port: mem::replace(&mut self.script_port, None).expect("No script port."),
|
||||||
constellation_chan: self.constellation_chan.clone(),
|
constellation_chan: self.constellation_chan.clone(),
|
||||||
layout_to_constellation_chan: self.layout_to_constellation_chan.clone(),
|
|
||||||
scheduler_chan: self.scheduler_chan.clone(),
|
scheduler_chan: self.scheduler_chan.clone(),
|
||||||
panic_chan: self.panic_chan.clone(),
|
panic_chan: self.panic_chan.clone(),
|
||||||
bluetooth_thread: self.bluetooth_thread.clone(),
|
bluetooth_thread: self.bluetooth_thread.clone(),
|
||||||
|
|
|
@ -79,8 +79,8 @@ use script_runtime::{ScriptPort, StackRootTLS, new_rt_and_cx, get_reports};
|
||||||
use script_traits::CompositorEvent::{KeyEvent, MouseButtonEvent, MouseMoveEvent, ResizeEvent};
|
use script_traits::CompositorEvent::{KeyEvent, MouseButtonEvent, MouseMoveEvent, ResizeEvent};
|
||||||
use script_traits::CompositorEvent::{TouchEvent, TouchpadPressureEvent};
|
use script_traits::CompositorEvent::{TouchEvent, TouchpadPressureEvent};
|
||||||
use script_traits::{CompositorEvent, ConstellationControlMsg, EventResult};
|
use script_traits::{CompositorEvent, ConstellationControlMsg, EventResult};
|
||||||
use script_traits::{InitialScriptState, MouseButton, MouseEventType, MozBrowserEvent, NewLayoutInfo};
|
use script_traits::{InitialScriptState, MouseButton, MouseEventType, MozBrowserEvent};
|
||||||
use script_traits::{LayoutMsg, ScriptMsg as ConstellationMsg};
|
use script_traits::{NewLayoutInfo, ScriptMsg as ConstellationMsg};
|
||||||
use script_traits::{ScriptThreadFactory, TimerEvent, TimerEventRequest, TimerSource};
|
use script_traits::{ScriptThreadFactory, TimerEvent, TimerEventRequest, TimerSource};
|
||||||
use script_traits::{TouchEventType, TouchId};
|
use script_traits::{TouchEventType, TouchId};
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
|
@ -347,9 +347,6 @@ pub struct ScriptThread {
|
||||||
/// For communicating load url messages to the constellation
|
/// For communicating load url messages to the constellation
|
||||||
constellation_chan: IpcSender<ConstellationMsg>,
|
constellation_chan: IpcSender<ConstellationMsg>,
|
||||||
|
|
||||||
/// For communicating layout messages to the constellation
|
|
||||||
layout_to_constellation_chan: IpcSender<LayoutMsg>,
|
|
||||||
|
|
||||||
/// The port on which we receive messages from the image cache
|
/// The port on which we receive messages from the image cache
|
||||||
image_cache_port: Receiver<ImageCacheResult>,
|
image_cache_port: Receiver<ImageCacheResult>,
|
||||||
|
|
||||||
|
@ -572,7 +569,6 @@ impl ScriptThread {
|
||||||
control_chan: state.control_chan,
|
control_chan: state.control_chan,
|
||||||
control_port: control_port,
|
control_port: control_port,
|
||||||
constellation_chan: state.constellation_chan,
|
constellation_chan: state.constellation_chan,
|
||||||
layout_to_constellation_chan: state.layout_to_constellation_chan,
|
|
||||||
time_profiler_chan: state.time_profiler_chan,
|
time_profiler_chan: state.time_profiler_chan,
|
||||||
mem_profiler_chan: state.mem_profiler_chan,
|
mem_profiler_chan: state.mem_profiler_chan,
|
||||||
panic_chan: state.panic_chan,
|
panic_chan: state.panic_chan,
|
||||||
|
@ -1089,6 +1085,7 @@ impl ScriptThread {
|
||||||
paint_chan,
|
paint_chan,
|
||||||
panic_chan,
|
panic_chan,
|
||||||
pipeline_port,
|
pipeline_port,
|
||||||
|
layout_to_constellation_chan,
|
||||||
layout_shutdown_chan,
|
layout_shutdown_chan,
|
||||||
content_process_shutdown_chan,
|
content_process_shutdown_chan,
|
||||||
} = new_layout_info;
|
} = new_layout_info;
|
||||||
|
@ -1102,7 +1099,7 @@ impl ScriptThread {
|
||||||
is_parent: false,
|
is_parent: false,
|
||||||
layout_pair: layout_pair,
|
layout_pair: layout_pair,
|
||||||
pipeline_port: pipeline_port,
|
pipeline_port: pipeline_port,
|
||||||
constellation_chan: self.layout_to_constellation_chan.clone(),
|
constellation_chan: layout_to_constellation_chan,
|
||||||
panic_chan: panic_chan,
|
panic_chan: panic_chan,
|
||||||
paint_chan: paint_chan,
|
paint_chan: paint_chan,
|
||||||
script_chan: self.control_chan.clone(),
|
script_chan: self.control_chan.clone(),
|
||||||
|
|
|
@ -100,6 +100,8 @@ pub struct NewLayoutInfo {
|
||||||
pub pipeline_port: IpcReceiver<LayoutControlMsg>,
|
pub pipeline_port: IpcReceiver<LayoutControlMsg>,
|
||||||
/// A channel for sending panics on
|
/// A channel for sending panics on
|
||||||
pub panic_chan: IpcSender<PanicMsg>,
|
pub panic_chan: IpcSender<PanicMsg>,
|
||||||
|
/// A sender for the layout thread to communicate to the constellation.
|
||||||
|
pub layout_to_constellation_chan: IpcSender<LayoutMsg>,
|
||||||
/// A shutdown channel so that layout can notify others when it's done.
|
/// A shutdown channel so that layout can notify others when it's done.
|
||||||
pub layout_shutdown_chan: IpcSender<()>,
|
pub layout_shutdown_chan: IpcSender<()>,
|
||||||
/// A shutdown channel so that layout can tell the content process to shut down when it's done.
|
/// A shutdown channel so that layout can tell the content process to shut down when it's done.
|
||||||
|
@ -310,8 +312,6 @@ pub struct InitialScriptState {
|
||||||
pub control_port: IpcReceiver<ConstellationControlMsg>,
|
pub control_port: IpcReceiver<ConstellationControlMsg>,
|
||||||
/// A channel on which messages can be sent to the constellation from script.
|
/// A channel on which messages can be sent to the constellation from script.
|
||||||
pub constellation_chan: IpcSender<ScriptMsg>,
|
pub constellation_chan: IpcSender<ScriptMsg>,
|
||||||
/// A channel for the layout thread to send messages to the constellation.
|
|
||||||
pub layout_to_constellation_chan: IpcSender<LayoutMsg>,
|
|
||||||
/// A channel for sending panics to the constellation.
|
/// A channel for sending panics to the constellation.
|
||||||
pub panic_chan: IpcSender<PanicMsg>,
|
pub panic_chan: IpcSender<PanicMsg>,
|
||||||
/// A channel to schedule timer events.
|
/// A channel to schedule timer events.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue