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
|
@ -14,7 +14,7 @@ use js::rust::{HandleValue, MutableHandleValue};
|
|||
use net_traits::{CoreResourceMsg, IpcSend};
|
||||
use profile_traits::ipc;
|
||||
use profile_traits::ipc::channel;
|
||||
use script_traits::{ScriptMsg, StructuredSerializedData};
|
||||
use script_traits::{ScriptToConstellationMessage, StructuredSerializedData};
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::HistoryBinding::HistoryMethods;
|
||||
|
@ -72,7 +72,7 @@ impl History {
|
|||
if !self.window.Document().is_fully_active() {
|
||||
return Err(Error::Security);
|
||||
}
|
||||
let msg = ScriptMsg::TraverseHistory(direction);
|
||||
let msg = ScriptToConstellationMessage::TraverseHistory(direction);
|
||||
let _ = self
|
||||
.window
|
||||
.as_global_scope()
|
||||
|
@ -227,7 +227,7 @@ impl History {
|
|||
PushOrReplace::Push => {
|
||||
let state_id = HistoryStateId::new();
|
||||
self.state_id.set(Some(state_id));
|
||||
let msg = ScriptMsg::PushHistoryState(state_id, new_url.clone());
|
||||
let msg = ScriptToConstellationMessage::PushHistoryState(state_id, new_url.clone());
|
||||
let _ = self
|
||||
.window
|
||||
.as_global_scope()
|
||||
|
@ -244,7 +244,8 @@ impl History {
|
|||
state_id
|
||||
},
|
||||
};
|
||||
let msg = ScriptMsg::ReplaceHistoryState(state_id, new_url.clone());
|
||||
let msg =
|
||||
ScriptToConstellationMessage::ReplaceHistoryState(state_id, new_url.clone());
|
||||
let _ = self
|
||||
.window
|
||||
.as_global_scope()
|
||||
|
@ -339,7 +340,7 @@ impl HistoryMethods<crate::DomTypeHolder> for History {
|
|||
}
|
||||
let (sender, recv) = channel(self.global().time_profiler_chan().clone())
|
||||
.expect("Failed to create channel to send jsh length.");
|
||||
let msg = ScriptMsg::JointSessionHistoryLength(sender);
|
||||
let msg = ScriptToConstellationMessage::JointSessionHistoryLength(sender);
|
||||
let _ = self
|
||||
.window
|
||||
.as_global_scope()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue