Bug 86604 - Web Inspector: Move edit/save script source logic to JavaScriptSource.
Summary: Web Inspector: Move edit/save script source logic to JavaScriptSource.
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: 2012-05-16 03:07 PDT by Vsevolod Vlasov
Modified: 2012-05-16 05:40 PDT (History)
10 users (show)

See Also:


Attachments
Patch (27.39 KB, patch)
2012-05-16 04:40 PDT, 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 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>