mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #11675 - Ms2ger:SetFrameTree-field, r=metajack
Remove a spurious field from the SetFrameTree message. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11675) <!-- Reviewable:end -->
This commit is contained in:
commit
0e776ffcf7
3 changed files with 5 additions and 14 deletions
|
@ -576,9 +576,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
self.change_page_url(pipeline_id, url);
|
||||
}
|
||||
|
||||
(Msg::SetFrameTree(frame_tree, response_chan, new_constellation_chan),
|
||||
(Msg::SetFrameTree(frame_tree, response_chan),
|
||||
ShutdownState::NotShuttingDown) => {
|
||||
self.set_frame_tree(&frame_tree, response_chan, new_constellation_chan);
|
||||
self.set_frame_tree(&frame_tree, response_chan);
|
||||
self.send_viewport_rects_for_all_layers();
|
||||
self.title_for_main_frame();
|
||||
}
|
||||
|
@ -846,8 +846,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
|
||||
fn set_frame_tree(&mut self,
|
||||
frame_tree: &SendableFrameTree,
|
||||
response_chan: IpcSender<()>,
|
||||
new_constellation_chan: Sender<ConstellationMsg>) {
|
||||
response_chan: IpcSender<()>) {
|
||||
if let Err(e) = response_chan.send(()) {
|
||||
warn!("Sending reponse to set frame tree failed ({}).", e);
|
||||
}
|
||||
|
@ -874,8 +873,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
|
||||
self.create_pipeline_details_for_frame_tree(&frame_tree);
|
||||
|
||||
// Initialize the new constellation channel by sending it the root window size.
|
||||
self.constellation_chan = new_constellation_chan;
|
||||
self.send_window_size(WindowSizeType::Initial);
|
||||
|
||||
self.frame_tree_id.next();
|
||||
|
|
|
@ -141,7 +141,7 @@ pub enum Msg {
|
|||
/// Alerts the compositor that the given pipeline has changed whether it is running animations.
|
||||
ChangeRunningAnimationsState(PipelineId, AnimationState),
|
||||
/// Replaces the current frame tree, typically called during main frame navigation.
|
||||
SetFrameTree(SendableFrameTree, IpcSender<()>, Sender<ConstellationMsg>),
|
||||
SetFrameTree(SendableFrameTree, IpcSender<()>),
|
||||
/// The load of a page has begun: (can go back, can go forward).
|
||||
LoadStart(bool, bool),
|
||||
/// The load of a page has completed: (can go back, can go forward, is root frame).
|
||||
|
|
|
@ -85,9 +85,6 @@ pub struct Constellation<Message, LTF, STF> {
|
|||
/// A channel through which script messages can be sent to this object.
|
||||
script_sender: IpcSender<FromScriptMsg>,
|
||||
|
||||
/// A channel through which compositor messages can be sent to this object.
|
||||
compositor_sender: Sender<FromCompositorMsg>,
|
||||
|
||||
/// A channel through which layout thread messages can be sent to this object.
|
||||
layout_sender: IpcSender<FromLayoutMsg>,
|
||||
|
||||
|
@ -321,12 +318,10 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
let panic_receiver = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(ipc_panic_receiver);
|
||||
|
||||
let (compositor_sender, compositor_receiver) = channel();
|
||||
let compositor_sender_clone = compositor_sender.clone();
|
||||
|
||||
spawn_named("Constellation".to_owned(), move || {
|
||||
let mut constellation: Constellation<Message, LTF, STF> = Constellation {
|
||||
script_sender: ipc_script_sender,
|
||||
compositor_sender: compositor_sender_clone,
|
||||
layout_sender: ipc_layout_sender,
|
||||
script_receiver: script_receiver,
|
||||
panic_sender: ipc_panic_sender,
|
||||
|
@ -2032,8 +2027,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
if let Some(frame_tree) = self.frame_to_sendable(root_frame_id) {
|
||||
let (chan, port) = ipc::channel().expect("Failed to create IPC channel!");
|
||||
self.compositor_proxy.send(ToCompositorMsg::SetFrameTree(frame_tree,
|
||||
chan,
|
||||
self.compositor_sender.clone()));
|
||||
chan));
|
||||
if port.recv().is_err() {
|
||||
warn!("Compositor has discarded SetFrameTree");
|
||||
return; // Our message has been discarded, probably shutting down.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue