Bug 47892 - Web Inspector: do not access ResourcePanel from resources directly.
Summary: Web Inspector: do not access ResourcePanel from resources directly.
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: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-19 02:15 PDT by Pavel Feldman
Modified: 2010-10-19 03:36 PDT (History)
11 users (show)

See Also:


Attachments
[PATCH] Proposed change. (9.52 KB, patch)
2010-10-19 02:46 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.