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

Unified Diff: third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js

Issue 2662403002: [DevTools] Merge filter bar with the main toolbar (Closed)
Patch Set: [DevTools] Merge filter bar with the main toolbar Created 3 years, 11 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
Index: third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js
diff --git a/third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js b/third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js
index a8b16f56638bfea74b8b2437b873ebfa0f4f94b9..b815a91a2f00499210b7c8c9e7643dd9520220c4 100644
--- a/third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js
+++ b/third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js
@@ -65,16 +65,14 @@ CookieTable.CookiesTable = class extends UI.VBox {
editable: !this._readOnly
},
{id: 'domain', title: Common.UIString('Domain'), sortable: true, weight: 7, editable: !this._readOnly},
- {id: 'path', title: Common.UIString('Path'), sortable: true, weight: 7, editable: !this._readOnly},
- {
+ {id: 'path', title: Common.UIString('Path'), sortable: true, weight: 7, editable: !this._readOnly}, {
id: 'expires',
title: Common.UIString('Expires / Max-Age'),
sortable: true,
weight: 7,
editable: !this._readOnly
},
- {id: 'size', title: Common.UIString('Size'), sortable: true, align: DataGrid.DataGrid.Align.Right, weight: 7},
- {
+ {id: 'size', title: Common.UIString('Size'), sortable: true, align: DataGrid.DataGrid.Align.Right, weight: 7}, {
id: 'httpOnly',
title: Common.UIString('HTTP'),
sortable: true,
@@ -100,7 +98,8 @@ CookieTable.CookiesTable = class extends UI.VBox {
if (this._readOnly) {
this._dataGrid = new DataGrid.DataGrid(columns);
} else {
- this._dataGrid = new DataGrid.DataGrid(columns, this._onUpdateCookie.bind(this), this._onDeleteCookie.bind(this), refreshCallback);
+ this._dataGrid = new DataGrid.DataGrid(
+ columns, this._onUpdateCookie.bind(this), this._onDeleteCookie.bind(this), refreshCallback);
this._dataGrid.setRowContextMenuCallback(this._onRowContextMenu.bind(this));
}
@@ -166,6 +165,20 @@ CookieTable.CookiesTable = class extends UI.VBox {
return node ? node.cookie : null;
}
+ selectFirstCookie() {
+ if (!this._dataGrid || this._dataGrid.rootNode().children.length === 0)
dgozman 2017/02/03 20:54:53 nit: !.....length
eostroukhov 2017/02/03 22:59:25 Done.
+ return;
+ this._dataGrid.rootNode().children[0].select();
+ }
+
+ /**
+ * @override
+ */
+ focus() {
+ if (this._dataGrid)
+ this._dataGrid.element.focus();
+ }
+
/**
* @param {?string=} domain
*/
@@ -447,7 +460,8 @@ CookieTable.CookiesTable = class extends UI.VBox {
* @returns {boolean}
*/
_isValidCookieData(data) {
- return (data.name || data.value) && this._isValidDomain(data.domain) && this._isValidPath(data.path) && this._isValidDate(data.expires);
+ return (data.name || data.value) && this._isValidDomain(data.domain) && this._isValidPath(data.path) &&
+ this._isValidDate(data.expires);
}
/**
@@ -485,4 +499,4 @@ CookieTable.CookiesTable = class extends UI.VBox {
};
/** @const */
-CookieTable.CookiesTable._expiresSessionValue = Common.UIString('Session');
+CookieTable.CookiesTable._expiresSessionValue = Common.UIString('Session');

Powered by Google App Engine
This is Rietveld 408576698