Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage...
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 03:56:18 +0000 (03:56 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 03:56:18 +0000 (03:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142712

As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):

  - Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
  - Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
  - Rename ConsoleMessage.js file to LegacyConsoleMessage.js
  - Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
* UserInterface/Main.html:
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
* UserInterface/Views/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.prototype.toMessageElement):
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.render):
* UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
(WebInspector.LegacyConsoleMessage):
(WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessage.prototype.clone):
(WebInspector.LegacyConsoleMessage.create):
* UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
(WebInspector.LegacyConsoleMessageImpl):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
(WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.get message):
(WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessageImpl.prototype._format):
(WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
(WebInspector.LegacyConsoleMessageImpl.prototype.):
(WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
(WebInspector.LegacyConsoleMessageImpl.prototype.append):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
(WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessageImpl.prototype.toString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get text):
(WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
(WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype.clone):
(WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
(WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._filterMessages):
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

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

12 files changed:
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptLogViewController.js
Source/WebInspectorUI/UserInterface/Controllers/LogManager.js
Source/WebInspectorUI/UserInterface/Main.html
Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js
Source/WebInspectorUI/UserInterface/Views/ConsoleCommandResult.js
Source/WebInspectorUI/UserInterface/Views/ConsoleGroup.js
Source/WebInspectorUI/UserInterface/Views/LegacyConsoleMessage.js [moved from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js with 78% similarity]
Source/WebInspectorUI/UserInterface/Views/LegacyConsoleMessageImpl.js [moved from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js with 87% similarity]
Source/WebInspectorUI/UserInterface/Views/LogContentView.js
Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj
Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters

index e667c0e..adf2cb3 100644 (file)
@@ -1,3 +1,85 @@
+2015-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage and LegacyConsoleMessageImpl respectively
+        https://bugs.webkit.org/show_bug.cgi?id=142712
+
+        As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):
+
+          - Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
+          - Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
+          - Rename ConsoleMessage.js file to LegacyConsoleMessage.js
+          - Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Controllers/JavaScriptLogViewController.js:
+        (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
+        * UserInterface/Controllers/LogManager.js:
+        (WebInspector.LogManager.prototype.messageWasAdded):
+        * UserInterface/Main.html:
+        * UserInterface/Models/DefaultDashboard.js:
+        (WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
+        * UserInterface/Views/ConsoleCommandResult.js:
+        (WebInspector.ConsoleCommandResult):
+        (WebInspector.ConsoleCommandResult.prototype.toMessageElement):
+        * UserInterface/Views/ConsoleGroup.js:
+        (WebInspector.ConsoleGroup.prototype.render):
+        * UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
+        (WebInspector.LegacyConsoleMessage):
+        (WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
+        (WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
+        (WebInspector.LegacyConsoleMessage.prototype.clone):
+        (WebInspector.LegacyConsoleMessage.create):
+        * UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
+        (WebInspector.LegacyConsoleMessageImpl):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.get message):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._format):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.append):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
+        (WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.toString):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.get text):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.clone):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
+        (WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
+        * UserInterface/Views/LogContentView.js:
+        (WebInspector.LogContentView.prototype.didAppendConsoleMessage):
+        (WebInspector.LogContentView.prototype._messageAdded):
+        (WebInspector.LogContentView.prototype._filterMessages):
+        (WebInspector.LogContentView.prototype._reappendProvisionalMessages):
+        * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
+        * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
+
 2015-03-16  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r181517.
index b4d162c..5c2b107 100644 (file)
@@ -276,12 +276,12 @@ WebInspector.JavaScriptLogViewController.prototype = {
         if (!repeatCountWasInterrupted)
             this._previousMessage = msg;
 
-        if (msg.type === WebInspector.ConsoleMessage.MessageType.EndGroup) {
+        if (msg.type === WebInspector.LegacyConsoleMessage.MessageType.EndGroup) {
             var parentGroup = this._currentConsoleGroup.parentGroup;
             if (parentGroup)
                 this._currentConsoleGroup = parentGroup;
         } else {
-            if (msg.type === WebInspector.ConsoleMessage.MessageType.StartGroup || msg.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed) {
+            if (msg.type === WebInspector.LegacyConsoleMessage.MessageType.StartGroup || msg.type === WebInspector.LegacyConsoleMessage.MessageType.StartGroupCollapsed) {
                 var group = new WebInspector.ConsoleGroup(this._currentConsoleGroup);
                 var groupElement = group.render(msg);
                 this._currentConsoleGroup.append(groupElement);
@@ -290,7 +290,7 @@ WebInspector.JavaScriptLogViewController.prototype = {
                 this._currentConsoleGroup.addMessage(msg);
         }
 
-        if (msg.type === WebInspector.ConsoleMessage.MessageType.Result || wasScrolledToBottom)
+        if (msg.type === WebInspector.LegacyConsoleMessage.MessageType.Result || wasScrolledToBottom)
             this.scrollToBottom();
 
         if (this.delegate && typeof this.delegate.didAppendConsoleMessage === "function")
index a09d30f..d8f8dbd 100644 (file)
@@ -48,7 +48,7 @@ WebInspector.LogManager.prototype = {
         // Called from WebInspector.ConsoleObserver.
 
         // FIXME: Pass a request. We need a way to get it from the request ID.
-        var consoleMessage = WebInspector.ConsoleMessage.create(source, level, text, type, url, line, column, repeatCount, parameters, stackTrace, null);
+        var consoleMessage = WebInspector.LegacyConsoleMessage.create(source, level, text, type, url, line, column, repeatCount, parameters, stackTrace, null);
 
         this.dispatchEventToListeners(WebInspector.LogManager.Event.MessageAdded, {message: consoleMessage});
 
index 373b6fc..002e589 100644 (file)
     <script src="Models/TypeSet.js"></script>
     <script src="Models/UnitBezier.js"></script>
 
-    <script src="Views/ConsoleMessage.js"></script>
+    <script src="Views/LegacyConsoleMessage.js"></script>
     <script src="Views/ContentView.js"></script>
     <script src="Views/DataGrid.js"></script>
     <script src="Views/DetailsSectionRow.js"></script>
     <script src="Views/TreeOutline.js"></script>
 
     <script src="Views/ButtonNavigationItem.js"></script>
-    <script src="Views/ConsoleMessageImpl.js"></script>
+    <script src="Views/LegacyConsoleMessageImpl.js"></script>
     <script src="Views/DOMTreeContentView.js"></script>
     <script src="Views/DetailsSidebarPanel.js"></script>
     <script src="Views/GeneralTreeElement.js"></script>
index 027130f..f104dca 100644 (file)
@@ -249,13 +249,13 @@ WebInspector.DefaultDashboard.prototype = {
     _incrementConsoleMessageType: function(type, increment)
     {
         switch (type) {
-        case WebInspector.ConsoleMessage.MessageLevel.Log:
+        case WebInspector.LegacyConsoleMessage.MessageLevel.Log:
             this.logs += increment;
             break;
-        case WebInspector.ConsoleMessage.MessageLevel.Warning:
+        case WebInspector.LegacyConsoleMessage.MessageLevel.Warning:
             this.issues += increment;
             break;
-        case WebInspector.ConsoleMessage.MessageLevel.Error:
+        case WebInspector.LegacyConsoleMessage.MessageLevel.Error:
             this.errors += increment;
             break;
         }
index 82b0898..e7c0f59 100644 (file)
 
 WebInspector.ConsoleCommandResult = function(result, wasThrown, originatingCommand, savedResultIndex)
 {
-    var level = (wasThrown ? WebInspector.ConsoleMessage.MessageLevel.Error : WebInspector.ConsoleMessage.MessageLevel.Log);
+    var level = (wasThrown ? WebInspector.LegacyConsoleMessage.MessageLevel.Error : WebInspector.LegacyConsoleMessage.MessageLevel.Log);
     this.originatingCommand = originatingCommand;
     this.savedResultIndex = savedResultIndex;
 
     if (this.savedResultIndex && this.savedResultIndex > WebInspector.ConsoleCommandResult.maximumSavedResultIndex)
         WebInspector.ConsoleCommandResult.maximumSavedResultIndex = this.savedResultIndex;
 
-    WebInspector.ConsoleMessageImpl.call(this, WebInspector.ConsoleMessage.MessageSource.JS, level, "", null, WebInspector.ConsoleMessage.MessageType.Result, undefined, undefined, undefined, undefined, [result]);
+    WebInspector.LegacyConsoleMessageImpl.call(this, WebInspector.LegacyConsoleMessage.MessageSource.JS, level, "", null, WebInspector.LegacyConsoleMessage.MessageType.Result, undefined, undefined, undefined, undefined, [result]);
 };
 
 WebInspector.ConsoleCommandResult.maximumSavedResultIndex = 0;
@@ -55,7 +55,7 @@ WebInspector.ConsoleCommandResult.prototype = {
 
     toMessageElement: function()
     {
-        var element = WebInspector.ConsoleMessageImpl.prototype.toMessageElement.call(this);
+        var element = WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement.call(this);
         element.classList.add("console-user-command-result");
         if (!element.getAttribute("data-labelprefix"))
             element.setAttribute("data-labelprefix", WebInspector.UIString("Output: "));
@@ -68,4 +68,4 @@ WebInspector.ConsoleCommandResult.prototype = {
     }
 };
 
-WebInspector.ConsoleCommandResult.prototype.__proto__ = WebInspector.ConsoleMessageImpl.prototype;
+WebInspector.ConsoleCommandResult.prototype.__proto__ = WebInspector.LegacyConsoleMessageImpl.prototype;
index 79eb54e..0d52578 100644 (file)
@@ -50,7 +50,7 @@ WebInspector.ConsoleGroup.prototype = {
         titleElement.classList.add(WebInspector.LogContentView.ItemWrapperStyleClassName);
         titleElement.addEventListener("click", this._titleClicked.bind(this));
         titleElement.addEventListener("mousedown", this._titleMouseDown.bind(this));
-        if (groupElement && message.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed)
+        if (groupElement && message.type === WebInspector.LegacyConsoleMessage.MessageType.StartGroupCollapsed)
             groupElement.classList.add("collapsed");
 
         groupElement.appendChild(titleElement);
@@ -28,7 +28,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-WebInspector.ConsoleMessage = function(source, level, url, line, column, repeatCount)
+WebInspector.LegacyConsoleMessage = function(source, level, url, line, column, repeatCount)
 {
     this.source = source;
     this.level = level;
@@ -42,10 +42,10 @@ WebInspector.ConsoleMessage = function(source, level, url, line, column, repeatC
     this.totalRepeatCount = repeatCount;
 };
 
-WebInspector.ConsoleMessage.prototype = {
+WebInspector.LegacyConsoleMessage.prototype = {
     isErrorOrWarning: function()
     {
-        return (this.level === WebInspector.ConsoleMessage.MessageLevel.Warning || this.level === WebInspector.ConsoleMessage.MessageLevel.Error);
+        return (this.level === WebInspector.LegacyConsoleMessage.MessageLevel.Warning || this.level === WebInspector.LegacyConsoleMessage.MessageLevel.Error);
     },
 
     updateRepeatCount: function()
@@ -59,13 +59,13 @@ WebInspector.ConsoleMessage.prototype = {
     }
 };
 
-WebInspector.ConsoleMessage.create = function(source, level, message, type, url, line, column, repeatCount, parameters, stackTrace, request)
+WebInspector.LegacyConsoleMessage.create = function(source, level, message, type, url, line, column, repeatCount, parameters, stackTrace, request)
 {
-    return new WebInspector.ConsoleMessageImpl(source, level, message, null, type, url, line, column, repeatCount, parameters, stackTrace, request);
+    return new WebInspector.LegacyConsoleMessageImpl(source, level, message, null, type, url, line, column, repeatCount, parameters, stackTrace, request);
 };
 
 // FIXME: Switch to ConsoleAgent.ConsoleMessageSource.
-WebInspector.ConsoleMessage.MessageSource = {
+WebInspector.LegacyConsoleMessage.MessageSource = {
     HTML: "html",
     XML: "xml",
     JS: "javascript",
@@ -75,7 +75,7 @@ WebInspector.ConsoleMessage.MessageSource = {
 };
 
 // FIXME: Switch to ConsoleAgent.ConsoleMessageType.
-WebInspector.ConsoleMessage.MessageType = {
+WebInspector.LegacyConsoleMessage.MessageType = {
     Log: "log",
     Dir: "dir",
     DirXML: "dirxml",
@@ -89,7 +89,7 @@ WebInspector.ConsoleMessage.MessageType = {
 };
 
 // FIXME: Switch to ConsoleAgent.ConsoleMessageLevel.
-WebInspector.ConsoleMessage.MessageLevel = {
+WebInspector.LegacyConsoleMessage.MessageLevel = {
     Tip: "tip",
     Log: "log",
     Warning: "warning",
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-WebInspector.ConsoleMessageImpl = function(source, level, message, linkifier, type, url, line, column, repeatCount, parameters, stackTrace, request)
+WebInspector.LegacyConsoleMessageImpl = function(source, level, message, linkifier, type, url, line, column, repeatCount, parameters, stackTrace, request)
 {
-    WebInspector.ConsoleMessage.call(this, source, level, url, line, column, repeatCount);
+    WebInspector.LegacyConsoleMessage.call(this, source, level, url, line, column, repeatCount);
 
     this._linkifier = linkifier;
-    this.type = type || WebInspector.ConsoleMessage.MessageType.Log;
+    this.type = type || WebInspector.LegacyConsoleMessage.MessageType.Log;
     this._messageText = message;
     this._parameters = parameters;
     this._stackTrace = stackTrace;
@@ -52,7 +52,7 @@ WebInspector.ConsoleMessageImpl = function(source, level, message, linkifier, ty
     };
 };
 
-WebInspector.ConsoleMessageImpl.prototype = {
+WebInspector.LegacyConsoleMessageImpl.prototype = {
 
     enforcesClipboardPrefixString: true,
 
@@ -62,18 +62,18 @@ WebInspector.ConsoleMessageImpl.prototype = {
         this._formattedMessage.className = "console-message-text";
 
         var messageText;
-        if (this.source === WebInspector.ConsoleMessage.MessageSource.ConsoleAPI) {
+        if (this.source === WebInspector.LegacyConsoleMessage.MessageSource.ConsoleAPI) {
             switch (this.type) {
-                case WebInspector.ConsoleMessage.MessageType.Trace:
+                case WebInspector.LegacyConsoleMessage.MessageType.Trace:
                     messageText = document.createTextNode("console.trace()");
                     break;
-                case WebInspector.ConsoleMessage.MessageType.Assert:
+                case WebInspector.LegacyConsoleMessage.MessageType.Assert:
                     var args = [WebInspector.UIString("Assertion failed:")];
                     if (this._parameters)
                         args = args.concat(this._parameters);
                     messageText = this._format(args);
                     break;
-                case WebInspector.ConsoleMessage.MessageType.Dir:
+                case WebInspector.LegacyConsoleMessage.MessageType.Dir:
                     var obj = this._parameters ? this._parameters[0] : undefined;
                     var args = ["%O", obj];
                     messageText = this._format(args);
@@ -82,7 +82,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
                     var args = this._parameters || [this._messageText];
                     messageText = this._format(args);
             }
-        } else if (this.source === WebInspector.ConsoleMessage.MessageSource.Network) {
+        } else if (this.source === WebInspector.LegacyConsoleMessage.MessageSource.Network) {
             if (this._request) {
                 this._stackTrace = this._request.stackTrace;
                 if (this._request.initiator && this._request.initiator.url) {
@@ -90,7 +90,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
                     this.line = this._request.initiator.lineNumber;
                 }
                 messageText = document.createElement("span");
-                if (this.level === WebInspector.ConsoleMessage.MessageLevel.Error) {
+                if (this.level === WebInspector.LegacyConsoleMessage.MessageLevel.Error) {
                     messageText.appendChild(document.createTextNode(this._request.requestMethod + " "));
                     messageText.appendChild(WebInspector.linkifyRequestAsNode(this._request));
                     if (this._request.failed)
@@ -113,7 +113,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
             messageText = this._format(args);
         }
 
-        if (this.source !== WebInspector.ConsoleMessage.MessageSource.Network || this._request) {
+        if (this.source !== WebInspector.LegacyConsoleMessage.MessageSource.Network || this._request) {
             var firstNonNativeCallFrame = this._firstNonNativeCallFrame();
             if (firstNonNativeCallFrame) {
                 var urlElement = this._linkifyCallFrame(firstNonNativeCallFrame);
@@ -145,7 +145,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
             var root = new TreeElement(content, null, true);
             content.treeElementForTest = root;
             treeOutline.appendChild(root);
-            if (this.type === WebInspector.ConsoleMessage.MessageType.Trace)
+            if (this.type === WebInspector.LegacyConsoleMessage.MessageType.Trace)
                 root.expand();
 
             this._populateStackTraceTreeElement(root);
@@ -158,7 +158,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
 
     _shouldDumpStackTrace: function()
     {
-        return !!this._stackTrace && this._stackTrace.length && (this.source === WebInspector.ConsoleMessage.MessageSource.Network || this.level === WebInspector.ConsoleMessage.MessageLevel.Error || this.type === WebInspector.ConsoleMessage.MessageType.Trace);
+        return !!this._stackTrace && this._stackTrace.length && (this.source === WebInspector.LegacyConsoleMessage.MessageSource.Network || this.level === WebInspector.LegacyConsoleMessage.MessageLevel.Error || this.type === WebInspector.LegacyConsoleMessage.MessageType.Trace);
     },
 
     _shouldHideURL: function(url)
@@ -211,7 +211,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
 
     isErrorOrWarning: function()
     {
-        return (this.level === WebInspector.ConsoleMessage.MessageLevel.Warning || this.level === WebInspector.ConsoleMessage.MessageLevel.Error);
+        return (this.level === WebInspector.LegacyConsoleMessage.MessageLevel.Warning || this.level === WebInspector.LegacyConsoleMessage.MessageLevel.Error);
     },
 
     _format: function(parameters)
@@ -235,7 +235,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
         }
 
         // There can be string log and string eval result. We distinguish between them based on message type.
-        var shouldFormatMessage = WebInspector.RemoteObject.type(parameters[0]) === "string" && this.type !== WebInspector.ConsoleMessage.MessageType.Result;
+        var shouldFormatMessage = WebInspector.RemoteObject.type(parameters[0]) === "string" && this.type !== WebInspector.LegacyConsoleMessage.MessageType.Result;
 
         if (shouldFormatMessage) {
             // Multiple parameters with the first being a format string. Save unused substitutions.
@@ -245,7 +245,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
                 formattedResult.appendChild(document.createTextNode(" "));
         }
 
-        if (this.type === WebInspector.ConsoleMessage.MessageType.Table) {
+        if (this.type === WebInspector.LegacyConsoleMessage.MessageType.Table) {
             formattedResult.appendChild(this._formatParameterAsTable(parameters));
             return formattedResult;
         }
@@ -561,29 +561,29 @@ WebInspector.ConsoleMessageImpl.prototype = {
         this._element = element;
 
         switch (this.level) {
-            case WebInspector.ConsoleMessage.MessageLevel.Tip:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Tip:
                 element.classList.add("console-tip-level");
                 element.setAttribute("data-labelprefix", WebInspector.UIString("Tip: "));
                 break;
-            case WebInspector.ConsoleMessage.MessageLevel.Log:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Log:
                 element.classList.add("console-log-level");
                 element.setAttribute("data-labelprefix", WebInspector.UIString("Log: "));
                 break;
-            case WebInspector.ConsoleMessage.MessageLevel.Debug:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Debug:
                 element.classList.add("console-debug-level");
                 element.setAttribute("data-labelprefix", WebInspector.UIString("Debug: "));
                 break;
-            case WebInspector.ConsoleMessage.MessageLevel.Warning:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Warning:
                 element.classList.add("console-warning-level");
                 element.setAttribute("data-labelprefix", WebInspector.UIString("Warning: "));
                 break;
-            case WebInspector.ConsoleMessage.MessageLevel.Error:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Error:
                 element.classList.add("console-error-level");
                 element.setAttribute("data-labelprefix", WebInspector.UIString("Error: "));
                 break;
         }
 
-        if (this.type === WebInspector.ConsoleMessage.MessageType.StartGroup || this.type === WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed)
+        if (this.type === WebInspector.LegacyConsoleMessage.MessageType.StartGroup || this.type === WebInspector.LegacyConsoleMessage.MessageType.StartGroupCollapsed)
             element.classList.add("console-group-title");
 
         element.appendChild(this.formattedMessage);
@@ -640,51 +640,51 @@ WebInspector.ConsoleMessageImpl.prototype = {
     {
         var sourceString;
         switch (this.source) {
-            case WebInspector.ConsoleMessage.MessageSource.HTML:
+            case WebInspector.LegacyConsoleMessage.MessageSource.HTML:
                 sourceString = "HTML";
                 break;
-            case WebInspector.ConsoleMessage.MessageSource.XML:
+            case WebInspector.LegacyConsoleMessage.MessageSource.XML:
                 sourceString = "XML";
                 break;
-            case WebInspector.ConsoleMessage.MessageSource.JS:
+            case WebInspector.LegacyConsoleMessage.MessageSource.JS:
                 sourceString = "JS";
                 break;
-            case WebInspector.ConsoleMessage.MessageSource.Network:
+            case WebInspector.LegacyConsoleMessage.MessageSource.Network:
                 sourceString = "Network";
                 break;
-            case WebInspector.ConsoleMessage.MessageSource.ConsoleAPI:
+            case WebInspector.LegacyConsoleMessage.MessageSource.ConsoleAPI:
                 sourceString = "ConsoleAPI";
                 break;
-            case WebInspector.ConsoleMessage.MessageSource.Other:
+            case WebInspector.LegacyConsoleMessage.MessageSource.Other:
                 sourceString = "Other";
                 break;
         }
 
         var typeString;
         switch (this.type) {
-            case WebInspector.ConsoleMessage.MessageType.Log:
+            case WebInspector.LegacyConsoleMessage.MessageType.Log:
                 typeString = "Log";
                 break;
-            case WebInspector.ConsoleMessage.MessageType.Dir:
+            case WebInspector.LegacyConsoleMessage.MessageType.Dir:
                 typeString = "Dir";
                 break;
-            case WebInspector.ConsoleMessage.MessageType.DirXML:
+            case WebInspector.LegacyConsoleMessage.MessageType.DirXML:
                 typeString = "Dir XML";
                 break;
-            case WebInspector.ConsoleMessage.MessageType.Trace:
+            case WebInspector.LegacyConsoleMessage.MessageType.Trace:
                 typeString = "Trace";
                 break;
-            case WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed:
-            case WebInspector.ConsoleMessage.MessageType.StartGroup:
+            case WebInspector.LegacyConsoleMessage.MessageType.StartGroupCollapsed:
+            case WebInspector.LegacyConsoleMessage.MessageType.StartGroup:
                 typeString = "Start Group";
                 break;
-            case WebInspector.ConsoleMessage.MessageType.EndGroup:
+            case WebInspector.LegacyConsoleMessage.MessageType.EndGroup:
                 typeString = "End Group";
                 break;
-            case WebInspector.ConsoleMessage.MessageType.Assert:
+            case WebInspector.LegacyConsoleMessage.MessageType.Assert:
                 typeString = "Assert";
                 break;
-            case WebInspector.ConsoleMessage.MessageType.Result:
+            case WebInspector.LegacyConsoleMessage.MessageType.Result:
                 typeString = "Result";
                 break;
         }
@@ -732,21 +732,21 @@ WebInspector.ConsoleMessageImpl.prototype = {
 
     clone: function()
     {
-        return WebInspector.ConsoleMessage.create(this.source, this.level, this._messageText, this.type, this.url, this.line, this.column, this.repeatCount, this._parameters, this._stackTrace, this._request);
+        return WebInspector.LegacyConsoleMessage.create(this.source, this.level, this._messageText, this.type, this.url, this.line, this.column, this.repeatCount, this._parameters, this._stackTrace, this._request);
     },
 
     get levelString()
     {
         switch (this.level) {
-            case WebInspector.ConsoleMessage.MessageLevel.Tip:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Tip:
                 return "Tip";
-            case WebInspector.ConsoleMessage.MessageLevel.Log:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Log:
                 return "Log";
-            case WebInspector.ConsoleMessage.MessageLevel.Warning:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Warning:
                 return "Warning";
-            case WebInspector.ConsoleMessage.MessageLevel.Debug:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Debug:
                 return "Debug";
-            case WebInspector.ConsoleMessage.MessageLevel.Error:
+            case WebInspector.LegacyConsoleMessage.MessageLevel.Error:
                 return "Error";
         }
     },
@@ -764,7 +764,7 @@ WebInspector.ConsoleMessageImpl.prototype = {
         if (this._formattedMessage && !isTrace)
             clipboardString = this._formattedMessage.querySelector("span").innerText;
         else
-            clipboardString = this.type === WebInspector.ConsoleMessage.MessageType.Trace ? "console.trace()" : this._message || this._messageText;
+            clipboardString = this.type === WebInspector.LegacyConsoleMessage.MessageType.Trace ? "console.trace()" : this._message || this._messageText;
 
         if (!isPrefixOptional || this.enforcesClipboardPrefixString)
             clipboardString = this.clipboardPrefixString + clipboardString;
@@ -798,4 +798,4 @@ WebInspector.ConsoleMessageImpl.prototype = {
     }
 };
 
-WebInspector.ConsoleMessageImpl.prototype.__proto__ = WebInspector.ConsoleMessage.prototype;
+WebInspector.LegacyConsoleMessageImpl.prototype.__proto__ = WebInspector.LegacyConsoleMessage.prototype;
index ec4f770..8ae7a1d 100644 (file)
@@ -176,7 +176,7 @@ WebInspector.LogContentView.prototype = {
         WebInspector.quickConsole.updateLayout();
 
         // Nest the message.
-        if (message.type !== WebInspector.ConsoleMessage.MessageType.EndGroup) {
+        if (message.type !== WebInspector.LegacyConsoleMessage.MessageType.EndGroup) {
             var x = 16 * this._nestingLevel;
             var messageElement = message.toMessageElement();
             messageElement.style.left = x + "px";
@@ -185,11 +185,11 @@ WebInspector.LogContentView.prototype = {
 
         // Update the nesting level.
         switch (message.type) {
-        case WebInspector.ConsoleMessage.MessageType.StartGroup:
-        case WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed:
+        case WebInspector.LegacyConsoleMessage.MessageType.StartGroup:
+        case WebInspector.LegacyConsoleMessage.MessageType.StartGroupCollapsed:
             ++this._nestingLevel;
             break;
-        case WebInspector.ConsoleMessage.MessageType.EndGroup:
+        case WebInspector.LegacyConsoleMessage.MessageType.EndGroup:
             --this._nestingLevel;
             break;
         }
@@ -202,7 +202,7 @@ WebInspector.LogContentView.prototype = {
 
         // We only auto show the console if the message is a result.
         // This is when the user evaluated something directly in the prompt.
-        if (message.type !== WebInspector.ConsoleMessage.MessageType.Result)
+        if (message.type !== WebInspector.LegacyConsoleMessage.MessageType.Result)
             return;
 
         if (!WebInspector.isShowingConsoleView())
@@ -330,7 +330,7 @@ WebInspector.LogContentView.prototype = {
             this._provisionalMessages.push(event.data.message);
 
         var message = this._logViewController.appendConsoleMessage(event.data.message);
-        if (message.type !== WebInspector.ConsoleMessage.MessageType.EndGroup)
+        if (message.type !== WebInspector.LegacyConsoleMessage.MessageType.EndGroup)
             this._filterMessages([message.toMessageElement()]);
     },
 
@@ -677,14 +677,14 @@ WebInspector.LogContentView.prototype = {
             var visible = showsAll || message.command instanceof WebInspector.ConsoleCommand || message.message instanceof WebInspector.ConsoleCommandResult;
             if (!visible) {
                 switch(message.message.level) {
-                    case WebInspector.ConsoleMessage.MessageLevel.Warning:
+                    case WebInspector.LegacyConsoleMessage.MessageLevel.Warning:
                         visible = showsWarnings;
                         break;
-                    case WebInspector.ConsoleMessage.MessageLevel.Error:
+                    case WebInspector.LegacyConsoleMessage.MessageLevel.Error:
                         visible = showsErrors;
                         break;
-                    case WebInspector.ConsoleMessage.MessageLevel.Log:
-                    case WebInspector.ConsoleMessage.MessageLevel.Debug:
+                    case WebInspector.LegacyConsoleMessage.MessageLevel.Log:
+                    case WebInspector.LegacyConsoleMessage.MessageLevel.Debug:
                         visible = showsLogs;
                         break;
                 }
@@ -996,7 +996,7 @@ WebInspector.LogContentView.prototype = {
 
         for (var provisionalMessage of this._provisionalMessages) {
             var message = this._logViewController.appendConsoleMessage(provisionalMessage);
-            if (message.type !== WebInspector.ConsoleMessage.MessageType.EndGroup)
+            if (message.type !== WebInspector.LegacyConsoleMessage.MessageType.EndGroup)
                 this._filterMessages([message.toMessageElement()]);
         }
 
index 45d24d9..0478cf4 100644 (file)
     <None Include="..\UserInterface\ConsoleCommand.js" />
     <None Include="..\UserInterface\ConsoleCommandResult.js" />
     <None Include="..\UserInterface\ConsoleGroup.js" />
-    <None Include="..\UserInterface\ConsoleMessage.js" />
-    <None Include="..\UserInterface\ConsoleMessageImpl.js" />
+    <None Include="..\UserInterface\LegacyConsoleMessage.js" />
+    <None Include="..\UserInterface\LegacyConsoleMessageImpl.js" />
     <None Include="..\UserInterface\ConsoleObserver.js" />
     <None Include="..\UserInterface\ConsolePrompt.css" />
     <None Include="..\UserInterface\ConsolePrompt.js" />
index 8c0d791..dda762e 100644 (file)
     <None Include="..\UserInterface\ConsoleGroup.js">
       <Filter>UserInterface</Filter>
     </None>
-    <None Include="..\UserInterface\ConsoleMessage.js">
+    <None Include="..\UserInterface\LegacyConsoleMessage.js">
       <Filter>UserInterface</Filter>
     </None>
-    <None Include="..\UserInterface\ConsoleMessageImpl.js">
+    <None Include="..\UserInterface\LegacyConsoleMessageImpl.js">
       <Filter>UserInterface</Filter>
     </None>
     <None Include="..\UserInterface\ConsoleObserver.js">