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

Unified Diff: Source/devtools/front_end/settings/SettingsScreen.js

Issue 413213003: DevTools: Support Blackbox/Disabled options in framework blackboxing UI dialog. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 5 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 | « Source/devtools/front_end/settings/FrameworkBlackboxDialog.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/settings/SettingsScreen.js
diff --git a/Source/devtools/front_end/settings/SettingsScreen.js b/Source/devtools/front_end/settings/SettingsScreen.js
index 6a6402c754c69b5086a70c596588cdb425d117d6..5bc3b54a00a99c1590a3e2311984902876bcd780 100644
--- a/Source/devtools/front_end/settings/SettingsScreen.js
+++ b/Source/devtools/front_end/settings/SettingsScreen.js
@@ -695,7 +695,7 @@ WebInspector.SettingsList = function(columns, itemRenderer)
this.element.tabIndex = -1;
this._itemRenderer = itemRenderer;
/** @type {!Object.<?string, !Element>} */
- this._listItems = {};
+ this._listItems = { __proto__: null };
/** @type {!Array.<?string>} */
this._ids = [];
this._columns = columns;
@@ -763,7 +763,8 @@ WebInspector.SettingsList.prototype = {
*/
removeItem: function(id)
{
- this._listItems[id].remove();
+ if (this._listItems[id])
+ this._listItems[id].remove();
delete this._listItems[id];
this._ids.remove(id);
if (id === this._selectedId) {
@@ -895,6 +896,30 @@ WebInspector.EditableSettingsList.prototype = {
},
/**
+ * @param {?string} itemId
+ */
+ refreshItem: function(itemId)
+ {
+ if (!itemId)
+ return;
+ var listItem = this._listItems[itemId];
+ if (!listItem)
+ return;
+ for (var i = 0; i < this._columns.length; ++i) {
+ var column = this._columns[i];
+ var columnId = column.id;
+
+ var value = this._valuesProvider(itemId, columnId);
+ var textElement = this._textElements[itemId][columnId];
+ textElement.textContent = value;
+ textElement.title = value;
+
+ var editElement = this._editInputElements[itemId][columnId];
+ this._setEditElementValue(editElement, value || "");
+ }
+ },
+
+ /**
* @param {!Element} columnElement
* @param {{id: string, placeholder: (string|undefined), options: (!Array.<string>|undefined)}} column
* @param {?string} itemId
« no previous file with comments | « Source/devtools/front_end/settings/FrameworkBlackboxDialog.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698