mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Cleanup constellation debug messages
This commit is contained in:
parent
a8bdd44ece
commit
ee3c26c56c
3 changed files with 104 additions and 55 deletions
|
@ -22,6 +22,7 @@ use net_traits::request::RequestInit;
|
|||
use net_traits::storage_thread::StorageType;
|
||||
use servo_url::ImmutableOrigin;
|
||||
use servo_url::ServoUrl;
|
||||
use std::fmt;
|
||||
use style_traits::CSSPixel;
|
||||
use style_traits::cursor::CursorKind;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
|
@ -43,6 +44,20 @@ pub enum LayoutMsg {
|
|||
ViewportConstrained(PipelineId, ViewportConstraints),
|
||||
}
|
||||
|
||||
impl fmt::Debug for LayoutMsg {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
use self::LayoutMsg::*;
|
||||
let variant = match *self {
|
||||
ChangeRunningAnimationsState(..) => "ChangeRunningAnimationsState",
|
||||
IFrameSizes(..) => "IFrameSizes",
|
||||
PendingPaintMetric(..) => "PendingPaintMetric",
|
||||
SetCursor(..) => "SetCursor",
|
||||
ViewportConstrained(..) => "ViewportConstrained",
|
||||
};
|
||||
write!(formatter, "LayoutMsg::{}", variant)
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether a DOM event was prevented by web content
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum EventResult {
|
||||
|
@ -172,6 +187,62 @@ pub enum ScriptMsg {
|
|||
Exit,
|
||||
}
|
||||
|
||||
impl fmt::Debug for ScriptMsg {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
use self::ScriptMsg::*;
|
||||
let variant = match *self {
|
||||
InitiateNavigateRequest(..) => "InitiateNavigateRequest",
|
||||
BroadcastStorageEvent(..) => "BroadcastStorageEvent",
|
||||
ChangeRunningAnimationsState(..) => "ChangeRunningAnimationsState",
|
||||
CreateCanvasPaintThread(..) => "CreateCanvasPaintThread",
|
||||
Focus => "Focus",
|
||||
GetClipboardContents(..) => "GetClipboardContents",
|
||||
GetBrowsingContextId(..) => "GetBrowsingContextId",
|
||||
GetParentInfo(..) => "GetParentInfo",
|
||||
GetChildBrowsingContextId(..) => "GetChildBrowsingContextId",
|
||||
HeadParsed => "HeadParsed",
|
||||
LoadComplete => "LoadComplete",
|
||||
LoadUrl(..) => "LoadUrl",
|
||||
AbortLoadUrl => "AbortLoadUrl",
|
||||
PostMessage(..) => "PostMessage",
|
||||
TraverseHistory(..) => "TraverseHistory",
|
||||
PushHistoryState(..) => "PushHistoryState",
|
||||
ReplaceHistoryState(..) => "ReplaceHistoryState",
|
||||
JointSessionHistoryLength(..) => "JointSessionHistoryLength",
|
||||
NewFavicon(..) => "NewFavicon",
|
||||
NodeStatus(..) => "NodeStatus",
|
||||
RemoveIFrame(..) => "RemoveIFrame",
|
||||
SetVisible(..) => "SetVisible",
|
||||
VisibilityChangeComplete(..) => "VisibilityChangeComplete",
|
||||
ScriptLoadedURLInIFrame(..) => "ScriptLoadedURLInIFrame",
|
||||
ScriptNewIFrame(..) => "ScriptNewIFrame",
|
||||
SetClipboardContents(..) => "SetClipboardContents",
|
||||
ActivateDocument => "ActivateDocument",
|
||||
SetDocumentState(..) => "SetDocumentState",
|
||||
SetFinalUrl(..) => "SetFinalUrl",
|
||||
Alert(..) => "Alert",
|
||||
SetTitle(..) => "SetTitle",
|
||||
SendKeyEvent(..) => "SendKeyEvent",
|
||||
MoveTo(..) => "MoveTo",
|
||||
ResizeTo(..) => "ResizeTo",
|
||||
TouchEventProcessed(..) => "TouchEventProcessed",
|
||||
LogEntry(..) => "LogEntry",
|
||||
DiscardDocument => "DiscardDocument",
|
||||
PipelineExited => "PipelineExited",
|
||||
ForwardDOMMessage(..) => "ForwardDOMMessage",
|
||||
RegisterServiceWorker(..) => "RegisterServiceWorker",
|
||||
SetFullscreenState(..) => "SetFullscreenState",
|
||||
GetClientWindow(..) => "GetClientWindow",
|
||||
GetScreenSize(..) => "GetScreenSize",
|
||||
GetScreenAvailSize(..) => "GetScreenAvailSize",
|
||||
ShowIME(..) => "ShowIME",
|
||||
HideIME => "HideIME",
|
||||
Exit => "Exit",
|
||||
};
|
||||
write!(formatter, "ScriptMsg::{}", variant)
|
||||
}
|
||||
}
|
||||
|
||||
/// Entities required to spawn service workers
|
||||
#[derive(Clone, Deserialize, Serialize)]
|
||||
pub struct ScopeThings {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue