Bug 193808 - REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit mode
Summary: REGRESSION(?): Web Inspector: Can have multiple Timelines selected after edit...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-24 19:17 PST by Joseph Pecoraro
Modified: 2019-01-28 11:53 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.64 KB, patch)
2019-01-27 19:24 PST, Matt Baker
no flags Details | Formatted Diff | Diff
Patch (3.40 KB, patch)
2019-01-28 11:16 PST, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.