Bug 37875 - Web Inspector: add basic script editing capabilities to the front-end.
Summary: Web Inspector: add basic script editing capabilities to the front-end.
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-04-20 11:30 PDT by Pavel Feldman
Modified: 2010-04-20 16:08 PDT (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed change. (20.03 KB, patch)
2010-04-20 11:36 PDT, Pavel Feldman
timothy: review+
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-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