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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 if (str) | 399 if (str) |
400 str += ", "; | 400 str += ", "; |
401 str += this._paramToString(params[key], key); | 401 str += this._paramToString(params[key], key); |
402 } | 402 } |
403 return str; | 403 return str; |
404 }, | 404 }, |
405 | 405 |
406 _update: function() | 406 _update: function() |
407 { | 407 { |
408 var logItem = this.representedObject; | 408 var logItem = this.representedObject; |
409 var title = document.createDocumentFragment(); | 409 var title = createDocumentFragment(); |
410 title.createChild("div", "selection"); | 410 title.createChild("div", "selection"); |
411 title.createTextChild(logItem.method + "(" + this._paramsToString(logIte
m.params) + ")"); | 411 title.createTextChild(logItem.method + "(" + this._paramsToString(logIte
m.params) + ")"); |
412 this.title = title; | 412 this.title = title; |
413 }, | 413 }, |
414 | 414 |
415 /** | 415 /** |
416 * @param {boolean} hovered | 416 * @param {boolean} hovered |
417 */ | 417 */ |
418 setHovered: function(hovered) | 418 setHovered: function(hovered) |
419 { | 419 { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 if (value && typeof value === "object") { | 467 if (value && typeof value === "object") { |
468 for (var property in value) | 468 for (var property in value) |
469 WebInspector.LogPropertyTreeElement._appendLogPropertyItem(treeEleme
nt, property, value[property]); | 469 WebInspector.LogPropertyTreeElement._appendLogPropertyItem(treeEleme
nt, property, value[property]); |
470 } | 470 } |
471 }; | 471 }; |
472 | 472 |
473 WebInspector.LogPropertyTreeElement.prototype = { | 473 WebInspector.LogPropertyTreeElement.prototype = { |
474 onattach: function() | 474 onattach: function() |
475 { | 475 { |
476 var property = this.representedObject; | 476 var property = this.representedObject; |
477 var title = document.createDocumentFragment(); | 477 var title = createDocumentFragment(); |
478 title.createChild("div", "selection"); | 478 title.createChild("div", "selection"); |
479 var nameElement = title.createChild("span", "name"); | 479 var nameElement = title.createChild("span", "name"); |
480 nameElement.textContent = property.name; | 480 nameElement.textContent = property.name; |
481 var separatorElement = title.createChild("span", "separator"); | 481 var separatorElement = title.createChild("span", "separator"); |
482 separatorElement.textContent = ": "; | 482 separatorElement.textContent = ": "; |
483 if (property.value === null || typeof property.value !== "object") { | 483 if (property.value === null || typeof property.value !== "object") { |
484 var valueElement = title.createChild("span", "value"); | 484 var valueElement = title.createChild("span", "value"); |
485 valueElement.textContent = JSON.stringify(property.value); | 485 valueElement.textContent = JSON.stringify(property.value); |
486 valueElement.classList.add("console-formatted-" + property.value ===
null ? "null" : typeof property.value); | 486 valueElement.classList.add("console-formatted-" + property.value ===
null ? "null" : typeof property.value); |
487 } | 487 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 var method = logItem.method.toTitleCase(); | 581 var method = logItem.method.toTitleCase(); |
582 | 582 |
583 var logItemCategories = WebInspector.PaintProfilerView._initLogItemCategorie
s(); | 583 var logItemCategories = WebInspector.PaintProfilerView._initLogItemCategorie
s(); |
584 var result = logItemCategories[method]; | 584 var result = logItemCategories[method]; |
585 if (!result) { | 585 if (!result) { |
586 result = WebInspector.PaintProfilerView.categories()["misc"]; | 586 result = WebInspector.PaintProfilerView.categories()["misc"]; |
587 logItemCategories[method] = result; | 587 logItemCategories[method] = result; |
588 } | 588 } |
589 return result; | 589 return result; |
590 } | 590 } |
OLD | NEW |