Web Inspector: Simplify Legacy Tips support
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 06:57:32 +0000 (06:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Apr 2015 06:57:32 +0000 (06:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143551

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-08
Reviewed by Timothy Hatcher.

* UserInterface/Models/ConsoleMessage.js:
* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
(WebInspector.ConsoleMessageView.prototype._levelString):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._filterMessageElements):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/ConsoleMessage.js
Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js
Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
Source/WebInspectorUI/UserInterface/Views/LogContentView.js

index 24ebe639084dcca484693789fa8b870836e631b0..6476c3b25b32a5d0f0c8915291c1803f1c3df3cc 100644 (file)
@@ -1,3 +1,19 @@
+2015-04-08  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Simplify Legacy Tips support
+        https://bugs.webkit.org/show_bug.cgi?id=143551
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Models/ConsoleMessage.js:
+        * UserInterface/Protocol/ConsoleObserver.js:
+        (WebInspector.ConsoleObserver.prototype.messageAdded):
+        * UserInterface/Views/ConsoleMessageView.js:
+        (WebInspector.ConsoleMessageView):
+        (WebInspector.ConsoleMessageView.prototype._levelString):
+        * UserInterface/Views/LogContentView.js:
+        (WebInspector.LogContentView.prototype._filterMessageElements):
+
 2015-04-08  Joseph Pecoraro  <pecoraro@apple.com>
 
         Unreviewed Test Fix after r182579. Add missing include.
index aaaf14a6bea2a840f1dc5966607c03a410069754..db831fc070cf65f1dfcb1128277cd35d166c659b 100644 (file)
@@ -137,7 +137,6 @@ WebInspector.ConsoleMessage.MessageType = {
 };
 
 WebInspector.ConsoleMessage.MessageLevel = {
-    Tip: "tip", // COMPATIBILITY (iOS 6)
     Log: "log",
     Warning: "warning",
     Error: "error",
index b61f721f0d12cf49c59f43dc082fa7968e6a4aab..68d9e7b288096143eadabead146c6747e570c313 100644 (file)
@@ -29,7 +29,9 @@ WebInspector.ConsoleObserver = class ConsoleObserver
 
     messageAdded(message)
     {
-        // FIXME: We should convert "Tip" to "Log" here immediately.
+        // COMPATIBILITY (iOS 6): Treat Tips like Logs.
+        if (message.type === "tip")
+            message.type = "log";
 
         if (message.type === "assert" && !message.text)
             message.text = WebInspector.UIString("Assertion");
index 906a8039fc05617f0c007cb33a48f00bb765aa70..3652941aabbee4e782655442f442d192b4a8d062 100644 (file)
@@ -46,7 +46,6 @@ WebInspector.ConsoleMessageView = class ConsoleMessageView extends WebInspector.
         this._element.__messageView = this;
 
         switch (this._message.level) {
-        case WebInspector.ConsoleMessage.MessageLevel.Tip: // COMPATIBILITY (iOS 6).
         case WebInspector.ConsoleMessage.MessageLevel.Log:
             this._element.classList.add("console-log-level");
             this._element.setAttribute("data-labelprefix", WebInspector.UIString("Log: "));
@@ -647,8 +646,6 @@ WebInspector.ConsoleMessageView = class ConsoleMessageView extends WebInspector.
     _levelString()
     {
         switch (this._message.level) {
-        case WebInspector.ConsoleMessage.MessageLevel.Tip:
-            return "Tip";
         case WebInspector.ConsoleMessage.MessageLevel.Log:
             return "Log";
         case WebInspector.ConsoleMessage.MessageLevel.Warning:
index 9d65a06773eb6de08d5c76f6eda485fdc31a50dc..b8cbcfc189b87af937fcfe7a3830be06dbb5fdd2 100644 (file)
@@ -683,7 +683,6 @@ WebInspector.LogContentView.prototype = {
                 case WebInspector.ConsoleMessage.MessageLevel.Error:
                     visible = showsErrors;
                     break;
-                case WebInspector.ConsoleMessage.MessageLevel.Tip: // COMPATIBILITY (iOS 6): Treat Tips like Logs.
                 case WebInspector.ConsoleMessage.MessageLevel.Log:
                 case WebInspector.ConsoleMessage.MessageLevel.Debug:
                     visible = showsLogs;