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

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

Issue 2174863003: DevTools: traverse widget hierarchy to reveal views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 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 b525281bd5b032f4a800385af50e97e07704487a..25c78783bdc2e03f2ccc93c167822f16333698d1 100644
--- a/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
+++ b/third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilitySidebarView.js
@@ -11,7 +11,10 @@ WebInspector.AccessibilitySidebarView = function()
WebInspector.ThrottledView.call(this, WebInspector.UIString("Accessibility"));
this._axNodeSubPane = null;
this._node = null;
- this._sidebarPaneStack = null;
+ this._sidebarPaneStack = new WebInspector.View.ExpandableStackContainer();
+ this._axNodeSubPane = new WebInspector.AXNodeSubPane();
+ this._sidebarPaneStack.appendView(this._axNodeSubPane, true);
+ this._sidebarPaneStack.show(this.element);
WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, this._pullNode, this);
this._pullNode();
}
@@ -53,16 +56,7 @@ WebInspector.AccessibilitySidebarView.prototype = {
{
WebInspector.ThrottledView.prototype.wasShown.call(this);
- if (!this._sidebarPaneStack) {
- this._axNodeSubPane = new WebInspector.AXNodeSubPane();
- this._axNodeSubPane.setNode(this.node());
- this._axNodeSubPane.show(this.element);
-
- this._sidebarPaneStack = new WebInspector.SidebarPaneStack();
- this._sidebarPaneStack.element.classList.add("flex-auto");
- this._sidebarPaneStack.show(this.element);
- this._sidebarPaneStack.addPane(this._axNodeSubPane);
- }
+ this._axNodeSubPane.setNode(this.node());
WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.AttrModified, this._onAttrChange, this);
WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspector.DOMModel.Events.AttrRemoved, this._onAttrChange, this);
@@ -84,8 +78,7 @@ WebInspector.AccessibilitySidebarView.prototype = {
_pullNode: function()
{
this._node = WebInspector.context.flavor(WebInspector.DOMNode);
- if (this._axNodeSubPane)
- this._axNodeSubPane.setNode(this._node);
+ this._axNodeSubPane.setNode(this._node);
this.update();
},
@@ -164,7 +157,7 @@ WebInspector.AccessibilitySubPane.prototype = {
*/
createInfo: function(textContent, className)
{
- var classNameOrDefault = className || "info";
+ var classNameOrDefault = className || "gray-info-message";
var info = this.element.createChild("div", classNameOrDefault);
info.textContent = textContent;
return info;

Powered by Google App Engine
This is Rietveld 408576698