Cleanup constellation debug messages

This commit is contained in:
Connor Brewster 2018-05-11 11:01:51 -06:00
parent a8bdd44ece
commit ee3c26c56c
3 changed files with 104 additions and 55 deletions

View file

@ -364,7 +364,7 @@ impl fmt::Debug for ConstellationControlMsg {
WebVREvents(..) => "WebVREvents",
PaintMetric(..) => "PaintMetric",
};
write!(formatter, "ConstellationMsg::{}", variant)
write!(formatter, "ConstellationControlMsg::{}", variant)
}
}
@ -710,6 +710,34 @@ pub enum ConstellationMsg {
SetCursor(CursorKind),
}
impl fmt::Debug for ConstellationMsg {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
use self::ConstellationMsg::*;
let variant = match *self {
Exit => "Exit",
GetBrowsingContext(..) => "GetBrowsingContext",
GetPipeline(..) => "GetPipeline",
GetFocusTopLevelBrowsingContext(..) => "GetFocusTopLevelBrowsingContext",
IsReadyToSaveImage(..) => "IsReadyToSaveImage",
KeyEvent(..) => "KeyEvent",
LoadUrl(..) => "LoadUrl",
TraverseHistory(..) => "TraverseHistory",
WindowSize(..) => "WindowSize",
TickAnimation(..) => "TickAnimation",
WebDriverCommand(..) => "WebDriverCommand",
Reload(..) => "Reload",
LogEntry(..) => "LogEntry",
WebVREvents(..) => "WebVREvents",
NewBrowser(..) => "NewBrowser",
CloseBrowser(..) => "CloseBrowser",
SelectBrowser(..) => "SelectBrowser",
ForwardEvent(..) => "ForwardEvent",
SetCursor(..) => "SetCursor",
};
write!(formatter, "ConstellationMsg::{}", variant)
}
}
/// Resources required by workerglobalscopes
#[derive(Clone, Deserialize, Serialize)]
pub struct WorkerGlobalScopeInit {