script_traits: Rename ConstellationControlMsg to ScriptThreadMessage (#35226)

At some point in the past this message was only sent from the
`Constellation` to `script`, but nowadays this is sent from various
parts of servo to the `ScriptThread`, so this is a better name. In
particular, the current name makes it seeem like this message controls
the `Constellation`, which it does not.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-01-30 23:46:17 +01:00 committed by GitHub
parent 006ec58598
commit ad07db0b0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 183 additions and 200 deletions

View file

@ -51,7 +51,7 @@ use script_layout_interface::{
ReflowRequest, ReflowResult, TrustedNodeAddress,
};
use script_traits::{
ConstellationControlMsg, DrawAPaintImageResult, PaintWorkletError, Painter, ScrollState,
DrawAPaintImageResult, PaintWorkletError, Painter, ScriptThreadMessage, ScrollState,
UntrustedNodeAddress, WindowSizeData,
};
use servo_arc::Arc as ServoArc;
@ -118,7 +118,7 @@ pub struct LayoutThread {
is_iframe: bool,
/// The channel on which messages can be sent to the script thread.
script_chan: IpcSender<ConstellationControlMsg>,
script_chan: IpcSender<ScriptThreadMessage>,
/// The channel on which messages can be sent to the time profiler.
time_profiler_chan: profile_time::ProfilerChan,
@ -594,10 +594,7 @@ impl LayoutThread {
let web_font_finished_loading_callback = move |succeeded: bool| {
let _ = locked_script_channel
.lock()
.send(ConstellationControlMsg::WebFontLoaded(
pipeline_id,
succeeded,
));
.send(ScriptThreadMessage::WebFontLoaded(pipeline_id, succeeded));
};
self.font_context.add_all_web_fonts_from_stylesheet(