Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.ThrottledWidget} | 7 * @extends {WebInspector.ThrottledWidget} |
| 8 */ | 8 */ |
| 9 WebInspector.AccessibilitySidebarView = function() | 9 WebInspector.AccessibilitySidebarView = function() |
| 10 { | 10 { |
| 11 WebInspector.ThrottledWidget.call(this); | 11 WebInspector.ThrottledWidget.call(this); |
| 12 this._axNodeSubPane = null; | 12 this._axNodeSubPane = null; |
| 13 this._ariaSubPane = null | |
|
dgozman
2016/07/19 18:13:12
style: missing semicolon
aboxhall
2016/07/21 21:39:26
Done.
| |
| 13 this._node = null; | 14 this._node = null; |
| 14 this._sidebarPaneStack = null; | 15 this._sidebarPaneStack = null; |
| 15 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, this._pul lNode, this); | 16 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, this._pul lNode, this); |
| 16 this._pullNode(); | 17 this._pullNode(); |
| 17 } | 18 } |
| 18 | 19 |
| 19 WebInspector.AccessibilitySidebarView.prototype = { | 20 WebInspector.AccessibilitySidebarView.prototype = { |
| 20 /** | 21 /** |
| 21 * @return {?WebInspector.DOMNode} | 22 * @return {?WebInspector.DOMNode} |
| 22 */ | 23 */ |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 52 wasShown: function() | 53 wasShown: function() |
| 53 { | 54 { |
| 54 WebInspector.ThrottledWidget.prototype.wasShown.call(this); | 55 WebInspector.ThrottledWidget.prototype.wasShown.call(this); |
| 55 | 56 |
| 56 if (!this._sidebarPaneStack) { | 57 if (!this._sidebarPaneStack) { |
| 57 this._axNodeSubPane = new WebInspector.AXNodeSubPane(); | 58 this._axNodeSubPane = new WebInspector.AXNodeSubPane(); |
| 58 this._axNodeSubPane.setNode(this.node()); | 59 this._axNodeSubPane.setNode(this.node()); |
| 59 this._axNodeSubPane.show(this.element); | 60 this._axNodeSubPane.show(this.element); |
| 60 this._axNodeSubPane.expandPane(); | 61 this._axNodeSubPane.expandPane(); |
| 61 | 62 |
| 63 this._ariaSubPane = new WebInspector.ARIAAttributesPane(); | |
| 64 this._ariaSubPane.setNode(this.node()); | |
| 65 this._ariaSubPane.show(this.element); | |
| 66 this._ariaSubPane.expandPane(); | |
| 67 | |
| 62 this._sidebarPaneStack = new WebInspector.SidebarPaneStack(); | 68 this._sidebarPaneStack = new WebInspector.SidebarPaneStack(); |
| 63 this._sidebarPaneStack.element.classList.add("flex-auto"); | 69 this._sidebarPaneStack.element.classList.add("flex-auto"); |
| 64 this._sidebarPaneStack.show(this.element); | 70 this._sidebarPaneStack.show(this.element); |
| 71 this._sidebarPaneStack.addPane(this._ariaSubPane); | |
| 65 this._sidebarPaneStack.addPane(this._axNodeSubPane); | 72 this._sidebarPaneStack.addPane(this._axNodeSubPane); |
| 66 } | 73 } |
| 67 | 74 |
| 68 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn spector.DOMModel.Events.AttrModified, this._onAttrChange, this); | 75 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn spector.DOMModel.Events.AttrModified, this._onAttrChange, this); |
| 69 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn spector.DOMModel.Events.AttrRemoved, this._onAttrChange, this); | 76 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn spector.DOMModel.Events.AttrRemoved, this._onAttrChange, this); |
| 70 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn spector.DOMModel.Events.CharacterDataModified, this._onNodeChange, this); | 77 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn spector.DOMModel.Events.CharacterDataModified, this._onNodeChange, this); |
| 71 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn spector.DOMModel.Events.ChildNodeCountUpdated, this._onNodeChange, this); | 78 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn spector.DOMModel.Events.ChildNodeCountUpdated, this._onNodeChange, this); |
| 72 }, | 79 }, |
| 73 | 80 |
| 74 /** | 81 /** |
| 75 * @override | 82 * @override |
| 76 */ | 83 */ |
| 77 willHide: function() | 84 willHide: function() |
| 78 { | 85 { |
| 79 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We bInspector.DOMModel.Events.AttrModified, this._onAttrChange, this); | 86 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We bInspector.DOMModel.Events.AttrModified, this._onAttrChange, this); |
| 80 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We bInspector.DOMModel.Events.AttrRemoved, this._onAttrChange, this); | 87 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We bInspector.DOMModel.Events.AttrRemoved, this._onAttrChange, this); |
| 81 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We bInspector.DOMModel.Events.CharacterDataModified, this._onNodeChange, this); | 88 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We bInspector.DOMModel.Events.CharacterDataModified, this._onNodeChange, this); |
| 82 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We bInspector.DOMModel.Events.ChildNodeCountUpdated, this._onNodeChange, this); | 89 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We bInspector.DOMModel.Events.ChildNodeCountUpdated, this._onNodeChange, this); |
| 83 }, | 90 }, |
| 84 | 91 |
| 85 _pullNode: function() | 92 _pullNode: function() |
| 86 { | 93 { |
| 87 this._node = WebInspector.context.flavor(WebInspector.DOMNode); | 94 this._node = WebInspector.context.flavor(WebInspector.DOMNode); |
| 88 if (this._axNodeSubPane) | 95 if (this._axNodeSubPane) |
| 89 this._axNodeSubPane.setNode(this._node); | 96 this._axNodeSubPane.setNode(this._node); |
| 97 if (this._ariaSubPane) | |
| 98 this._ariaSubPane.setNode(this._node); | |
| 90 this.update(); | 99 this.update(); |
| 91 }, | 100 }, |
| 92 | 101 |
| 93 /** | 102 /** |
| 94 * @param {!WebInspector.Event} event | 103 * @param {!WebInspector.Event} event |
| 95 */ | 104 */ |
| 96 _onAttrChange: function(event) | 105 _onAttrChange: function(event) |
| 97 { | 106 { |
| 98 if (!this.node()) | 107 if (!this.node()) |
| 99 return; | 108 return; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 treeOutline.registerRequiredCSS("accessibility/accessibilityNode.css"); | 189 treeOutline.registerRequiredCSS("accessibility/accessibilityNode.css"); |
| 181 treeOutline.registerRequiredCSS("components/objectValue.css"); | 190 treeOutline.registerRequiredCSS("components/objectValue.css"); |
| 182 | 191 |
| 183 treeOutline.element.classList.add("hidden"); | 192 treeOutline.element.classList.add("hidden"); |
| 184 this.element.appendChild(treeOutline.element); | 193 this.element.appendChild(treeOutline.element); |
| 185 return treeOutline; | 194 return treeOutline; |
| 186 }, | 195 }, |
| 187 | 196 |
| 188 __proto__: WebInspector.SidebarPane.prototype | 197 __proto__: WebInspector.SidebarPane.prototype |
| 189 } | 198 } |
| OLD | NEW |