Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: Source/devtools/front_end/resources/IndexedDBViews.js

Issue 1107233003: Devtools: [CustomFormatter] Add context menu to disassemble custom previews (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Introduce WebInspector.ObjectPropertiesSection.defaultObjectPresentation Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698