diff options
author | Connor Brewster <connor.brewster@eagles.oc.edu> | 2018-05-11 11:01:51 -0600 |
---|---|---|
committer | Connor Brewster <connor.brewster@eagles.oc.edu> | 2018-05-18 14:53:04 -0600 |
commit | ee3c26c56c7e352571bc6cc8bb66ab20404bdafa (patch) | |
tree | 38a6b7bc28d950425d3468e05b8874ef9eeebe71 /components/script_traits/lib.rs | |
parent | a8bdd44ecea6dc6cd553f80e31d1705e3f34c559 (diff) | |
download | servo-ee3c26c56c7e352571bc6cc8bb66ab20404bdafa.tar.gz servo-ee3c26c56c7e352571bc6cc8bb66ab20404bdafa.zip |
Cleanup constellation debug messages
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r-- | components/script_traits/lib.rs | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index 5cbdd8456d7..9ecda6625d6 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -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 { |