Bug 47892

Summary: Web Inspector: do not access ResourcePanel from resources directly.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, commit-queue, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed change. none

Description Pavel Feldman 2010-10-19 02:15:26 PDT
We should either update panel externally or make it listen to resources.
Comment 1 Pavel Feldman 2010-10-19 02:46:55 PDT
Created attachment 71147 [details]
[PATCH] Proposed change.
Comment 2 Yury Semikhatsky 2010-10-19 03:01:56 PDT
Comment on attachment 71147 [details]
[PATCH] Proposed change.

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

Nice change.

> WebCore/inspector/front-end/ResourcesPanel.js:1078
> +                return resourceView.__proto__ === WebInspector.SourceView.prototype;

Why not check for (resourceView instanceof WebInspector.SourceView) instead?

> WebCore/inspector/front-end/ResourcesPanel.js:1080
> +                return resourceView.__proto__ === WebInspector.ImageView.prototype;

ditto

> WebCore/inspector/front-end/ResourcesPanel.js:1082
> +                return resourceView.__proto__ === WebInspector.FontView.prototype;

ditto

> WebCore/inspector/front-end/ResourcesPanel.js:1084
> +                return resourceView.__proto__ === WebInspector.ResourceView.prototype;

ditto
Comment 3 Pavel Feldman 2010-10-19 03:07:43 PDT
(In reply to comment #2)
> (From update of attachment 71147 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=71147&action=review
> 
> Nice change.
> 
> > WebCore/inspector/front-end/ResourcesPanel.js:1078
> > +                return resourceView.__proto__ === WebInspector.SourceView.prototype;
> 
> Why not check for (resourceView instanceof WebInspector.SourceView) instead?
> 

instanceof ResourceView would be true for all of them and I don't want that...
Comment 4 WebKit Commit Bot 2010-10-19 03:35:55 PDT
Comment on attachment 71147 [details]
[PATCH] Proposed change.

Clearing flags on attachment: 71147

Committed r70045: <http://trac.webkit.org/changeset/70045>
Comment 5 WebKit Commit Bot 2010-10-19 03:36:00 PDT
All reviewed patches have been landed.  Closing bug.