Web Inspector: Implement snippets evaluation.
authorvsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 12:51:57 +0000 (12:51 +0000)
committervsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 12:51:57 +0000 (12:51 +0000)
commita13a32772a355dd26da78937fb681c3917a7e720
tree1b9d3eadbff22f3e26ecc19b4e1ae14319d3e601
parentc4b84bbb9b17439ff87334970b1391a821f39c06
Web Inspector: Implement snippets evaluation.
https://bugs.webkit.org/show_bug.cgi?id=88707

Reviewed by Pavel Feldman.

Source/WebCore:

Implemented snippet evaluation and adjusted breakpoints behavior when editing snippet.
Snippets are evaluated using separate compile and run.
Breakpoints are updated after compilation (once scriptId is available they can be set in debugger).
If separate compile and run is not supported by port or debugger is paused we fall back to evaluation in console.

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.runScript.runCallback):
(WebInspector.ConsoleView.prototype.runScript):
(WebInspector.ConsoleView.prototype._printResult):
* inspector/front-end/JavaScriptSource.js:
(WebInspector.JavaScriptSource.prototype.supportsEnabledBreakpointsWhileEditing):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
(WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
(WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
(WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointsBeforeEditing):
(WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
(WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
(WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.ScriptSnippetModel.prototype.deleteScriptSnippet):
(WebInspector.ScriptSnippetModel.prototype._setScriptSnippetContent):
(WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.compileCallback):
(WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet):
(WebInspector.ScriptSnippetModel.prototype._rawLocationToUILocation):
(WebInspector.ScriptSnippetModel.prototype._removeBreakpoints):
(WebInspector.ScriptSnippetModel.prototype._restoreBreakpoints):
(WebInspector.ScriptSnippetModel.prototype._evaluationSourceURL):
(WebInspector.SnippetJavaScriptSource.prototype.isDivergedFromVM):
(WebInspector.SnippetJavaScriptSource.prototype.workingCopyCommitted):
(WebInspector.SnippetJavaScriptSource.prototype.workingCopyChanged):
(WebInspector.SnippetJavaScriptSource.prototype.evaluate):
(WebInspector.SnippetJavaScriptSource.prototype.supportsEnabledBreakpointsWhileEditing):
(WebInspector.SnippetJavaScriptSource.prototype.breakpointStorageId):
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):

LayoutTests:

* inspector/debugger/script-snippet-model-expected.txt:
* inspector/debugger/script-snippet-model.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/debugger/script-snippet-model-expected.txt
LayoutTests/inspector/debugger/script-snippet-model.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/ScriptDebugServer.cpp
Source/WebCore/inspector/front-end/ConsoleView.js
Source/WebCore/inspector/front-end/JavaScriptSource.js
Source/WebCore/inspector/front-end/JavaScriptSourceFrame.js
Source/WebCore/inspector/front-end/ScriptSnippetModel.js
Source/WebCore/inspector/front-end/ScriptsNavigator.js
Source/WebCore/inspector/front-end/externs.js