Format code and fix rebase errors

This commit is contained in:
Fernando Jiménez Moreno 2019-11-06 18:37:04 +01:00
parent 85ec66b43e
commit 68baabba63
6 changed files with 9 additions and 7 deletions

View file

@ -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};

View file

@ -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;

View file

@ -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

View file

@ -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 {

View file

@ -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,
}
}

View file

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