Bug 34861 - Web Inspector: Focusing a resource in the inspector should default to content not header
Summary: Web Inspector: Focusing a resource in the inspector should default to content...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-11 14:33 PST by Oliver Hunt
Modified: 2010-02-11 22:27 PST (History)
7 users (show)

See Also:


Attachments
[PATCH] Default to Content Tab (1.37 KB, patch)
2010-02-11 18:32 PST, Joseph Pecoraro
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2010-02-11 14:33:22 PST
When i focus a resource in the inspector I am vastly more likely to want to look at the content than i am to want to look at the header, given the inspecotr now shows the header by default i have got an unnecessary and extraneous additional step to make which did not exist in prior versions.
Comment 1 Timothy Hatcher 2010-02-11 14:40:02 PST
IIRC we remember the tab you last used and show that tab the next time.

If not we should.
Comment 2 Oliver Hunt 2010-02-11 14:42:46 PST
The first time i go to the resource it should go to the content -- once you've gone there you can save, the problem is the initial default.
Comment 3 Joseph Pecoraro 2010-02-11 18:32:31 PST
Created attachment 48603 [details]
[PATCH] Default to Content Tab

The initial default is "headers" (from Settings.js):

> this._installSetting("resourceViewTab", "resource-view-tab", "headers");

But the relevant code does look at the last user action (from ResourceView.js):

> _selectTab: function()
> {
>     if (this._headersVisible) {
>         if (WebInspector.settings.resourceViewTab === "headers")
>             this._selectHeadersTab();
>         else
>             this._selectContentTab();
>     } else
>         this._innerSelectContentTab();
> },

Sounds like we should just empty out the default, or change it to something like "content" to make it future proof for more tabs. Patch uses "content".
Comment 4 Timothy Hatcher 2010-02-11 19:50:32 PST
Comment on attachment 48603 [details]
[PATCH] Default to Content Tab

Joe!
Comment 5 Joseph Pecoraro 2010-02-11 21:15:47 PST
Committed r54702
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/Settings.js
r54702 = a589328be42f4ef10a80d756965b133ab5dc6687 (trunk)
Comment 6 Pavel Feldman 2010-02-11 22:27:03 PST
(In reply to comment #0)
> When i focus a resource in the inspector I am vastly more likely to want to
> look at the content than i am to want to look at the header, given the
> inspecotr now shows the header by default i have got an unnecessary and
> extraneous additional step to make which did not exist in prior versions.

I am not so sure about the "vastly more likely". I was considering the time panel as a tool for optimizing for the network. User should have all the meta-information such as query parameters, size, timing, headers under the tips of his fingers. We should provide enough information so that he would not even need to reach out for the content itself. Firebug is we me there.

Of course there are other scenarios such as navigating to the error source (Oliver submitted a separate bug on that, no question it should be fixed). And there is a scenario when you just browse resources and hence need their content since you are just exploring. Or you want to see if some resource has been updated (we should actually provide Cache info such as Firebug in that case).

What was your scenario, Oliver?

Wrt this bug. If we are making contents default, it makes sense to swap the tabs.