Web Inspector: Cookies table needs copy keyboard shortcut and context menu support
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 21:06:52 +0000 (21:06 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 21:06:52 +0000 (21:06 +0000)
commitc0ba79cc749983705609167ae9b56ed9dbc6c872
treebb17c20b19df6251e98b6d56f0b040c5c6833517
parentfaffcf420d99943c5bffb39fdff9ff393dfd4c4e
Web Inspector: Cookies table needs copy keyboard shortcut and context menu support
https://bugs.webkit.org/show_bug.cgi?id=191482
<rdar://problem/45953002>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CookieStorageContentView.js:
(WI.CookieStorageContentView.prototype.handleCopyEvent):
(WI.CookieStorageContentView.prototype.tableCellContextMenuClicked):
As with Delete, if the target row is selected, all selected rows are copied.
Otherwise only the target row is copied. This distinction will be surfaced
in the UI in https://webkit.org/b/191095.

(WI.CookieStorageContentView.prototype.tablePopulateCell):
(WI.CookieStorageContentView.prototype._cookiesAtIndexes):
(WI.CookieStorageContentView.prototype._formatCookiesAsText):
(WI.CookieStorageContentView.prototype._formatCookiePropertyForColumn):
(WI.CookieStorageContentView):
Break Cookie property formatting into a helper method, which is used for
formatting Table cells and creating plain text for the clipboard.

* UserInterface/Views/Table.js:
(WI.Table.prototype.get columns):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js
Source/WebInspectorUI/UserInterface/Views/Table.js