| OLD | NEW |
| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 this.sections = []; | 149 this.sections = []; |
| 150 | 150 |
| 151 // Get array of prototype user-friendly names. | 151 // Get array of prototype user-friendly names. |
| 152 for (var i = 0; i < prototypes.length; ++i) { | 152 for (var i = 0; i < prototypes.length; ++i) { |
| 153 if (!parseInt(prototypes[i].name, 10)) | 153 if (!parseInt(prototypes[i].name, 10)) |
| 154 continue; | 154 continue; |
| 155 var prototype = prototypes[i].value; | 155 var prototype = prototypes[i].value; |
| 156 var title = prototype.description; | 156 var title = prototype.description; |
| 157 title = title.replace(/Prototype$/, ""); | 157 title = title.replace(/Prototype$/, ""); |
| 158 var section = new WebInspector.ObjectPropertiesSection(prototype
, title); | 158 var section = new WebInspector.ObjectPropertiesSection(prototype
, title); |
| 159 section.element.classList.add("properties-widget-section"); |
| 159 this.sections.push(section); | 160 this.sections.push(section); |
| 160 this.element.appendChild(section.element); | 161 this.element.appendChild(section.element); |
| 161 if (expanded[this.sections.length - 1]) | 162 if (expanded[this.sections.length - 1]) |
| 162 section.expand(); | 163 section.expand(); |
| 163 } | 164 } |
| 164 | 165 |
| 165 finishCallback(); | 166 finishCallback(); |
| 166 } | 167 } |
| 167 }, | 168 }, |
| 168 | 169 |
| 169 /** | 170 /** |
| 170 * @param {!WebInspector.Event} event | 171 * @param {!WebInspector.Event} event |
| 171 */ | 172 */ |
| 172 _onNodeChange: function(event) | 173 _onNodeChange: function(event) |
| 173 { | 174 { |
| 174 if (!this._node) | 175 if (!this._node) |
| 175 return; | 176 return; |
| 176 var data = event.data; | 177 var data = event.data; |
| 177 var node = /** @type {!WebInspector.DOMNode} */ (data instanceof WebInsp
ector.DOMNode ? data : data.node); | 178 var node = /** @type {!WebInspector.DOMNode} */ (data instanceof WebInsp
ector.DOMNode ? data : data.node); |
| 178 if (this._node !== node) | 179 if (this._node !== node) |
| 179 return; | 180 return; |
| 180 this.update(); | 181 this.update(); |
| 181 }, | 182 }, |
| 182 | 183 |
| 183 __proto__: WebInspector.ThrottledWidget.prototype | 184 __proto__: WebInspector.ThrottledWidget.prototype |
| 184 } | 185 } |
| OLD | NEW |