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

@ -63,7 +63,7 @@ use script_layout_interface::{
OffsetParentResponse, Reflow, ReflowGoal, ReflowRequest, ReflowResult, TrustedNodeAddress,
};
use script_traits::{
ConstellationControlMsg, DrawAPaintImageResult, PaintWorkletError, Painter, ScrollState,
DrawAPaintImageResult, PaintWorkletError, Painter, ScriptThreadMessage, ScrollState,
UntrustedNodeAddress, WindowSizeData,
};
use servo_arc::Arc as ServoArc;
@ -132,7 +132,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,
@ -615,12 +615,12 @@ impl LayoutThread {
let locked_script_channel = Mutex::new(self.script_chan.clone());
let pipeline_id = self.id;
let web_font_finished_loading_callback =
move |succeeded: bool| {
let _ = locked_script_channel.lock().unwrap().send(
ConstellationControlMsg::WebFontLoaded(pipeline_id, succeeded),
);
};
let web_font_finished_loading_callback = move |succeeded: bool| {
let _ = locked_script_channel
.lock()
.unwrap()
.send(ScriptThreadMessage::WebFontLoaded(pipeline_id, succeeded));
};
self.font_context.add_all_web_fonts_from_stylesheet(
self.webview_id,