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

Unified Diff: chrome/browser/resources/certificate_viewer.js

Issue 8028024: Expose use-more-webui flag in chrome://flags and tweak cert viewer WebUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply flackr CR feedback Created 9 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 | « chrome/browser/resources/certificate_viewer.css ('k') | chrome/browser/ui/webui/certificate_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/certificate_viewer.js
diff --git a/chrome/browser/resources/certificate_viewer.js b/chrome/browser/resources/certificate_viewer.js
index b683ca7dfd948594ea3d97a192968a59cdde34e4..7e1a5f84d0fafc9000ff89ffe686627fd817de46 100644
--- a/chrome/browser/resources/certificate_viewer.js
+++ b/chrome/browser/resources/certificate_viewer.js
@@ -79,9 +79,17 @@ cr.define('cert_viewer', function() {
*/
function createCertificateHierarchy(hierarchy) {
var treeItem = $('hierarchy');
- treeItem.add(treeItem.detail.children['root'] =
- constructTree(hierarchy[0]));
- revealTree(treeItem);
+ var root = constructTree(hierarchy[0]);
+ treeItem.detail.children['root'] = root;
+ treeItem.add(root);
+
+ // Select the last item in the hierarchy (really we have a list here - each
+ // node has at most one child). This will reveal the parent nodes and
+ // populate the fields view.
+ var last = root;
+ while (last.detail.children && last.detail.children[0])
+ last = last.detail.children[0];
+ last.selected = true;
}
/**
@@ -137,6 +145,8 @@ cr.define('cert_viewer', function() {
treeItem.add(treeItem.detail.children['root'] =
constructTree(certFields[0]));
revealTree(treeItem);
+ // Ensure the list is scrolled to the top by selecting the first item.
+ treeItem.children[0].selected = true;
}
/**
« no previous file with comments | « chrome/browser/resources/certificate_viewer.css ('k') | chrome/browser/ui/webui/certificate_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698