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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/PropertiesWidget.js

Issue 2712513002: DevTools: extract ObjectUI module from Components (Closed)
Patch Set: fix build.gn Created 3 years, 10 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 this.element.removeChildren(); 130 this.element.removeChildren();
131 this.sections = []; 131 this.sections = [];
132 132
133 // Get array of property user-friendly names. 133 // Get array of property user-friendly names.
134 for (var i = 0; i < properties.length; ++i) { 134 for (var i = 0; i < properties.length; ++i) {
135 if (!parseInt(properties[i].name, 10)) 135 if (!parseInt(properties[i].name, 10))
136 continue; 136 continue;
137 var property = properties[i].value; 137 var property = properties[i].value;
138 var title = property.description; 138 var title = property.description;
139 title = title.replace(/Prototype$/, ''); 139 title = title.replace(/Prototype$/, '');
140 var section = new Components.ObjectPropertiesSection(property, title); 140 var section = new ObjectUI.ObjectPropertiesSection(property, title);
141 section.element.classList.add('properties-widget-section'); 141 section.element.classList.add('properties-widget-section');
142 this.sections.push(section); 142 this.sections.push(section);
143 this.element.appendChild(section.element); 143 this.element.appendChild(section.element);
144 if (expanded[this.sections.length - 1]) 144 if (expanded[this.sections.length - 1])
145 section.expand(); 145 section.expand();
146 section.addEventListener(UI.TreeOutline.Events.ElementExpanded, this._pr opertyExpanded, this); 146 section.addEventListener(UI.TreeOutline.Events.ElementExpanded, this._pr opertyExpanded, this);
147 } 147 }
148 } 148 }
149 } 149 }
150 150
(...skipping 14 matching lines...) Expand all
165 return; 165 return;
166 var data = event.data; 166 var data = event.data;
167 var node = /** @type {!SDK.DOMNode} */ (data instanceof SDK.DOMNode ? data : data.node); 167 var node = /** @type {!SDK.DOMNode} */ (data instanceof SDK.DOMNode ? data : data.node);
168 if (this._node !== node) 168 if (this._node !== node)
169 return; 169 return;
170 this.update(); 170 this.update();
171 } 171 }
172 }; 172 };
173 173
174 Elements.PropertiesWidget._objectGroupName = 'properties-sidebar-pane'; 174 Elements.PropertiesWidget._objectGroupName = 'properties-sidebar-pane';
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698