improve spec compliance of window.close

This commit is contained in:
Gregory Terzian 2018-05-26 23:41:34 +08:00
parent f63284efc0
commit 2753e5efab
12 changed files with 123 additions and 39 deletions

View file

@ -149,6 +149,8 @@ pub enum ScriptMsg {
LogEntry(Option<String>, LogEntry),
/// Discard the document.
DiscardDocument,
/// Discard the browsing context.
DiscardTopLevelBrowsingContext,
/// Notifies the constellation that this pipeline has exited.
PipelineExited,
/// Send messages from postMessage calls from serviceworker
@ -162,8 +164,6 @@ pub enum ScriptMsg {
GetScreenSize(IpcSender<(DeviceUintSize)>),
/// Get the available screen size (pixel)
GetScreenAvailSize(IpcSender<(DeviceUintSize)>),
/// Requests that the compositor shut down.
Exit,
}
impl fmt::Debug for ScriptMsg {
@ -200,13 +200,13 @@ impl fmt::Debug for ScriptMsg {
TouchEventProcessed(..) => "TouchEventProcessed",
LogEntry(..) => "LogEntry",
DiscardDocument => "DiscardDocument",
DiscardTopLevelBrowsingContext => "DiscardTopLevelBrowsingContext",
PipelineExited => "PipelineExited",
ForwardDOMMessage(..) => "ForwardDOMMessage",
RegisterServiceWorker(..) => "RegisterServiceWorker",
GetClientWindow(..) => "GetClientWindow",
GetScreenSize(..) => "GetScreenSize",
GetScreenAvailSize(..) => "GetScreenAvailSize",
Exit => "Exit",
};
write!(formatter, "ScriptMsg::{}", variant)
}