| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 createCell: function(columnIdentifier) | 383 createCell: function(columnIdentifier) |
| 384 { | 384 { |
| 385 var cell = WebInspector.DataGridNode.prototype.createCell.call(this, col
umnIdentifier); | 385 var cell = WebInspector.DataGridNode.prototype.createCell.call(this, col
umnIdentifier); |
| 386 var value = this.data[columnIdentifier]; | 386 var value = this.data[columnIdentifier]; |
| 387 | 387 |
| 388 switch (columnIdentifier) { | 388 switch (columnIdentifier) { |
| 389 case "value": | 389 case "value": |
| 390 case "key": | 390 case "key": |
| 391 case "primaryKey": | 391 case "primaryKey": |
| 392 cell.removeChildren(); | 392 cell.removeChildren(); |
| 393 this._formatValue(cell, value); | 393 var objectElement = WebInspector.ObjectPropertiesSection.defaultObje
ctPresentation(value, true); |
| 394 cell.appendChild(objectElement); |
| 394 break; | 395 break; |
| 395 default: | 396 default: |
| 396 } | 397 } |
| 397 | 398 |
| 398 return cell; | 399 return cell; |
| 399 }, | 400 }, |
| 400 | 401 |
| 401 _formatValue: function(cell, value) | |
| 402 { | |
| 403 var valueElement = WebInspector.ObjectPropertiesSection.createValueEleme
nt(value, false, cell); | |
| 404 valueElement.classList.add("source-code"); | |
| 405 if (value.type === "object") { | |
| 406 var section = new WebInspector.ObjectPropertiesSection(value, valueE
lement); | |
| 407 section.editable = false; | |
| 408 section.skipProto(); | |
| 409 cell.appendChild(section.element); | |
| 410 } else { | |
| 411 valueElement.classList.add("primitive-value"); | |
| 412 cell.appendChild(valueElement); | |
| 413 } | |
| 414 }, | |
| 415 | |
| 416 __proto__: WebInspector.DataGridNode.prototype | 402 __proto__: WebInspector.DataGridNode.prototype |
| 417 } | 403 } |
| OLD | NEW |