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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: Created 4 years, 1 month 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 /** 225 /**
226 * @override 226 * @override
227 * @param {!Event} e 227 * @param {!Event} e
228 * @return {boolean} 228 * @return {boolean}
229 */ 229 */
230 ondblclick: function(e) 230 ondblclick: function(e)
231 { 231 {
232 return true; 232 return true;
233 }, 233 },
234 234
235 /**
236 * @override
237 */
235 onpopulate: function() 238 onpopulate: function()
236 { 239 {
237 WebInspector.ObjectPropertyTreeElement._populate(this, this._object, !!t his.treeOutline._skipProto, this._linkifier, this._emptyPlaceholder, this._ignor eHasOwnProperty, this._extraProperties); 240 WebInspector.ObjectPropertyTreeElement._populate(this, this._object, !!t his.treeOutline._skipProto, this._linkifier, this._emptyPlaceholder, this._ignor eHasOwnProperty, this._extraProperties);
238 }, 241 },
239 242
240 __proto__: TreeElement.prototype 243 __proto__: TreeElement.prototype
241 }; 244 };
242 245
243 /** 246 /**
244 * @constructor 247 * @constructor
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 if (ranges.length) 301 if (ranges.length)
299 WebInspector.highlightRangesWithStyleClass(element, ranges, cssClass Name, this._highlightChanges); 302 WebInspector.highlightRangesWithStyleClass(element, ranges, cssClass Name, this._highlightChanges);
300 }, 303 },
301 304
302 revertHighlightChanges: function() 305 revertHighlightChanges: function()
303 { 306 {
304 WebInspector.revertDomChanges(this._highlightChanges); 307 WebInspector.revertDomChanges(this._highlightChanges);
305 this._highlightChanges = []; 308 this._highlightChanges = [];
306 }, 309 },
307 310
311 /**
312 * @override
313 */
308 onpopulate: function() 314 onpopulate: function()
309 { 315 {
310 var propertyValue = /** @type {!WebInspector.RemoteObject} */ (this.prop erty.value); 316 var propertyValue = /** @type {!WebInspector.RemoteObject} */ (this.prop erty.value);
311 console.assert(propertyValue); 317 console.assert(propertyValue);
312 var skipProto = this.treeOutline ? this.treeOutline._skipProto : true; 318 var skipProto = this.treeOutline ? this.treeOutline._skipProto : true;
313 var targetValue = this.property.name !== "__proto__" ? propertyValue : t his.property.parentObject; 319 var targetValue = this.property.name !== "__proto__" ? propertyValue : t his.property.parentObject;
314 WebInspector.ObjectPropertyTreeElement._populate(this, propertyValue, sk ipProto, this._linkifier, undefined, undefined, undefined, targetValue); 320 WebInspector.ObjectPropertyTreeElement._populate(this, propertyValue, sk ipProto, this._linkifier, undefined, undefined, undefined, targetValue);
315 }, 321 },
316 322
317 /** 323 /**
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 for (var i = 0; i < properties.length; ++i) { 1011 for (var i = 0; i < properties.length; ++i) {
1006 properties[i].parentObject = this._object; 1012 properties[i].parentObject = this._object;
1007 var childTreeElement = new WebInspector.ObjectPropertyTreeElement(pr operties[i], linkifier); 1013 var childTreeElement = new WebInspector.ObjectPropertyTreeElement(pr operties[i], linkifier);
1008 childTreeElement._readOnly = true; 1014 childTreeElement._readOnly = true;
1009 treeNode.appendChild(childTreeElement); 1015 treeNode.appendChild(childTreeElement);
1010 } 1016 }
1011 } 1017 }
1012 }; 1018 };
1013 1019
1014 WebInspector.ArrayGroupingTreeElement.prototype = { 1020 WebInspector.ArrayGroupingTreeElement.prototype = {
1021 /**
1022 * @override
1023 */
1015 onpopulate: function() 1024 onpopulate: function()
1016 { 1025 {
1017 if (this._propertyCount >= WebInspector.ArrayGroupingTreeElement._bucket Threshold) { 1026 if (this._propertyCount >= WebInspector.ArrayGroupingTreeElement._bucket Threshold) {
1018 WebInspector.ArrayGroupingTreeElement._populateRanges(this, this._ob ject, this._fromIndex, this._toIndex, false, this._linkifier); 1027 WebInspector.ArrayGroupingTreeElement._populateRanges(this, this._ob ject, this._fromIndex, this._toIndex, false, this._linkifier);
1019 return; 1028 return;
1020 } 1029 }
1021 WebInspector.ArrayGroupingTreeElement._populateAsFragment(this, this._ob ject, this._fromIndex, this._toIndex, this._linkifier); 1030 WebInspector.ArrayGroupingTreeElement._populateAsFragment(this, this._ob ject, this._fromIndex, this._toIndex, this._linkifier);
1022 }, 1031 },
1023 1032
1033 /**
1034 * @override
1035 */
1024 onattach: function() 1036 onattach: function()
1025 { 1037 {
1026 this.listItemElement.classList.add("object-properties-section-name"); 1038 this.listItemElement.classList.add("object-properties-section-name");
1027 }, 1039 },
1028 1040
1029 __proto__: TreeElement.prototype 1041 __proto__: TreeElement.prototype
1030 }; 1042 };
1031 1043
1032 /** 1044 /**
1033 * @constructor 1045 * @constructor
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1379
1368 result = currentName + (result ? "." + result : ""); 1380 result = currentName + (result ? "." + result : "");
1369 current = current.parent; 1381 current = current.parent;
1370 } 1382 }
1371 var treeOutlineId = treeElement.treeOutline[WebInspector.ObjectPropertie sSectionExpandController._treeOutlineId]; 1383 var treeOutlineId = treeElement.treeOutline[WebInspector.ObjectPropertie sSectionExpandController._treeOutlineId];
1372 result = treeOutlineId + (result ? ":" + result : ""); 1384 result = treeOutlineId + (result ? ":" + result : "");
1373 treeElement[WebInspector.ObjectPropertiesSectionExpandController._cached PathSymbol] = result; 1385 treeElement[WebInspector.ObjectPropertiesSectionExpandController._cached PathSymbol] = result;
1374 return result; 1386 return result;
1375 } 1387 }
1376 }; 1388 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698