Bug 152627 - Web Inspector: Scroll position in Network tab is lost
Summary: Web Inspector: Scroll position in Network tab is lost
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-12-31 14:54 PST by Saam Barati
Modified: 2016-12-13 15:32 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2015-12-31 14:54:06 PST
When viewing the Timelines view for "JavaScript & Events", and pressing the right arrow on a particular function name, we're taken to the "Resources" tab.
Then, when re-selecting the timelines tab, the scroll position is lost. This is particularly painful when you're digging deep in a stack trace.
Comment 1 Radar WebKit Bug Importer 2015-12-31 14:54:19 PST
<rdar://problem/24029669>
Comment 2 Radar WebKit Bug Importer 2015-12-31 14:54:41 PST
<rdar://problem/24029670>
Comment 3 Matt Baker 2016-01-01 16:54:43 PST
(In reply to comment #0)
> When viewing the Timelines view for "JavaScript & Events", and pressing the
> right arrow on a particular function name, we're taken to the "Resources"
> tab.

The resource view should open in the timeline recording content view. It shouldn't jump to the Resources tab.

> Then, when re-selecting the timelines tab, the scroll position is lost. This
> is particularly painful when you're digging deep in a stack trace.

I reproduced this by clicking the "back" button in the navigation bar to return to the script timeline after navigating to the resource. Interestingly, the scroll position is only lost when using the go-to arrow in the Location grid column. The arrow in the Records tree doesn't seem to have this problem.
Comment 4 Matt Baker 2016-01-01 17:22:27 PST
The goto arrows in the tree and grid have different click event handlers. Each eventually call WebInspector.showSourceCode, but with slightly different arguments. Should have a patch soon.
Comment 5 Matt Baker 2016-01-01 18:31:05 PST
(In reply to comment #4)
> The goto arrows in the tree and grid have different click event handlers.
> Each eventually call WebInspector.showSourceCode, but with slightly
> different arguments. Should have a patch soon.

Actually both handlers end up calling WebInspector.showSourceCode with identical arguments. The problem is that click the arrow in the tree causes a tree element to be selected, causing TreeOutline.processingSelectionChange to be true when the ContentBrowserTabContentView processes the changing content view. When the flag is true, it returns early.

When clicking the goto arrow from the grid, the flag will not be set, and ContentBrowserTabContentView handles the changing content view notification. The first tree element with a represented object matching that the new content view is selected, causing the tree selection to change.

Not only can this cause the root tree element of a call stack to get selected, but a different call stack in the same resource can be selected.
Comment 6 Timothy Hatcher 2016-01-04 10:08:47 PST
Good debugging! Seems like this will go away soon with the new timeline tab view architecture (and the removal of the sidebar tree and data grid.) Though, does this affect Network tab (which won't get the same timeline changes)?