| 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 11 matching lines...) Expand all Loading... |
| 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * @constructor | 31 * @constructor |
| 32 * @extends {WebInspector.ThrottledWidget} | 32 * @extends {WebInspector.ThrottledView} |
| 33 */ | 33 */ |
| 34 WebInspector.PropertiesWidget = function() | 34 WebInspector.PropertiesWidget = function() |
| 35 { | 35 { |
| 36 WebInspector.ThrottledWidget.call(this); | 36 WebInspector.ThrottledView.call(this, WebInspector.UIString("Properties")); |
| 37 | 37 |
| 38 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.AttrModified, this._onNodeChange, this); | 38 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.AttrModified, this._onNodeChange, this); |
| 39 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.AttrRemoved, this._onNodeChange, this); | 39 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.AttrRemoved, this._onNodeChange, this); |
| 40 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.CharacterDataModified, this._onNodeChange, this); | 40 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.CharacterDataModified, this._onNodeChange, this); |
| 41 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.ChildNodeCountUpdated, this._onNodeChange, this); | 41 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.ChildNodeCountUpdated, this._onNodeChange, this); |
| 42 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, this._set
Node, this); | 42 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, this._set
Node, this); |
| 43 } | 43 } |
| 44 | 44 |
| 45 /** | |
| 46 * @return {!WebInspector.ElementsSidebarViewWrapperPane} | |
| 47 */ | |
| 48 WebInspector.PropertiesWidget.createSidebarWrapper = function() | |
| 49 { | |
| 50 return new WebInspector.ElementsSidebarViewWrapperPane(WebInspector.UIString
("Properties"), new WebInspector.PropertiesWidget()); | |
| 51 } | |
| 52 | |
| 53 WebInspector.PropertiesWidget._objectGroupName = "properties-sidebar-pane"; | 45 WebInspector.PropertiesWidget._objectGroupName = "properties-sidebar-pane"; |
| 54 | 46 |
| 55 WebInspector.PropertiesWidget.prototype = { | 47 WebInspector.PropertiesWidget.prototype = { |
| 56 /** | 48 /** |
| 57 * @param {!WebInspector.Event} event | 49 * @param {!WebInspector.Event} event |
| 58 */ | 50 */ |
| 59 _setNode: function(event) | 51 _setNode: function(event) |
| 60 { | 52 { |
| 61 this._node = /** @type {?WebInspector.DOMNode} */(event.data); | 53 this._node = /** @type {?WebInspector.DOMNode} */(event.data); |
| 62 this.update(); | 54 this.update(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 { | 173 { |
| 182 if (!this._node) | 174 if (!this._node) |
| 183 return; | 175 return; |
| 184 var data = event.data; | 176 var data = event.data; |
| 185 var node = /** @type {!WebInspector.DOMNode} */ (data instanceof WebInsp
ector.DOMNode ? data : data.node); | 177 var node = /** @type {!WebInspector.DOMNode} */ (data instanceof WebInsp
ector.DOMNode ? data : data.node); |
| 186 if (this._node !== node) | 178 if (this._node !== node) |
| 187 return; | 179 return; |
| 188 this.update(); | 180 this.update(); |
| 189 }, | 181 }, |
| 190 | 182 |
| 191 __proto__: WebInspector.ThrottledWidget.prototype | 183 __proto__: WebInspector.ThrottledView.prototype |
| 192 } | 184 } |
| OLD | NEW |