| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |