Chromium Code Reviews| Index: chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| diff --git a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| index 0763e803229157efe31ac345b5c7ac00a1530b7c..5831dccdb6a97654f9c6be3dc577f368f10567ff 100644 |
| --- a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| +++ b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| @@ -166,6 +166,9 @@ cr.define('settings', function() { |
| var id = siteEntry.data_.id; |
| var description = ''; |
| + if (siteEntry.children_.length == 0) |
| + continue; |
| + |
| for (var j = 0; j < siteEntry.children_.length; ++j) { |
| var descriptionNode = siteEntry.children_[j]; |
| if (j > 0) |
| @@ -227,6 +230,7 @@ cr.define('settings', function() { |
| */ |
| addCookieData: function(root, item) { |
| var fields = cookieInfo[item.data_.type]; |
| + var first = true; |
| for (var field of fields) { |
| // Iterate through the keys found in |cookieInfo| for the given |type| |
| // and see if those keys are present in the data. If so, display them |
| @@ -236,11 +240,22 @@ cr.define('settings', function() { |
| var label = loadTimeData.getString(field[1]); |
| var header = document.createElement('div'); |
| + if (!first) { |
| + header.style.cssText += |
| + 'border-top: 1px solid rgba(0, 0, 0, 0.14);' + |
| + 'margin-top: 7px;' + |
| + 'padding-top: 7px;'; |
|
Finnur
2016/10/05 13:42:22
I'd like to do the styling in the html section for
dschuyler
2016/10/05 22:04:02
Let's call the above Option A.
Here's Option B:
Finnur
2016/10/07 15:16:42
I love it. Done.
|
| + } |
| header.appendChild(document.createTextNode(label)); |
| + |
| var content = document.createElement('div'); |
| + content.style.cssText += |
| + 'color: var(--settings-secondary_-_color);' + |
| + 'margin-top: 3px;'; |
| content.appendChild(document.createTextNode(item.data_[key])); |
| root.appendChild(header); |
| root.appendChild(content); |
| + first = false; |
| } |
| } |
| }, |