.
<rdar://problem/23504427>
SUMMARY: * 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. STEPS TO REPRODUCE: * 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 EXPECTED: * Content view should show the first eligible resource in the debugger sidebar. ACTUAL: * Nothing in the sidebar is selected, the main content view is empty.
Notes: * 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.
Created attachment 265334 [details] Patch
Comment on attachment 265334 [details] Patch This sounds good to me. It seems a bit arbitrary, but better than a blank view!
Comment on attachment 265334 [details] Patch Clearing flags on attachment: 265334 Committed r192344: <http://trac.webkit.org/changeset/192344>
All reviewed patches have been landed. Closing bug.