mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
constellation: Remove two unused messages to the Constellation (#35972)
This also removes supporting code which becomes unused as well. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
7517976722
commit
bc4ee8b56a
3 changed files with 1 additions and 58 deletions
|
@ -1242,12 +1242,6 @@ where
|
||||||
FromCompositorMsg::Exit => {
|
FromCompositorMsg::Exit => {
|
||||||
self.handle_exit();
|
self.handle_exit();
|
||||||
},
|
},
|
||||||
FromCompositorMsg::GetBrowsingContext(pipeline_id, response_sender) => {
|
|
||||||
self.handle_get_browsing_context(pipeline_id, response_sender);
|
|
||||||
},
|
|
||||||
FromCompositorMsg::GetPipeline(browsing_context_id, response_sender) => {
|
|
||||||
self.handle_get_pipeline(browsing_context_id, response_sender);
|
|
||||||
},
|
|
||||||
FromCompositorMsg::GetFocusTopLevelBrowsingContext(resp_chan) => {
|
FromCompositorMsg::GetFocusTopLevelBrowsingContext(resp_chan) => {
|
||||||
let _ = resp_chan.send(self.webviews.focused_webview().map(|(id, _)| id));
|
let _ = resp_chan.send(self.webviews.focused_webview().map(|(id, _)| id));
|
||||||
},
|
},
|
||||||
|
@ -4192,49 +4186,6 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(
|
|
||||||
feature = "tracing",
|
|
||||||
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
|
|
||||||
)]
|
|
||||||
fn handle_get_pipeline(
|
|
||||||
&mut self,
|
|
||||||
browsing_context_id: BrowsingContextId,
|
|
||||||
response_sender: IpcSender<Option<PipelineId>>,
|
|
||||||
) {
|
|
||||||
let current_pipeline_id = self
|
|
||||||
.browsing_contexts
|
|
||||||
.get(&browsing_context_id)
|
|
||||||
.map(|browsing_context| browsing_context.pipeline_id);
|
|
||||||
let pipeline_id_loaded = self
|
|
||||||
.pending_changes
|
|
||||||
.iter()
|
|
||||||
.rev()
|
|
||||||
.find(|x| x.browsing_context_id == browsing_context_id)
|
|
||||||
.map(|x| x.new_pipeline_id)
|
|
||||||
.or(current_pipeline_id);
|
|
||||||
if let Err(e) = response_sender.send(pipeline_id_loaded) {
|
|
||||||
warn!("Failed get_pipeline response ({}).", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg_attr(
|
|
||||||
feature = "tracing",
|
|
||||||
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
|
|
||||||
)]
|
|
||||||
fn handle_get_browsing_context(
|
|
||||||
&mut self,
|
|
||||||
pipeline_id: PipelineId,
|
|
||||||
response_sender: IpcSender<Option<BrowsingContextId>>,
|
|
||||||
) {
|
|
||||||
let browsing_context_id = self
|
|
||||||
.pipelines
|
|
||||||
.get(&pipeline_id)
|
|
||||||
.map(|pipeline| pipeline.browsing_context_id);
|
|
||||||
if let Err(e) = response_sender.send(browsing_context_id) {
|
|
||||||
warn!("Failed get_browsing_context response ({}).", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
|
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
|
||||||
|
|
|
@ -61,8 +61,6 @@ mod from_compositor {
|
||||||
fn log_target(&self) -> &'static str {
|
fn log_target(&self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
Self::Exit => target!("Exit"),
|
Self::Exit => target!("Exit"),
|
||||||
Self::GetBrowsingContext(..) => target!("GetBrowsingContext"),
|
|
||||||
Self::GetPipeline(..) => target!("GetPipeline"),
|
|
||||||
Self::GetFocusTopLevelBrowsingContext(..) => {
|
Self::GetFocusTopLevelBrowsingContext(..) => {
|
||||||
target!("GetFocusTopLevelBrowsingContext")
|
target!("GetFocusTopLevelBrowsingContext")
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@ use std::fmt;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use base::Epoch;
|
use base::Epoch;
|
||||||
use base::id::{BrowsingContextId, PipelineId, WebViewId};
|
use base::id::{PipelineId, WebViewId};
|
||||||
use embedder_traits::{
|
use embedder_traits::{
|
||||||
Cursor, InputEvent, MediaSessionActionType, Theme, TraversalDirection, WebDriverCommandMsg,
|
Cursor, InputEvent, MediaSessionActionType, Theme, TraversalDirection, WebDriverCommandMsg,
|
||||||
};
|
};
|
||||||
|
@ -22,12 +22,6 @@ use webrender_traits::CompositorHitTestResult;
|
||||||
pub enum ConstellationMsg {
|
pub enum ConstellationMsg {
|
||||||
/// Exit the constellation.
|
/// Exit the constellation.
|
||||||
Exit,
|
Exit,
|
||||||
/// Request that the constellation send the BrowsingContextId corresponding to the document
|
|
||||||
/// with the provided pipeline id
|
|
||||||
GetBrowsingContext(PipelineId, IpcSender<Option<BrowsingContextId>>),
|
|
||||||
/// Request that the constellation send the current pipeline id for the provided
|
|
||||||
/// browsing context id, over a provided channel.
|
|
||||||
GetPipeline(BrowsingContextId, IpcSender<Option<PipelineId>>),
|
|
||||||
/// Request that the constellation send the current focused top-level browsing context id,
|
/// Request that the constellation send the current focused top-level browsing context id,
|
||||||
/// over a provided channel.
|
/// over a provided channel.
|
||||||
GetFocusTopLevelBrowsingContext(IpcSender<Option<WebViewId>>),
|
GetFocusTopLevelBrowsingContext(IpcSender<Option<WebViewId>>),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue