Bug 151149 - Web Inspector: blank debugger tab when opening inspector on unvisited website
Summary: Web Inspector: blank debugger tab when opening inspector on unvisited website
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: BJ Burg
Keywords: InRadar
Depends on:
Reported: 2015-11-11 12:52 PST by BJ Burg
Modified: 2015-11-11 19:13 PST (History)
8 users (show)

See Also:

Patch (3.07 KB, patch)
2015-11-11 16:27 PST, BJ Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2015-11-11 12:52:19 PST
Comment 1 Radar WebKit Bug Importer 2015-11-11 12:52:31 PST
Comment 2 BJ Burg 2015-11-11 13:26:35 PST

* Sometimes we don't show anything in the main content view of Debugger tab, even when there are resources in the sidebar that could be shown.


* Open the inspector on any page, select the Debugger Tab.
* Close the inspector
* Navigate to a page for which the inspector has never been opened
* Open the inspector


* Content view should show the first eligible resource in the debugger sidebar.


* Nothing in the sidebar is selected, the main content view is empty.
Comment 3 BJ Burg 2015-11-11 15:03:28 PST

 * It seems that at the time when we try to show default content (WebInspector.contentLoaded calls shown() on the active tab), there are no eligible resources added to the tree. So, showDefaultContentView finds no tree elements it can show.

There are two options I see:

 1. inside finalAttemptToRestoreViewStateFromCookie, call showDefaultContentView again if the cookie is empty. This would show some view after the final attempt timeout, which is 300ms or so.

 2. when we add tree elements to the DebuggerSidebarPanel, if there's nothing being shown and there's no cookie pending for restore, show it as the default content.
Comment 4 BJ Burg 2015-11-11 16:27:20 PST
Created attachment 265334 [details]
Comment 5 Joseph Pecoraro 2015-11-11 17:17:13 PST
Comment on attachment 265334 [details]

This sounds good to me. It seems a bit arbitrary, but better than a blank view!
Comment 6 WebKit Commit Bot 2015-11-11 19:13:39 PST
Comment on attachment 265334 [details]

Clearing flags on attachment: 265334

Committed r192344: <http://trac.webkit.org/changeset/192344>
Comment 7 WebKit Commit Bot 2015-11-11 19:13:44 PST
All reviewed patches have been landed.  Closing bug.