| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 var rowName = rows[i][0]; | 165 var rowName = rows[i][0]; |
| 166 var rowValue = rows[i][1]; | 166 var rowValue = rows[i][1]; |
| 167 flatValues.push(rowName); | 167 flatValues.push(rowName); |
| 168 for (var j = 0; j < columnNames.length; ++j) | 168 for (var j = 0; j < columnNames.length; ++j) |
| 169 flatValues.push(rowValue[columnNames[j]]); | 169 flatValues.push(rowValue[columnNames[j]]); |
| 170 } | 170 } |
| 171 columnNames.unshift(Common.UIString('(index)')); | 171 columnNames.unshift(Common.UIString('(index)')); |
| 172 | 172 |
| 173 if (flatValues.length) { | 173 if (flatValues.length) { |
| 174 this._dataGrid = DataGrid.SortableDataGrid.create(columnNames, flatValues)
; | 174 this._dataGrid = DataGrid.SortableDataGrid.create(columnNames, flatValues)
; |
| 175 this._dataGrid.setStriped(true); |
| 175 | 176 |
| 176 var formattedResult = createElementWithClass('span', 'console-message-text
'); | 177 var formattedResult = createElementWithClass('span', 'console-message-text
'); |
| 177 var tableElement = formattedResult.createChild('div', 'console-message-for
matted-table'); | 178 var tableElement = formattedResult.createChild('div', 'console-message-for
matted-table'); |
| 178 var dataGridContainer = tableElement.createChild('span'); | 179 var dataGridContainer = tableElement.createChild('span'); |
| 179 tableElement.appendChild(this._formatParameter(table, true, false)); | 180 tableElement.appendChild(this._formatParameter(table, true, false)); |
| 180 dataGridContainer.appendChild(this._dataGrid.element); | 181 dataGridContainer.appendChild(this._dataGrid.element); |
| 181 formattedMessage.appendChild(formattedResult); | 182 formattedMessage.appendChild(formattedResult); |
| 182 this._dataGrid.renderInline(); | 183 this._dataGrid.renderInline(); |
| 183 } | 184 } |
| 184 return formattedMessage; | 185 return formattedMessage; |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 toMessageElement() { | 1270 toMessageElement() { |
| 1270 if (!this._element) { | 1271 if (!this._element) { |
| 1271 super.toMessageElement(); | 1272 super.toMessageElement(); |
| 1272 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); | 1273 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); |
| 1273 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); | 1274 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); |
| 1274 this.setCollapsed(this._collapsed); | 1275 this.setCollapsed(this._collapsed); |
| 1275 } | 1276 } |
| 1276 return this._element; | 1277 return this._element; |
| 1277 } | 1278 } |
| 1278 }; | 1279 }; |
| OLD | NEW |