Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js

Issue 2351443003: Revert of Show ancestor hierarchy in accessibility panel (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 bacd9672ab4b8dbe0d162bb3993945c3f5252053..cd80be00fa12244b1725e54004a570e47b786ed1 100644
--- a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
+++ b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
@@ -11,8 +11,6 @@
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();
@@ -32,39 +30,25 @@
},
/**
- * @param {?Array<!AccessibilityAgent.AXNode>} nodes
- */
- accessibilityNodeCallback: function(nodes)
- {
- if (!nodes)
- return;
-
- var currentAXNode = nodes[0];
- // TODO(aboxhall): implement hideView() in WebInspector.ViewLocation and use it here.
- 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()).getAXNodeChain(node.id)
- .then((nodes) => { this.accessibilityNodeCallback(nodes); });
+ return WebInspector.AccessibilityModel.fromTarget(node.target()).getAXNode(node.id)
+ .then(accessibilityNodeCallback.bind(this));
},
/**
@@ -74,7 +58,6 @@
{
WebInspector.ThrottledWidget.prototype.wasShown.call(this);
- this._treeSubPane.setNode(this.node());
this._axNodeSubPane.setNode(this.node());
this._ariaSubPane.setNode(this.node());

Powered by Google App Engine
This is Rietveld 408576698