mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +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 => {
|
||||
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) => {
|
||||
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(
|
||||
feature = "tracing",
|
||||
tracing::instrument(skip_all, fields(servo_profiling = true), level = "trace")
|
||||
|
|
|
@ -61,8 +61,6 @@ mod from_compositor {
|
|||
fn log_target(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Exit => target!("Exit"),
|
||||
Self::GetBrowsingContext(..) => target!("GetBrowsingContext"),
|
||||
Self::GetPipeline(..) => target!("GetPipeline"),
|
||||
Self::GetFocusTopLevelBrowsingContext(..) => {
|
||||
target!("GetFocusTopLevelBrowsingContext")
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@ use std::fmt;
|
|||
use std::time::Duration;
|
||||
|
||||
use base::Epoch;
|
||||
use base::id::{BrowsingContextId, PipelineId, WebViewId};
|
||||
use base::id::{PipelineId, WebViewId};
|
||||
use embedder_traits::{
|
||||
Cursor, InputEvent, MediaSessionActionType, Theme, TraversalDirection, WebDriverCommandMsg,
|
||||
};
|
||||
|
@ -22,12 +22,6 @@ use webrender_traits::CompositorHitTestResult;
|
|||
pub enum ConstellationMsg {
|
||||
/// Exit the constellation.
|
||||
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,
|
||||
/// over a provided channel.
|
||||
GetFocusTopLevelBrowsingContext(IpcSender<Option<WebViewId>>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue