mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -30,9 +30,10 @@ use strum_macros::IntoStaticStr;
|
|||
use webrender_api::ExternalScrollId;
|
||||
use webrender_api::units::LayoutPixel;
|
||||
|
||||
/// Messages to the constellation.
|
||||
/// Messages to the Constellation from the embedding layer, whether from `ServoRenderer` or
|
||||
/// from `libservo` itself.
|
||||
#[derive(IntoStaticStr)]
|
||||
pub enum ConstellationMsg {
|
||||
pub enum EmbedderToConstellationMessage {
|
||||
/// Exit the constellation.
|
||||
Exit,
|
||||
/// Request that the constellation send the current focused top-level browsing context id,
|
||||
|
@ -96,7 +97,7 @@ pub enum PaintMetricEvent {
|
|||
FirstContentfulPaint(CrossProcessInstant, bool /* first_reflow */),
|
||||
}
|
||||
|
||||
impl fmt::Debug for ConstellationMsg {
|
||||
impl fmt::Debug for EmbedderToConstellationMessage {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
let variant_string: &'static str = self.into();
|
||||
write!(formatter, "ConstellationMsg::{variant_string}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue