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

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

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 /** @type {!Element|string} */ 503 /** @type {!Element|string} */
504 var nameElement = name; 504 var nameElement = name;
505 if (typeof descriptor.enumValueForName !== "undefined") 505 if (typeof descriptor.enumValueForName !== "undefined")
506 nameElement = WebInspector.CanvasProfileDataGridHelper.createEnumVal ueElement(name, +descriptor.enumValueForName); 506 nameElement = WebInspector.CanvasProfileDataGridHelper.createEnumVal ueElement(name, +descriptor.enumValueForName);
507 507
508 if (descriptor.isArray && descriptor.values) { 508 if (descriptor.isArray && descriptor.values) {
509 if (typeof nameElement === "string") 509 if (typeof nameElement === "string")
510 nameElement += "[" + descriptor.values.length + "]"; 510 nameElement += "[" + descriptor.values.length + "]";
511 else { 511 else {
512 var element = document.createElement("span"); 512 var element = createElement("span");
513 element.appendChild(nameElement); 513 element.appendChild(nameElement);
514 element.createTextChild("[" + descriptor.values.length + "]"); 514 element.createTextChild("[" + descriptor.values.length + "]");
515 nameElement = element; 515 nameElement = element;
516 } 516 }
517 } 517 }
518 518
519 var data = {}; 519 var data = {};
520 data[0] = nameElement; 520 data[0] = nameElement;
521 data[1] = valueElement; 521 data[1] = valueElement;
522 var node = new WebInspector.DataGridNode(data); 522 var node = new WebInspector.DataGridNode(data);
523 node.selectable = false; 523 node.selectable = false;
524 node.name = name; 524 node.name = name;
525 return node; 525 return node;
526 }, 526 },
527 527
528 __proto__: WebInspector.VBox.prototype 528 __proto__: WebInspector.VBox.prototype
529 } 529 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/CanvasProfileView.js ('k') | Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698