OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |