Bug 190362 - Web Inspector: REGRESSION: selection in network table is lost when new entries are added
Summary: Web Inspector: REGRESSION: selection in network table is lost when new entrie...
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: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 190330
  Show dependency treegraph
 
Reported: 2018-10-08 11:27 PDT by Devin Rousso
Modified: 2018-10-10 13:53 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.82 KB, patch)
2018-10-10 11:32 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

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