| Index: third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
|
| index cd80be00fa12244b1725e54004a570e47b786ed1..4ab1af40b729698f28e7f01cfe35c9d7392f1ef0 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
|
| @@ -11,6 +11,8 @@ WebInspector.AccessibilitySidebarView = function()
|
| WebInspector.ThrottledWidget.call(this);
|
| this._node = null;
|
| this._sidebarPaneStack = WebInspector.viewManager.createStackLocation();
|
| + this._treeSubPane = new WebInspector.AXTreePane();
|
| + this._sidebarPaneStack.showView(this._treeSubPane);
|
| this._ariaSubPane = new WebInspector.ARIAAttributesPane();
|
| this._sidebarPaneStack.showView(this._ariaSubPane);
|
| this._axNodeSubPane = new WebInspector.AXNodeSubPane();
|
| @@ -30,25 +32,38 @@ WebInspector.AccessibilitySidebarView.prototype = {
|
| },
|
|
|
| /**
|
| + * @param {?Array<!AccessibilityAgent.AXNode>} nodes
|
| + */
|
| + accessibilityNodeCallback: function(nodes)
|
| + {
|
| + if (!nodes)
|
| + return;
|
| +
|
| + var currentAXNode = nodes[0];
|
| + if (currentAXNode.ignored)
|
| + this._ariaSubPane.parentWidget().contentElement.classList.add("sidebar-hidden-override");
|
| + else
|
| + this._ariaSubPane.parentWidget().contentElement.classList.remove("sidebar-hidden-override");
|
| +
|
| + if (this._axNodeSubPane)
|
| + this._axNodeSubPane.setAXNode(currentAXNode);
|
| + if (this._treeSubPane)
|
| + this._treeSubPane.setAXNodeAndAncestors(nodes);
|
| + },
|
| +
|
| + /**
|
| * @override
|
| * @protected
|
| * @return {!Promise.<?>}
|
| */
|
| doUpdate: function()
|
| {
|
| - /**
|
| - * @param {?AccessibilityAgent.AXNode} accessibilityNode
|
| - * @this {WebInspector.AccessibilitySidebarView}
|
| - */
|
| - function accessibilityNodeCallback(accessibilityNode)
|
| - {
|
| - if (this._axNodeSubPane)
|
| - this._axNodeSubPane.setAXNode(accessibilityNode);
|
| - }
|
| var node = this.node();
|
| + this._treeSubPane.setNode(node);
|
| + this._axNodeSubPane.setNode(node);
|
| this._ariaSubPane.setNode(node);
|
| - return WebInspector.AccessibilityModel.fromTarget(node.target()).getAXNode(node.id)
|
| - .then(accessibilityNodeCallback.bind(this));
|
| + return WebInspector.AccessibilityModel.fromTarget(node.target()).getAXNodeChain(node.id)
|
| + .then((nodes) => { this.accessibilityNodeCallback(nodes); });
|
| },
|
|
|
| /**
|
| @@ -58,6 +73,7 @@ WebInspector.AccessibilitySidebarView.prototype = {
|
| {
|
| WebInspector.ThrottledWidget.prototype.wasShown.call(this);
|
|
|
| + this._treeSubPane.setNode(this.node());
|
| this._axNodeSubPane.setNode(this.node());
|
| this._ariaSubPane.setNode(this.node());
|
|
|
|
|