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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js

Issue 2414793006: DevTools: Make Security panel show all SANs if there are 3 of them. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.PanelWithSidebar} 7 * @extends {WebInspector.PanelWithSidebar}
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.SecurityPanel = function() 10 WebInspector.SecurityPanel = function()
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 * *return {!Element} 961 * *return {!Element}
962 */ 962 */
963 _createSanDiv: function(sanList) 963 _createSanDiv: function(sanList)
964 { 964 {
965 var sanDiv = createElement("div"); 965 var sanDiv = createElement("div");
966 if (sanList.length === 0) { 966 if (sanList.length === 0) {
967 sanDiv.textContent = WebInspector.UIString("(N/A)"); 967 sanDiv.textContent = WebInspector.UIString("(N/A)");
968 sanDiv.classList.add("empty-san"); 968 sanDiv.classList.add("empty-san");
969 } else { 969 } else {
970 var truncatedNumToShow = 2; 970 var truncatedNumToShow = 2;
971 var listIsTruncated = sanList.length > truncatedNumToShow; 971 var listIsTruncated = sanList.length > truncatedNumToShow + 1;
972 for (var i = 0; i < sanList.length; i++) { 972 for (var i = 0; i < sanList.length; i++) {
973 var span = sanDiv.createChild("span", "san-entry"); 973 var span = sanDiv.createChild("span", "san-entry");
974 span.textContent = sanList[i]; 974 span.textContent = sanList[i];
975 if (listIsTruncated && i >= truncatedNumToShow) 975 if (listIsTruncated && i >= truncatedNumToShow)
976 span.classList.add("truncated-entry"); 976 span.classList.add("truncated-entry");
977 } 977 }
978 if (listIsTruncated) { 978 if (listIsTruncated) {
979 var truncatedSANToggle = sanDiv.createChild("div", "link"); 979 var truncatedSANToggle = sanDiv.createChild("div", "link");
980 truncatedSANToggle.href = ""; 980 truncatedSANToggle.href = "";
981 981
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 row.createChild("div").textContent = key; 1041 row.createChild("div").textContent = key;
1042 1042
1043 var valueDiv = row.createChild("div"); 1043 var valueDiv = row.createChild("div");
1044 if (typeof value === "string") { 1044 if (typeof value === "string") {
1045 valueDiv.textContent = value; 1045 valueDiv.textContent = value;
1046 } else { 1046 } else {
1047 valueDiv.appendChild(value); 1047 valueDiv.appendChild(value);
1048 } 1048 }
1049 } 1049 }
1050 } 1050 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698