Unlike deselectAll, this will require an architectural change to Table so that uncached rows can be flagged as selected.
<rdar://problem/45029170>
Created attachment 354275 [details] Patch
Comment on attachment 354275 [details] Patch Attachment 354275 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9913683 New failing tests: inspector/table/table-selection.html
Created attachment 354281 [details] Archive of layout-test-results from ews100 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6
(In reply to Build Bot from comment #4) > Created attachment 354281 [details] > Archive of layout-test-results from ews100 for mac-sierra > > The attached test failures were seen while running run-webkit-tests on the > mac-ews. > Bot: ews100 Port: mac-sierra Platform: Mac OS X 10.12.6 Depends on https://bugs.webkit.org/show_bug.cgi?id=189718.
Comment on attachment 354275 [details] Patch Attachment 354275 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9914098 New failing tests: inspector/table/table-selection.html
Created attachment 354285 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 354275 [details] Patch Attachment 354275 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/9914115 New failing tests: inspector/table/table-selection.html
Created attachment 354287 [details] Archive of layout-test-results from ews117 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 354275 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354275&action=review > Source/WebInspectorUI/UserInterface/Views/Table.js:397 > + this._selectedRowIndex = this._selectedRows.size - 1; One interesting thing I noticed in Finder is that after selecting all items with ⌘A, shift-clicking will set the "anchor" as the middle item in the list. Not sure if we care about mirroring that, but it's something to consider. > Source/WebInspectorUI/UserInterface/Views/Table.js:1295 > + if (this._keyboardShortcutCommandA.matchesEvent(event)) { Creating a `WI.KeyboardShortcut` for the purpose of checking if it matches seems very wasteful. I'd rather you follow the approach of <https://webkit.org/b/191435> (once it lands).
Created attachment 354671 [details] Patch
Comment on attachment 354671 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354671&action=review r=me, one thing I'm "concerned" about is that ⌘-a will only work if the focused/receiving element is within the `WI.Table` (e.g. if the user tries to ⌘-a on the cookies view immediately after opening the tab, would it still select all?). It's fair to say that the owner of the `WI.Table` should be responsible for that, but we might want to think about how to make this better (assuming it's actually an issue). > Source/WebInspectorUI/UserInterface/Views/Table.js:1301 > + if (event.key === "a" && event.metaKey) { Please add a FIXME for `event.commandOrControlKey`, as this will not work right on non-mac platforms. > LayoutTests/inspector/table/table-selection.html:156 > + InspectorTest.expectEqual(table.selectedRows.length, 0, "Should have no selected rows."); I think this test would be more demonstrative if you had an initially selected row (e.g. 1), called `selectAll`, and then checked that the only selected row was the one initially selected (e.g. 1) > LayoutTests/inspector/table/table-selection.html:170 > + InspectorTest.expectEqual(table.selectedRows.length, table.numberOfRows, "Should have selected all rows."); Ditto (156), but you'd instead have the check that you have now
Created attachment 354687 [details] Patch for landing
Comment on attachment 354687 [details] Patch for landing Rejecting attachment 354687 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 354687, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Fetching: https://bugs.webkit.org/attachment.cgi?id=354687&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=190299&ctype=xml&excludefield=attachmentdata Processing 1 patch from 1 bug. Processing patch 354687 from bug 190299. Fetching: https://bugs.webkit.org/attachment.cgi?id=354687 Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Parsed 5 diffs from patch file(s). patching file Source/WebInspectorUI/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/WebInspectorUI/UserInterface/Views/Table.js Hunk #2 FAILED at 1298. 1 out of 2 hunks FAILED -- saving rejects to file Source/WebInspectorUI/UserInterface/Views/Table.js.rej patching file LayoutTests/ChangeLog patching file LayoutTests/inspector/table/table-selection-expected.txt patching file LayoutTests/inspector/table/table-selection.html Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: https://webkit-queues.webkit.org/results/9975717
Created attachment 354688 [details] Patch for landing
Comment on attachment 354688 [details] Patch for landing Clearing flags on attachment: 354688 Committed r238140: <https://trac.webkit.org/changeset/238140>
All reviewed patches have been landed. Closing bug.