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

Side by Side Diff: Source/devtools/front_end/profiler/CanvasReplayStateView.js

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 }, 489 },
490 490
491 /** 491 /**
492 * @param {!CanvasAgent.ResourceStateDescriptor} descriptor 492 * @param {!CanvasAgent.ResourceStateDescriptor} descriptor
493 * @return {!WebInspector.DataGridNode} 493 * @return {!WebInspector.DataGridNode}
494 */ 494 */
495 _createDataGridNode: function(descriptor) 495 _createDataGridNode: function(descriptor)
496 { 496 {
497 var name = descriptor.name; 497 var name = descriptor.name;
498 var callArgument = descriptor.value; 498 var callArgument = descriptor.value;
499 var target = this._traceLogPlayer.target();
499 500
500 /** @type {!Element|string} */ 501 /** @type {!Element|string} */
501 var valueElement = callArgument ? WebInspector.CanvasProfileDataGridHelp er.createCallArgumentElement(callArgument) : ""; 502 var valueElement = callArgument ? WebInspector.CanvasProfileDataGridHelp er.createCallArgumentElement(target, callArgument) : "";
502 503
503 /** @type {!Element|string} */ 504 /** @type {!Element|string} */
504 var nameElement = name; 505 var nameElement = name;
505 if (typeof descriptor.enumValueForName !== "undefined") 506 if (target && typeof descriptor.enumValueForName !== "undefined")
506 nameElement = WebInspector.CanvasProfileDataGridHelper.createEnumVal ueElement(name, +descriptor.enumValueForName); 507 nameElement = WebInspector.CanvasProfileDataGridHelper.createEnumVal ueElement(target, name, +descriptor.enumValueForName);
507 508
508 if (descriptor.isArray && descriptor.values) { 509 if (descriptor.isArray && descriptor.values) {
509 if (typeof nameElement === "string") 510 if (typeof nameElement === "string")
510 nameElement += "[" + descriptor.values.length + "]"; 511 nameElement += "[" + descriptor.values.length + "]";
511 else { 512 else {
512 var element = createElement("span"); 513 var element = createElement("span");
513 element.appendChild(nameElement); 514 element.appendChild(nameElement);
514 element.createTextChild("[" + descriptor.values.length + "]"); 515 element.createTextChild("[" + descriptor.values.length + "]");
515 nameElement = element; 516 nameElement = element;
516 } 517 }
517 } 518 }
518 519
519 var data = {}; 520 var data = {};
520 data[0] = nameElement; 521 data[0] = nameElement;
521 data[1] = valueElement; 522 data[1] = valueElement;
522 var node = new WebInspector.DataGridNode(data); 523 var node = new WebInspector.DataGridNode(data);
523 node.selectable = false; 524 node.selectable = false;
524 node.name = name; 525 node.name = name;
525 return node; 526 return node;
526 }, 527 },
527 528
528 __proto__: WebInspector.VBox.prototype 529 __proto__: WebInspector.VBox.prototype
529 } 530 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/CanvasProfileView.js ('k') | Source/devtools/front_end/resources/ResourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698