Bug 193808

Summary: REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, joepeck, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Joseph Pecoraro 2019-01-24 19:17:35 PST
REGRESSION: Can have multiple Timelines selected after edit mode

Steps to Reproduce:
1. Inspect this page
2. Show Timelines tab with multiple timelines
3. Select 1st timeline
4. Enter edit mode
  => No selection visible
5. Leave edit mode
  => Selection visible
6. Select 2nd timeline
  => Multiple timelines selected (unexpected)
Comment 1 Radar WebKit Bug Importer 2019-01-24 19:17:59 PST
<rdar://problem/47537734>
Comment 2 Matt Baker 2019-01-27 19:24:57 PST
Created attachment 360312 [details]
Patch
Comment 3 Devin Rousso 2019-01-28 10:58:56 PST
Comment on attachment 360312 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=360312&action=review

r=me, but I think we should write tests for patches that "fix a bug where...", so I'd like to see a test for this if possible

> Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:350
> +                treeOutline._selectionController.didRemoveItems(removedIndexes);

I'd personally rather have the early-return happen inside `didRemoveItems`.  Requiring the caller to know that you should only ever pass a non-null `WI.IndexSet` seems unnecessary, and is likely to be forgotten in the future.

Also, should we also be early-returning if `!removedIndexes.size`?
Comment 4 Matt Baker 2019-01-28 11:16:15 PST
Created attachment 360359 [details]
Patch
Comment 5 WebKit Commit Bot 2019-01-28 11:53:25 PST
Comment on attachment 360359 [details]
Patch

Clearing flags on attachment: 360359

Committed r240594: <https://trac.webkit.org/changeset/240594>
Comment 6 WebKit Commit Bot 2019-01-28 11:53:27 PST
All reviewed patches have been landed.  Closing bug.