mirror of
https://github.com/servo/servo
synced 2026-05-13 10:27:03 +02: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:
@@ -54,9 +54,9 @@ pub enum TouchEventResult {
|
||||
DefaultPrevented(TouchSequenceId, TouchEventType),
|
||||
}
|
||||
|
||||
/// Messages from the script to the constellation.
|
||||
/// Messages sent from the `ScriptThread` to the `Constellation`.
|
||||
#[derive(Deserialize, IntoStaticStr, Serialize)]
|
||||
pub enum ScriptMsg {
|
||||
pub enum ScriptToConstellationMessage {
|
||||
/// Request to complete the transfer of a set of ports to a router.
|
||||
CompleteMessagePortTransfer(MessagePortRouterId, Vec<MessagePortId>),
|
||||
/// The results of attempting to complete the transfer of a batch of ports.
|
||||
@@ -219,7 +219,7 @@ pub enum ScriptMsg {
|
||||
ReportMemory(IpcSender<MemoryReportResult>),
|
||||
}
|
||||
|
||||
impl fmt::Debug for ScriptMsg {
|
||||
impl fmt::Debug for ScriptToConstellationMessage {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
let variant_string: &'static str = self.into();
|
||||
write!(formatter, "ScriptMsg::{variant_string}")
|
||||
|
||||
Reference in New Issue
Block a user