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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 1761243002: [DevTools] Fix compile errors before closure compiler roll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prepare-bindings-module
Patch Set: Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 471
472 /** 472 /**
473 * @param {?WebInspector.RemoteObject} object 473 * @param {?WebInspector.RemoteObject} object
474 * @param {!Array.<!RuntimeAgent.PropertyPreview>} propertyPath 474 * @param {!Array.<!RuntimeAgent.PropertyPreview>} propertyPath
475 * @return {!Element} 475 * @return {!Element}
476 */ 476 */
477 _renderPropertyPreviewOrAccessor: function(object, propertyPath) 477 _renderPropertyPreviewOrAccessor: function(object, propertyPath)
478 { 478 {
479 var property = propertyPath.peekLast(); 479 var property = propertyPath.peekLast();
480 if (property.type === "accessor") 480 if (property.type === "accessor")
481 return this._formatAsAccessorProperty(object, propertyPath.select("n ame"), false); 481 return this._formatAsAccessorProperty(object, propertyPath.map(prope rty => property.name), false);
482 return this._previewFormatter.renderPropertyPreview(property.type, /** @ type {string} */ (property.subtype), property.value); 482 return this._previewFormatter.renderPropertyPreview(property.type, /** @ type {string} */ (property.subtype), property.value);
483 }, 483 },
484 484
485 /** 485 /**
486 * @param {!WebInspector.RemoteObject} object 486 * @param {!WebInspector.RemoteObject} object
487 * @param {!Element} elem 487 * @param {!Element} elem
488 */ 488 */
489 _formatParameterAsNode: function(object, elem) 489 _formatParameterAsNode: function(object, elem)
490 { 490 {
491 WebInspector.Renderer.renderPromise(object).then(appendRenderer, failedT oRender.bind(this)); 491 WebInspector.Renderer.renderPromise(object).then(appendRenderer, failedT oRender.bind(this));
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 * @param {!Element} elem 640 * @param {!Element} elem
641 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties 641 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties
642 */ 642 */
643 _printArray: function(array, elem, properties) 643 _printArray: function(array, elem, properties)
644 { 644 {
645 if (!properties) { 645 if (!properties) {
646 this._formatParameterAsObject(array, elem, false); 646 this._formatParameterAsObject(array, elem, false);
647 return; 647 return;
648 } 648 }
649 649
650 var elements = []; 650 var elements = {};
651 for (var i = 0; i < properties.length; ++i) { 651 for (var i = 0; i < properties.length; ++i) {
652 var property = properties[i]; 652 var property = properties[i];
653 var name = property.name; 653 var name = property.name;
654 if (isNaN(name)) 654 if (isNaN(name))
655 continue; 655 continue;
656 if (property.getter) 656 if (property.getter)
657 elements[name] = this._formatAsAccessorProperty(array, [name], t rue); 657 elements[name] = this._formatAsAccessorProperty(array, [name], t rue);
658 else if (property.value) 658 else if (property.value)
659 elements[name] = this._formatAsArrayEntry(property.value); 659 elements[name] = this._formatAsArrayEntry(property.value);
660 } 660 }
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 { 1331 {
1332 if (!this._wrapperElement) { 1332 if (!this._wrapperElement) {
1333 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1333 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1334 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1334 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1335 } 1335 }
1336 return this._wrapperElement; 1336 return this._wrapperElement;
1337 }, 1337 },
1338 1338
1339 __proto__: WebInspector.ConsoleViewMessage.prototype 1339 __proto__: WebInspector.ConsoleViewMessage.prototype
1340 } 1340 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698