mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
constellation: Rename messages sent to the Constellation
(#36341)
Messages that are sent to the `Constellation` have pretty ambiguous names. This change does two renames: - `ConstellationMsg` → `EmbedderToConstellationMessage` - `ScriptMsg` → `ScriptToConstellationMessage` This naming reflects that the `Constellation` stands in between the embedding layer and the script layer and can receive messages from both. Soon both of these message types will live in `constellation_traits`, reflecting the idea that the `_traits` variant for a crate is responsible for exposing the API for that crate. Testing: No new tests are necessary here as this just renames two enums. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
c7a7862574
commit
5a35e1faec
37 changed files with 415 additions and 364 deletions
|
@ -9,7 +9,7 @@ use std::rc::Rc;
|
|||
|
||||
use base::id::{PipelineId, WebViewId};
|
||||
use compositing_traits::SendableFrameTree;
|
||||
use constellation_traits::{CompositorHitTestResult, ConstellationMsg, ScrollState};
|
||||
use constellation_traits::{CompositorHitTestResult, EmbedderToConstellationMessage, ScrollState};
|
||||
use embedder_traits::{
|
||||
InputEvent, MouseButton, MouseButtonAction, MouseButtonEvent, MouseMoveEvent, ShutdownState,
|
||||
TouchEvent, TouchEventType, TouchId,
|
||||
|
@ -168,14 +168,9 @@ impl WebView {
|
|||
}
|
||||
});
|
||||
|
||||
let _ = self
|
||||
.global
|
||||
.borrow()
|
||||
.constellation_sender
|
||||
.send(ConstellationMsg::SetScrollStates(
|
||||
pipeline_id,
|
||||
scroll_states,
|
||||
));
|
||||
let _ = self.global.borrow().constellation_sender.send(
|
||||
EmbedderToConstellationMessage::SetScrollStates(pipeline_id, scroll_states),
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn set_frame_tree_on_pipeline_details(
|
||||
|
@ -295,16 +290,9 @@ impl WebView {
|
|||
|
||||
self.global.borrow_mut().update_cursor(point, &result);
|
||||
|
||||
if let Err(error) =
|
||||
self.global
|
||||
.borrow()
|
||||
.constellation_sender
|
||||
.send(ConstellationMsg::ForwardInputEvent(
|
||||
self.id,
|
||||
event,
|
||||
Some(result),
|
||||
))
|
||||
{
|
||||
if let Err(error) = self.global.borrow().constellation_sender.send(
|
||||
EmbedderToConstellationMessage::ForwardInputEvent(self.id, event, Some(result)),
|
||||
) {
|
||||
warn!("Sending event to constellation failed ({error:?}).");
|
||||
}
|
||||
}
|
||||
|
@ -364,16 +352,9 @@ impl WebView {
|
|||
|
||||
event.init_sequence_id(self.touch_handler.current_sequence_id);
|
||||
let event = InputEvent::Touch(event);
|
||||
if let Err(e) =
|
||||
self.global
|
||||
.borrow()
|
||||
.constellation_sender
|
||||
.send(ConstellationMsg::ForwardInputEvent(
|
||||
self.id,
|
||||
event,
|
||||
Some(result),
|
||||
))
|
||||
{
|
||||
if let Err(e) = self.global.borrow().constellation_sender.send(
|
||||
EmbedderToConstellationMessage::ForwardInputEvent(self.id, event, Some(result)),
|
||||
) {
|
||||
warn!("Sending event to constellation failed ({:?}).", e);
|
||||
false
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue