diff options
Diffstat (limited to 'components/shared/constellation')
5 files changed, 18 insertions, 7 deletions
diff --git a/components/shared/constellation/from_script_message.rs b/components/shared/constellation/from_script_message.rs index a5424abe6d1..fa391f93859 100644 --- a/components/shared/constellation/from_script_message.rs +++ b/components/shared/constellation/from_script_message.rs @@ -17,6 +17,7 @@ use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, Worke use embedder_traits::{ AnimationState, EmbedderMsg, FocusSequenceNumber, JSValue, JavaScriptEvaluationError, JavaScriptEvaluationId, MediaSessionEvent, TouchEventResult, ViewportDetails, + WebDriverMessageId, }; use euclid::default::Size2D as UntypedSize2D; use http::{HeaderMap, Method}; @@ -652,6 +653,8 @@ pub enum ScriptToConstellationMessage { JavaScriptEvaluationId, Result<JSValue, JavaScriptEvaluationError>, ), + /// Notify the completion of a webdriver command. + WebDriverInputComplete(WebDriverMessageId), } impl fmt::Debug for ScriptToConstellationMessage { diff --git a/components/shared/constellation/lib.rs b/components/shared/constellation/lib.rs index d85fbe31bdf..005295000c9 100644 --- a/components/shared/constellation/lib.rs +++ b/components/shared/constellation/lib.rs @@ -152,7 +152,7 @@ pub enum TraversalDirection { } /// A task on the <https://html.spec.whatwg.org/multipage/#port-message-queue> -#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] +#[derive(Debug, Deserialize, MallocSizeOf, Serialize)] pub struct PortMessageTask { /// The origin of this task. pub origin: ImmutableOrigin, diff --git a/components/shared/constellation/structured_data/mod.rs b/components/shared/constellation/structured_data/mod.rs index 3fb9d0c5f67..81e3849e476 100644 --- a/components/shared/constellation/structured_data/mod.rs +++ b/components/shared/constellation/structured_data/mod.rs @@ -20,7 +20,7 @@ pub use transferable::*; /// A data-holder for serialized data and transferred objects. /// <https://html.spec.whatwg.org/multipage/#structuredserializewithtransfer> -#[derive(Clone, Debug, Default, Deserialize, MallocSizeOf, Serialize)] +#[derive(Debug, Default, Deserialize, MallocSizeOf, Serialize)] pub struct StructuredSerializedData { /// Data serialized by SpiderMonkey. pub serialized: Vec<u8>, @@ -32,6 +32,8 @@ pub struct StructuredSerializedData { pub exceptions: Option<HashMap<DomExceptionId, DomException>>, /// Transferred objects. pub ports: Option<HashMap<MessagePortId, MessagePortImpl>>, + /// Transform streams transferred objects. + pub transform_streams: Option<HashMap<MessagePortId, TransformStreamData>>, } impl StructuredSerializedData { diff --git a/components/shared/constellation/structured_data/serializable.rs b/components/shared/constellation/structured_data/serializable.rs index 194f0567c51..22370087665 100644 --- a/components/shared/constellation/structured_data/serializable.rs +++ b/components/shared/constellation/structured_data/serializable.rs @@ -88,7 +88,7 @@ impl Clone for BroadcastMsg { } /// File-based blob -#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] +#[derive(Debug, Deserialize, MallocSizeOf, Serialize)] pub struct FileBlob { #[ignore_malloc_size_of = "Uuid are hard(not really)"] id: Uuid, @@ -164,7 +164,7 @@ impl BroadcastClone for BlobImpl { } /// The data backing a DOM Blob. -#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] +#[derive(Debug, Deserialize, MallocSizeOf, Serialize)] pub struct BlobImpl { /// UUID of the blob. blob_id: BlobId, @@ -177,7 +177,7 @@ pub struct BlobImpl { } /// Different backends of Blob -#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] +#[derive(Debug, Deserialize, MallocSizeOf, Serialize)] pub enum BlobData { /// File-based blob, whose content lives in the net process File(FileBlob), diff --git a/components/shared/constellation/structured_data/transferable.rs b/components/shared/constellation/structured_data/transferable.rs index 528c1e79e65..3210a41a538 100644 --- a/components/shared/constellation/structured_data/transferable.rs +++ b/components/shared/constellation/structured_data/transferable.rs @@ -15,6 +15,12 @@ use strum::EnumIter; use crate::PortMessageTask; +#[derive(Debug, Deserialize, MallocSizeOf, Serialize)] +pub struct TransformStreamData { + pub readable: (MessagePortId, MessagePortImpl), + pub writable: (MessagePortId, MessagePortImpl), +} + /// All the DOM interfaces that can be transferred. #[derive(Clone, Copy, Debug, EnumIter)] pub enum Transferrable { @@ -28,7 +34,7 @@ pub enum Transferrable { TransformStream, } -#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] +#[derive(Debug, Deserialize, MallocSizeOf, Serialize)] enum MessagePortState { /// <https://html.spec.whatwg.org/multipage/#detached> Detached, @@ -42,7 +48,7 @@ enum MessagePortState { Disabled(bool), } -#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] +#[derive(Debug, Deserialize, MallocSizeOf, Serialize)] /// The data and logic backing the DOM managed MessagePort. pub struct MessagePortImpl { /// The current state of the port. |