Bug 170036 - Web Inspector: Adding a WebSocket message may change the currently selected resource
Summary: Web Inspector: Adding a WebSocket message may change the currently selected r...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
Keywords: InRadar
Depends on:
Reported: 2017-03-23 16:46 PDT by Nikita Vasilyev
Modified: 2017-03-24 16:44 PDT (History)
3 users (show)

See Also:

[Animated GIF] Bug (235.26 KB, image/gif)
2017-03-23 16:46 PDT, Nikita Vasilyev
no flags Details
Patch (2.25 KB, patch)
2017-03-24 13:52 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2017-03-23 16:46:04 PDT
Created attachment 305243 [details]
[Animated GIF] Bug

1. Open Network tab.
2. Navigate to http://www.websocket.org/echo.html.
3. On this web page, click "Connect" button.
4. In the Network left sidebar, select "echo.websocket.org" by clicking the right arrow icon right next to it.
5. On the web page, click "Send" to send a Web Socket message.

Some seemingly random resource get selected.

"echo.websocket.org" is still the selected resource.

To reproduce this, you must have more than one resource visible in the Network sidebar.
Comment 1 Radar WebKit Bug Importer 2017-03-23 16:46:19 PDT
Comment 2 Nikita Vasilyev 2017-03-23 16:58:15 PDT
Exception that happens at the same time:

[Error] Unknown tree element – undefined
	_treeSelectionDidChange (NetworkGridContentView.js:372)
	dispatch (Object.js:170)
	dispatchEventToListeners (Object.js:177)
	deselect (TreeElement.js:543)
	removeChildAtIndex (TreeOutline.js:244)
	removeChild (TreeOutline.js:285)
	_refreshDirtyDataGridNodes (TimelineDataGrid.js:272)
	--- requestAnimationFrame ---
        dataGridNodeNeedsRefresh (TimelineDataGrid.js:198)
        _needsRefresh (ResourceTimelineDataGridNode.js:270)
        dispatch (Object.js:170)
        dispatchEventToListeners (Object.js:177)
        increaseSize (Resource.js:602)
        addFrame (WebSocketsResource.js:67)
Comment 3 Nikita Vasilyev 2017-03-24 12:12:56 PDT
Something happens in WebInspector.TimelineDataGrid that this.selectedNode no longer corresponds to an actual selected node.

Also, resource selection changes for every resource, not just a WebSocket type, when increaseSize gets called. This is just wasn't as noticeable for other resource types.
Comment 4 Nikita Vasilyev 2017-03-24 13:52:47 PDT
Created attachment 305322 [details]
Comment 5 Joseph Pecoraro 2017-03-24 14:05:28 PDT
Comment on attachment 305322 [details]

Comment 6 WebKit Commit Bot 2017-03-24 16:43:59 PDT
Comment on attachment 305322 [details]

Clearing flags on attachment: 305322

Committed r214387: <http://trac.webkit.org/changeset/214387>
Comment 7 WebKit Commit Bot 2017-03-24 16:44:04 PDT
All reviewed patches have been landed.  Closing bug.