Bug 71848 - Web Inspector: ResourcesPanel should support adding subtitle to any BaseStorageTreeElement.
Summary: Web Inspector: ResourcesPanel should support adding subtitle to any BaseStora...
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: Vsevolod Vlasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-08 12:47 PST by Vsevolod Vlasov
Modified: 2011-11-09 03:58 PST (History)
10 users (show)

See Also:


Attachments
Patch (4.53 KB, patch)
2011-11-08 12:50 PST, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch (5.35 KB, patch)
2011-11-08 13:41 PST, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch (5.47 KB, patch)
2011-11-08 13:43 PST, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff
Patch (6.27 KB, patch)
2011-11-09 02:24 PST, Vsevolod Vlasov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vsevolod Vlasov 2011-11-08 12:47:37 PST
ResourcesPanel should support adding subtitle to any BaseStorageTreeElement.
Comment 1 Vsevolod Vlasov 2011-11-08 12:50:32 PST
Created attachment 114139 [details]
Patch
Comment 2 Vsevolod Vlasov 2011-11-08 12:51:24 PST
We will need that to create tree elements for frames with particular application cache manifest.
Comment 3 Vsevolod Vlasov 2011-11-08 13:41:01 PST
Created attachment 114146 [details]
Patch
Comment 4 Vsevolod Vlasov 2011-11-08 13:43:58 PST
Created attachment 114147 [details]
Patch
Comment 5 Pavel Feldman 2011-11-08 20:52:09 PST
Comment on attachment 114147 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=114147&action=review

> Source/WebCore/inspector/front-end/ResourcesPanel.js:870
> +        this._updateTitles();

I know why you are setting titles when element is in the tree, but you could 'force' it and do it before.

> Source/WebCore/inspector/front-end/ResourcesPanel.js:929
> +        this._updateTitles();

So the common sequence below is at risk of creating title element twice?:
treeElement.titleText = "foo";
treeElement.subtitleText = "bar";

I would manage title setters separately: title setter only changes its text, while preserving the subtitle + subtitle lazily creates / updates subtitle element. And you have to force both on attach.
Comment 6 Vsevolod Vlasov 2011-11-09 02:24:54 PST
Created attachment 114227 [details]
Patch
Comment 7 Vsevolod Vlasov 2011-11-09 03:58:18 PST
Committed r99686: <http://trac.webkit.org/changeset/99686>