Bug 86604

Summary: Web Inspector: Move edit/save script source logic to JavaScriptSource.
Product: WebKit Reporter: Vsevolod Vlasov <vsevik>
Component: Web Inspector (Deprecated)Assignee: Vsevolod Vlasov <vsevik>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch pfeldman: review+

Description Vsevolod Vlasov 2012-05-16 03:07:00 PDT
Patch to follow.
Comment 1 Vsevolod Vlasov 2012-05-16 04:40:58 PDT
Created attachment 142223 [details]
Patch
Comment 2 Pavel Feldman 2012-05-16 05:05:48 PDT
Comment on attachment 142223 [details]
Patch

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

> Source/WebCore/inspector/front-end/DebuggerResourceBinding.js:47
>  WebInspector.DebuggerResourceBinding.canEditScriptSource = function(uiSourceCode)

Thsi method should no longer exist.

> Source/WebCore/inspector/front-end/JavaScriptSource.js:172
> +        return WebInspector.DebuggerResourceBinding.canEditScriptSource(this) && this._isEditable;

just inline it.

> Source/WebCore/inspector/front-end/NavigatorView.js:59
> +    this._boundUISourceCodeWorkingCopyChanged = this._uiSourceCodeWorkingCopyChanged.bind(this);

You don't have to bind methods for removing them, just use the "listener, this)" notation.

> Source/WebCore/inspector/front-end/TabbedEditorContainer.js:67
> +    this._boundUISourceCodeWorkingCopyChanged = this._uiSourceCodeWorkingCopyChanged.bind(this);

ditto
Comment 3 Vsevolod Vlasov 2012-05-16 05:40:42 PDT
Committed r117269: <http://trac.webkit.org/changeset/117269>