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

Unified Diff: third_party/WebKit/Source/devtools/front_end/audits/AuditsPanel.js

Issue 2366613003: [DevTools] Focus sidebar trees in certain panels by default. (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/audits/AuditsPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/audits/AuditsPanel.js b/third_party/WebKit/Source/devtools/front_end/audits/AuditsPanel.js
index 6e32b4a8a93bbc966389896820f0ad4348f6cd5b..30de90baedbbb47f6085c91787aad19206b6fe75 100644
--- a/third_party/WebKit/Source/devtools/front_end/audits/AuditsPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/audits/AuditsPanel.js
@@ -38,19 +38,18 @@ WebInspector.AuditsPanel = function()
this.registerRequiredCSS("ui/panelEnablerView.css");
this.registerRequiredCSS("audits/auditsPanel.css");
- var sidebarTree = new TreeOutlineInShadow();
- sidebarTree.registerRequiredCSS("audits/auditsSidebarTree.css");
- this.panelSidebarElement().appendChild(sidebarTree.element);
- this.setDefaultFocusedElement(sidebarTree.element);
+ this._sidebarTree = new TreeOutlineInShadow();
+ this._sidebarTree.registerRequiredCSS("audits/auditsSidebarTree.css");
+ this.panelSidebarElement().appendChild(this._sidebarTree.element);
this._auditsItemTreeElement = new WebInspector.AuditsSidebarTreeElement(this);
- sidebarTree.appendChild(this._auditsItemTreeElement);
+ this._sidebarTree.appendChild(this._auditsItemTreeElement);
this._auditResultsTreeElement = new TreeElement(WebInspector.UIString("RESULTS"), true);
this._auditResultsTreeElement.selectable = false;
this._auditResultsTreeElement.listItemElement.classList.add("audits-sidebar-results");
this._auditResultsTreeElement.expand();
- sidebarTree.appendChild(this._auditResultsTreeElement);
+ this._sidebarTree.appendChild(this._auditResultsTreeElement);
this._constructCategories();
@@ -168,6 +167,14 @@ WebInspector.AuditsPanel.prototype = {
this._auditsItemTreeElement.select();
},
+ /**
+ * @override
+ */
+ focus: function()
+ {
+ this._sidebarTree.focus();
einbinder 2016/09/22 22:48:24 Why not this.setDefaultFocusedChild(this.splitWidg
dgozman 2016/09/23 00:43:09 I see two problems in that: - we call setDefaultFo
+ },
+
clearResults: function()
{
this._auditsItemTreeElement.revealAndSelect();
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698