Bug 190362

Summary: Web Inspector: REGRESSION: selection in network table is lost when new entries are added
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=189705
Bug Depends on:    
Bug Blocks: 190330    
Attachments:
Description Flags
Patch none

Description Devin Rousso 2018-10-08 11:27:22 PDT
* STEPS TO REPRODUCE:
1. Inspect <https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_fmp4/master.m3u8>
2. Open the Network tab
3. Refresh the page
4. Select an entry in the network table
5. Play the video (should add another entry to the end of the table)
 => Selection is lost

From what I can tell, it seems that this is caused by the fact that the `WI.Table` in the `WI.NetworkTableContentView` has its `layout()` call _after_ it's "owner" `WI.NetworkTableContentView`.  Since the manager of the selected row is the `WI.NetworkTableContentView`, the `WI.Table` has no idea about what it is or how to restore it.  As such, when the `WI.Table` calls `layout()` the selection styling is lost, even though `WI.NetworkTableContentView` still has a reference to the selected row.

Possibly a regression from r236853 <https://webkit.org/b/189705>.
Comment 1 Devin Rousso 2018-10-10 11:32:20 PDT
Created attachment 351975 [details]
Patch
Comment 2 Matt Baker 2018-10-10 13:25:12 PDT
Comment on attachment 351975 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/Table.js:241
> +        this._selectedRowIndex = NaN;

Oops, good catch!
Comment 3 WebKit Commit Bot 2018-10-10 13:52:22 PDT
Comment on attachment 351975 [details]
Patch

Clearing flags on attachment: 351975

Committed r237016: <https://trac.webkit.org/changeset/237016>
Comment 4 WebKit Commit Bot 2018-10-10 13:52:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-10-10 13:53:34 PDT
<rdar://problem/45171654>