Skip to content
Permalink
Browse files

Format code and fix rebase errors

  • Loading branch information
ferjm committed Nov 6, 2019
1 parent 85ec66b commit 68baabba63d84385b94a31c013dd1e55452e4310
@@ -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>,
}
@@ -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;
@@ -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
@@ -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 {
@@ -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,
}
}

@@ -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")]

0 comments on commit 68baabb

Please sign in to comment.
You can’t perform that action at this time.