diff options
-rw-r--r-- | components/constellation/constellation.rs | 4 | ||||
-rw-r--r-- | components/script/dom/bindings/trace.rs | 2 | ||||
-rw-r--r-- | components/script_traits/lib.rs | 1 | ||||
-rw-r--r-- | components/script_traits/script_msg.rs | 4 | ||||
-rw-r--r-- | components/servo/lib.rs | 2 | ||||
-rw-r--r-- | ports/libsimpleservo/capi/src/lib.rs | 3 |
6 files changed, 9 insertions, 7 deletions
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 2f1d0a06ac7..1802952e31e 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -153,8 +153,8 @@ use script_traits::{ IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSandboxState, TimerSchedulerMsg, }; use script_traits::{LayoutMsg as FromLayoutMsg, ScriptMsg as FromScriptMsg, ScriptThreadFactory}; -use script_traits::{MessagePortMsg, PortMessageTask, StructuredSerializedData}; use script_traits::{MediaSessionActionType, MouseEventType}; +use script_traits::{MessagePortMsg, PortMessageTask, StructuredSerializedData}; use script_traits::{SWManagerMsg, ScopeThings, UpdatePipelineIdReason, WebDriverCommandMsg}; use serde::{Deserialize, Serialize}; use servo_config::{opts, pref}; @@ -475,7 +475,7 @@ pub struct Constellation<Message, LTF, STF> { /// Mechanism to force the compositor to process events. event_loop_waker: Option<Box<dyn EventLoopWaker>>, - + /// Browing context ID of the active media session. active_media_session: Option<BrowsingContextId>, } diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 1d426c2a0e6..87f41eec5ef 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -94,7 +94,7 @@ use profile_traits::time::ProfilerChan as TimeProfilerChan; use script_layout_interface::rpc::LayoutRPC; use script_layout_interface::OpaqueStyleAndLayoutData; use script_traits::transferable::MessagePortImpl; -use script_traits::{DocumentActivity, DrawAPaintImageResult; +use script_traits::{DocumentActivity, DrawAPaintImageResult}; use script_traits::{MediaSessionActionType, ScriptToConstellationChan, TimerEventId, TimerSource}; use script_traits::{UntrustedNodeAddress, WindowSizeData, WindowSizeType}; use selectors::matching::ElementSelectorFlags; diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index a732141a9ff..7216a369693 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -1058,6 +1058,7 @@ pub enum MessagePortMsg { RemoveMessagePort(MessagePortId), /// Handle a new port-message-task. NewTask(MessagePortId, PortMessageTask), +} /// The type of MediaSession action. /// https://w3c.github.io/mediasession/#enumdef-mediasessionaction diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index 9db4e7ac7e2..4cce2501c88 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -8,7 +8,6 @@ use crate::DocumentState; use crate::IFrameLoadInfoWithData; use crate::LayoutControlMsg; use crate::LoadData; -use crate::MediaSessionEvent; use crate::MessagePortMsg; use crate::PortMessageTask; use crate::StructuredSerializedData; @@ -255,6 +254,9 @@ pub enum ScriptMsg { GetScreenSize(IpcSender<DeviceIntSize>), /// Get the available screen size (pixel) GetScreenAvailSize(IpcSender<DeviceIntSize>), + /// Notifies the constellation about media session events + /// (i.e. when there is metadata for the active media session, playback state changes...). + MediaSessionEvent(BrowsingContextId, MediaSessionEvent) } impl fmt::Debug for ScriptMsg { diff --git a/components/servo/lib.rs b/components/servo/lib.rs index fa188bc5b3d..67751234111 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -270,7 +270,6 @@ pub struct Servo<Window: WindowMethods + 'static + ?Sized> { embedder_receiver: EmbedderReceiver, embedder_events: Vec<(Option<BrowserId>, EmbedderMsg)>, profiler_enabled: bool, - webgl_thread_data: Option<Rc<WebGLMainThread>>, } #[derive(Clone)] @@ -556,7 +555,6 @@ where embedder_receiver: embedder_receiver, embedder_events: Vec::new(), profiler_enabled: false, - webgl_thread_data, } } diff --git a/ports/libsimpleservo/capi/src/lib.rs b/ports/libsimpleservo/capi/src/lib.rs index 31a066d9416..2d67f088b9a 100644 --- a/ports/libsimpleservo/capi/src/lib.rs +++ b/ports/libsimpleservo/capi/src/lib.rs @@ -17,7 +17,8 @@ use env_logger; use log::LevelFilter; use simpleservo::{self, gl_glue, ServoGlue, SERVO}; use simpleservo::{ - Coordinates, EventLoopWaker, HostTrait, InitOptions, MediaSessionEvent, MouseButton, VRInitOptions, + Coordinates, EventLoopWaker, HostTrait, InitOptions, MediaSessionEvent, MouseButton, + VRInitOptions, }; use std::ffi::{CStr, CString}; #[cfg(target_os = "windows")] |