Bug 65551 - Web Inspector: use source-file-replaced instead of source-file-changed event.
Summary: Web Inspector: use source-file-replaced instead of source-file-changed event.
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 Podivilov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 11:04 PDT by Pavel Podivilov
Modified: 2011-08-11 05:21 PDT (History)
10 users (show)

See Also:


Attachments
Patch (14.98 KB, patch)
2011-08-02 11:08 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Patch (31.82 KB, patch)
2011-08-04 08:54 PDT, Pavel Podivilov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2011-08-02 11:04:33 PDT
Web Inspector: use source-file-replaced instead of source-file-changed event.

This is needed to support 1 -> n transitions when installing source mappings.
Comment 1 Pavel Podivilov 2011-08-02 11:08:46 PDT
Created attachment 102667 [details]
Patch
Comment 2 Pavel Feldman 2011-08-04 02:47:00 PDT
Comment on attachment 102667 [details]
Patch

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

> Source/WebCore/inspector/front-end/ScriptsPanel.js:651
> +        this._sourceFileIdToFilesSelectOption[newSourceFile.id];

this._sourceFileIdToFilesSelectOption[newSourceFile.id] = option;

Test?

> Source/WebCore/inspector/front-end/ScriptsPanel.js:662
> +        var newSourceFrame = this._createSourceFrame(newSourceFile.id);

You should keep mapping bind/unbind close in the same location.

> Source/WebCore/inspector/front-end/SourceFile.js:63
> +            this._resource = WebInspector.networkManager.inflightResourceForURL(script.sourceURL) || WebInspector.resourceForURL(script.sourceURL);

Do we have a test that would track resource / script bindings?
Comment 3 Pavel Podivilov 2011-08-04 08:54:46 PDT
Created attachment 102922 [details]
Patch
Comment 4 Pavel Podivilov 2011-08-04 08:56:51 PDT
(In reply to comment #2)
> (From update of attachment 102667 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=102667&action=review
> 
> > Source/WebCore/inspector/front-end/ScriptsPanel.js:651
> > +        this._sourceFileIdToFilesSelectOption[newSourceFile.id];
> 
> this._sourceFileIdToFilesSelectOption[newSourceFile.id] = option;
> 
> Test?

Added test to scripts-panel.html.

> 
> > Source/WebCore/inspector/front-end/ScriptsPanel.js:662
> > +        var newSourceFrame = this._createSourceFrame(newSourceFile.id);
> 
> You should keep mapping bind/unbind close in the same location.

Done.

> 
> > Source/WebCore/inspector/front-end/SourceFile.js:63
> > +            this._resource = WebInspector.networkManager.inflightResourceForURL(script.sourceURL) || WebInspector.resourceForURL(script.sourceURL);
> 
> Do we have a test that would track resource / script bindings?

There are test that dump source frame content, they will definitely failed if script -> resource binding is broken. I'm going to add some more dedicated tests while switching to RawSourceCode<->UISourceCode model.
Comment 5 Pavel Podivilov 2011-08-11 05:21:22 PDT
Committed r92838: <http://trac.webkit.org/changeset/92838>