| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 * @param {!Components.Linkifier} linkifier | 37 * @param {!Components.Linkifier} linkifier |
| 38 * @param {number} nestingLevel | 38 * @param {number} nestingLevel |
| 39 */ | 39 */ |
| 40 constructor(consoleMessage, linkifier, nestingLevel) { | 40 constructor(consoleMessage, linkifier, nestingLevel) { |
| 41 this._message = consoleMessage; | 41 this._message = consoleMessage; |
| 42 this._linkifier = linkifier; | 42 this._linkifier = linkifier; |
| 43 this._repeatCount = 1; | 43 this._repeatCount = 1; |
| 44 this._closeGroupDecorationCount = 0; | 44 this._closeGroupDecorationCount = 0; |
| 45 this._nestingLevel = nestingLevel; | 45 this._nestingLevel = nestingLevel; |
| 46 | 46 |
| 47 /** @type {?UI.DataGrid} */ | 47 /** @type {?DataGrid.DataGrid} */ |
| 48 this._dataGrid = null; | 48 this._dataGrid = null; |
| 49 this._previewFormatter = new Components.RemoteObjectPreviewFormatter(); | 49 this._previewFormatter = new Components.RemoteObjectPreviewFormatter(); |
| 50 this._searchRegex = null; | 50 this._searchRegex = null; |
| 51 /** @type {?UI.Icon} */ | 51 /** @type {?UI.Icon} */ |
| 52 this._messageLevelIcon = null; | 52 this._messageLevelIcon = null; |
| 53 } | 53 } |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * @return {?SDK.Target} | 56 * @return {?SDK.Target} |
| 57 */ | 57 */ |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 for (var i = 0; i < rows.length; ++i) { | 167 for (var i = 0; i < rows.length; ++i) { |
| 168 var rowName = rows[i][0]; | 168 var rowName = rows[i][0]; |
| 169 var rowValue = rows[i][1]; | 169 var rowValue = rows[i][1]; |
| 170 flatValues.push(rowName); | 170 flatValues.push(rowName); |
| 171 for (var j = 0; j < columnNames.length; ++j) | 171 for (var j = 0; j < columnNames.length; ++j) |
| 172 flatValues.push(rowValue[columnNames[j]]); | 172 flatValues.push(rowValue[columnNames[j]]); |
| 173 } | 173 } |
| 174 columnNames.unshift(Common.UIString('(index)')); | 174 columnNames.unshift(Common.UIString('(index)')); |
| 175 | 175 |
| 176 if (flatValues.length) { | 176 if (flatValues.length) { |
| 177 this._dataGrid = UI.SortableDataGrid.create(columnNames, flatValues); | 177 this._dataGrid = DataGrid.SortableDataGrid.create(columnNames, flatValues)
; |
| 178 | 178 |
| 179 var formattedResult = createElementWithClass('span', 'console-message-text
'); | 179 var formattedResult = createElementWithClass('span', 'console-message-text
'); |
| 180 var tableElement = formattedResult.createChild('div', 'console-message-for
matted-table'); | 180 var tableElement = formattedResult.createChild('div', 'console-message-for
matted-table'); |
| 181 var dataGridContainer = tableElement.createChild('span'); | 181 var dataGridContainer = tableElement.createChild('span'); |
| 182 tableElement.appendChild(this._formatParameter(table, true, false)); | 182 tableElement.appendChild(this._formatParameter(table, true, false)); |
| 183 dataGridContainer.appendChild(this._dataGrid.element); | 183 dataGridContainer.appendChild(this._dataGrid.element); |
| 184 formattedMessage.appendChild(formattedResult); | 184 formattedMessage.appendChild(formattedResult); |
| 185 this._dataGrid.renderInline(); | 185 this._dataGrid.renderInline(); |
| 186 } | 186 } |
| 187 return formattedMessage; | 187 return formattedMessage; |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 toMessageElement() { | 1189 toMessageElement() { |
| 1190 if (!this._element) { | 1190 if (!this._element) { |
| 1191 super.toMessageElement(); | 1191 super.toMessageElement(); |
| 1192 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); | 1192 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); |
| 1193 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); | 1193 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); |
| 1194 this.setCollapsed(this._collapsed); | 1194 this.setCollapsed(this._collapsed); |
| 1195 } | 1195 } |
| 1196 return this._element; | 1196 return this._element; |
| 1197 } | 1197 } |
| 1198 }; | 1198 }; |
| OLD | NEW |