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

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

Issue 2734943004: DevTools: Fix previous cookie selection (Closed)
Patch Set: premature upload Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5076c466d9a33def4af8e24e4d10536769232541..3c11c51e8176024f7a5a50542c69544a71bdec2d 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
@@ -135,9 +135,13 @@ CookieTable.CookiesTable = class extends UI.VBox {
*/
_getSelectionCookies() {
var node = this._dataGrid.selectedNode;
- var neighbor = node && (node.traverseNextNode(true) || node.traversePreviousNode(true));
+ var nextNeighbor = node && node.traverseNextNode(true);
+ var previousNeighbor = node && node.traversePreviousNode(true);
- return {current: node && node.cookie, neighbor: neighbor && neighbor.cookie};
+ return {
+ current: node && node.cookie,
+ neighbor: (nextNeighbor && nextNeighbor.cookie) || (previousNeighbor && previousNeighbor.cookie)
+ };
}
/**
« 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