| 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 { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 wasShown: function() | 52 wasShown: function() |
| 53 { | 53 { |
| 54 WebInspector.ThrottledWidget.prototype.wasShown.call(this); | 54 WebInspector.ThrottledWidget.prototype.wasShown.call(this); |
| 55 | 55 |
| 56 if (!this._sidebarPaneStack) { | 56 if (!this._sidebarPaneStack) { |
| 57 this._axNodeSubPane = new WebInspector.AXNodeSubPane(); | 57 this._axNodeSubPane = new WebInspector.AXNodeSubPane(); |
| 58 this._axNodeSubPane.setNode(this.node()); | 58 this._axNodeSubPane.setNode(this.node()); |
| 59 this._axNodeSubPane.show(this.element); | 59 this._axNodeSubPane.show(this.element); |
| 60 this._axNodeSubPane.expand(); | 60 this._axNodeSubPane.expand(); |
| 61 | 61 |
| 62 this._ariaSubPane = new WebInspector.AXARIAAttributesSubPane(); |
| 63 this._ariaSubPane.setNode(this.node()); |
| 64 this._ariaSubPane.show(this.element); |
| 65 this._ariaSubPane.expand(); |
| 66 |
| 62 this._sidebarPaneStack = new WebInspector.SidebarPaneStack(); | 67 this._sidebarPaneStack = new WebInspector.SidebarPaneStack(); |
| 63 this._sidebarPaneStack.element.classList.add("flex-auto"); | 68 this._sidebarPaneStack.element.classList.add("flex-auto"); |
| 64 this._sidebarPaneStack.show(this.element); | 69 this._sidebarPaneStack.show(this.element); |
| 70 this._sidebarPaneStack.addPane(this._ariaSubPane); |
| 65 this._sidebarPaneStack.addPane(this._axNodeSubPane); | 71 this._sidebarPaneStack.addPane(this._axNodeSubPane); |
| 66 } | 72 } |
| 67 | 73 |
| 68 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn
spector.DOMModel.Events.AttrModified, this._onAttrChange, this); | 74 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); | 75 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); | 76 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); | 77 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebIn
spector.DOMModel.Events.ChildNodeCountUpdated, this._onNodeChange, this); |
| 72 }, | 78 }, |
| 73 | 79 |
| 74 /** | 80 /** |
| 75 * @override | 81 * @override |
| 76 */ | 82 */ |
| 77 willHide: function() | 83 willHide: function() |
| 78 { | 84 { |
| 79 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We
bInspector.DOMModel.Events.AttrModified, this._onAttrChange, this); | 85 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); | 86 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); | 87 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); | 88 WebInspector.targetManager.removeModelListener(WebInspector.DOMModel, We
bInspector.DOMModel.Events.ChildNodeCountUpdated, this._onNodeChange, this); |
| 83 }, | 89 }, |
| 84 | 90 |
| 85 _pullNode: function() | 91 _pullNode: function() |
| 86 { | 92 { |
| 87 this._node = WebInspector.context.flavor(WebInspector.DOMNode); | 93 this._node = WebInspector.context.flavor(WebInspector.DOMNode); |
| 88 if (this._axNodeSubPane) | 94 if (this._axNodeSubPane) |
| 89 this._axNodeSubPane.setNode(this._node); | 95 this._axNodeSubPane.setNode(this._node); |
| 96 if (this._ariaSubPane) |
| 97 this._ariaSubPane.setNode(this._node); |
| 90 this.update(); | 98 this.update(); |
| 91 }, | 99 }, |
| 92 | 100 |
| 93 /** | 101 /** |
| 94 * @param {!WebInspector.Event} event | 102 * @param {!WebInspector.Event} event |
| 95 */ | 103 */ |
| 96 _onAttrChange: function(event) | 104 _onAttrChange: function(event) |
| 97 { | 105 { |
| 98 if (!this.node()) | 106 if (!this.node()) |
| 99 return; | 107 return; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 treeOutline.registerRequiredCSS("accessibility/accessibilityNode.css"); | 188 treeOutline.registerRequiredCSS("accessibility/accessibilityNode.css"); |
| 181 treeOutline.registerRequiredCSS("components/objectValue.css"); | 189 treeOutline.registerRequiredCSS("components/objectValue.css"); |
| 182 | 190 |
| 183 treeOutline.element.classList.add("hidden"); | 191 treeOutline.element.classList.add("hidden"); |
| 184 this.element.appendChild(treeOutline.element); | 192 this.element.appendChild(treeOutline.element); |
| 185 return treeOutline; | 193 return treeOutline; |
| 186 }, | 194 }, |
| 187 | 195 |
| 188 __proto__: WebInspector.SidebarPane.prototype | 196 __proto__: WebInspector.SidebarPane.prototype |
| 189 } | 197 } |
| OLD | NEW |