mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -15,7 +15,7 @@ use profile_traits::ipc as ProfiledIpc;
|
|||
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
|
||||
use script_traits::{
|
||||
IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, LoadOrigin,
|
||||
NavigationHistoryBehavior, NewLayoutInfo, ScriptMsg, UpdatePipelineIdReason,
|
||||
NavigationHistoryBehavior, NewLayoutInfo, ScriptToConstellationMessage, UpdatePipelineIdReason,
|
||||
};
|
||||
use servo_url::ServoUrl;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
|
@ -217,7 +217,7 @@ impl HTMLIFrameElement {
|
|||
window
|
||||
.as_global_scope()
|
||||
.script_to_constellation_chan()
|
||||
.send(ScriptMsg::ScriptNewIFrame(load_info))
|
||||
.send(ScriptToConstellationMessage::ScriptNewIFrame(load_info))
|
||||
.unwrap();
|
||||
|
||||
let new_layout_info = NewLayoutInfo {
|
||||
|
@ -244,7 +244,9 @@ impl HTMLIFrameElement {
|
|||
window
|
||||
.as_global_scope()
|
||||
.script_to_constellation_chan()
|
||||
.send(ScriptMsg::ScriptLoadedURLInIFrame(load_info))
|
||||
.send(ScriptToConstellationMessage::ScriptLoadedURLInIFrame(
|
||||
load_info,
|
||||
))
|
||||
.unwrap();
|
||||
},
|
||||
}
|
||||
|
@ -782,7 +784,7 @@ impl VirtualMethods for HTMLIFrameElement {
|
|||
};
|
||||
debug!("Unbinding frame {}.", browsing_context_id);
|
||||
|
||||
let msg = ScriptMsg::RemoveIFrame(browsing_context_id, sender);
|
||||
let msg = ScriptToConstellationMessage::RemoveIFrame(browsing_context_id, sender);
|
||||
window
|
||||
.as_global_scope()
|
||||
.script_to_constellation_chan()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue