Bug 37875

Summary: Web Inspector: add basic script editing capabilities to the front-end.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, joepeck, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed change. timothy: review+

Description Pavel Feldman 2010-04-20 11:30:18 PDT
This also contains a PoC implementation for the Chromium.
Comment 1 Timothy Hatcher 2010-04-20 11:35:17 PDT
Why only PoC for Chromium?
Comment 2 Pavel Feldman 2010-04-20 11:36:32 PDT
Created attachment 53856 [details]
[PATCH] Proposed change.
Comment 3 Yury Semikhatsky 2010-04-20 11:46:58 PDT
Comment on attachment 53856 [details]
[PATCH] Proposed change.

> +    canEditScripts: function()
> +    {
> +        return !!InspectorBackend.editScriptLine;
> +    },
> +
> +    editScriptLine: function(sourceID, line, newContent, callback)
> +    {
> +        if (!this.canEditScripts())
> +            return;
> +        var callbackId = WebInspector.Callback.wrap(callback)
> +        InspectorBackend.editScriptLine(callbackId, sourceID, line, newContent);
> +    },
> +
Consider inlining these methods.
Comment 4 Pavel Feldman 2010-04-20 13:19:18 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/bindings/js/ScriptDebugServer.cpp
	M	WebCore/inspector/front-end/ScriptView.js
	M	WebCore/inspector/front-end/ScriptsPanel.js
	M	WebCore/inspector/front-end/SourceFrame.js
	M	WebCore/inspector/front-end/TextEditorHighlighter.js
	M	WebCore/inspector/front-end/TextEditorModel.js
	M	WebCore/inspector/front-end/TextViewer.js
	M	WebCore/inspector/front-end/inspector.js
	M	WebKit/chromium/ChangeLog
	M	WebKit/chromium/src/js/DebuggerAgent.js
	M	WebKit/chromium/src/js/DevTools.js
	M	WebKit/chromium/src/js/InspectorControllerImpl.js
Committed r57909