Diff
Modified: trunk/Source/WebCore/ChangeLog (89349 => 89350)
--- trunk/Source/WebCore/ChangeLog 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/ChangeLog 2011-06-21 13:25:07 UTC (rev 89350)
@@ -1,3 +1,36 @@
+2011-06-21 Pavel Feldman <[email protected]>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: rename editScriptSource to setScriptSource.
+ https://bugs.webkit.org/show_bug.cgi?id=63059
+
+ * bindings/js/ScriptDebugServer.cpp:
+ (WebCore::ScriptDebugServer::setScriptSource):
+ * bindings/js/ScriptDebugServer.h:
+ * bindings/v8/DebuggerScript.js:
+ ():
+ * bindings/v8/ScriptDebugServer.cpp:
+ (WebCore::ScriptDebugServer::setScriptSource):
+ * bindings/v8/ScriptDebugServer.h:
+ * inspector/Inspector.json:
+ * inspector/InspectorDebuggerAgent.cpp:
+ (WebCore::InspectorDebuggerAgent::setScriptSource):
+ * inspector/InspectorDebuggerAgent.h:
+ * inspector/front-end/DebuggerModel.js:
+ (WebInspector.DebuggerModel.prototype.setScriptSource):
+ * inspector/front-end/DebuggerPresentationModel.js:
+ (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didReceiveSource):
+ (WebInspector.DebuggerPresentationModel.prototype.setScriptSource):
+ (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent):
+ * inspector/front-end/Script.js:
+ (WebInspector.Script.prototype.editSource):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype.editContent):
+ (WebInspector.SourceFrameDelegate.prototype.setScriptSource):
+
2011-06-21 Vsevolod Vlasov <[email protected]>
Reviewed by Pavel Feldman.
Modified: trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp (89349 => 89350)
--- trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp 2011-06-21 13:25:07 UTC (rev 89350)
@@ -190,7 +190,7 @@
m_doneProcessingDebuggerEvents = true;
}
-bool ScriptDebugServer::editScriptSource(const String&, const String&, bool, String*, ScriptValue*, ScriptObject*)
+bool ScriptDebugServer::setScriptSource(const String&, const String&, bool, String*, ScriptValue*, ScriptObject*)
{
// FIXME(40300): implement this.
return false;
Modified: trunk/Source/WebCore/bindings/js/ScriptDebugServer.h (89349 => 89350)
--- trunk/Source/WebCore/bindings/js/ScriptDebugServer.h 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/bindings/js/ScriptDebugServer.h 2011-06-21 13:25:07 UTC (rev 89350)
@@ -80,7 +80,7 @@
void stepOverStatement();
void stepOutOfFunction();
- bool editScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, ScriptValue* newCallFrames, ScriptObject* result);
+ bool setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, ScriptValue* newCallFrames, ScriptObject* result);
void recompileAllJSFunctionsSoon();
virtual void recompileAllJSFunctions(Timer<ScriptDebugServer>* = 0) = 0;
Modified: trunk/Source/WebCore/bindings/v8/DebuggerScript.js (89349 => 89350)
--- trunk/Source/WebCore/bindings/v8/DebuggerScript.js 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/bindings/v8/DebuggerScript.js 2011-06-21 13:25:07 UTC (rev 89350)
@@ -173,7 +173,7 @@
execState.prepareStep(Debug.StepAction.StepOut, 1);
}
-DebuggerScript.editScriptSource = function(scriptId, newSource, preview)
+DebuggerScript.setScriptSource = function(scriptId, newSource, preview)
{
var scripts = Debug.scripts();
var scriptToEdit = null;
Modified: trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp (89349 => 89350)
--- trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp 2011-06-21 13:25:07 UTC (rev 89350)
@@ -212,7 +212,7 @@
continueProgram();
}
-bool ScriptDebugServer::editScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, ScriptValue* newCallFrames, ScriptObject* result)
+bool ScriptDebugServer::setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, ScriptValue* newCallFrames, ScriptObject* result)
{
ensureDebuggerScriptCompiled();
v8::HandleScope scope;
@@ -221,7 +221,7 @@
if (!isPaused())
contextScope = adoptPtr(new v8::Context::Scope(v8::Debug::GetDebugContext()));
- v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("editScriptSource")));
+ v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("setScriptSource")));
v8::Handle<v8::Value> argv[] = { v8String(sourceID), v8String(newContent), v8Boolean(preview) };
v8::TryCatch tryCatch;
Modified: trunk/Source/WebCore/bindings/v8/ScriptDebugServer.h (89349 => 89350)
--- trunk/Source/WebCore/bindings/v8/ScriptDebugServer.h 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/bindings/v8/ScriptDebugServer.h 2011-06-21 13:25:07 UTC (rev 89350)
@@ -74,7 +74,7 @@
void stepOverStatement();
void stepOutOfFunction();
- bool editScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, ScriptValue* newCallFrames, ScriptObject* result);
+ bool setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, ScriptValue* newCallFrames, ScriptObject* result);
void recompileAllJSFunctionsSoon() { }
void recompileAllJSFunctions(Timer<ScriptDebugServer>* = 0) { }
Modified: trunk/Source/WebCore/inspector/Inspector.json (89349 => 89350)
--- trunk/Source/WebCore/inspector/Inspector.json 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/inspector/Inspector.json 2011-06-21 13:25:07 UTC (rev 89350)
@@ -1488,7 +1488,7 @@
"description": "Resumes _javascript_ execution."
},
{
- "name": "editScriptSource",
+ "name": "setScriptSource",
"parameters": [
{ "name": "sourceId", "type": "string", "description": "Id of the script to edit." },
{ "name": "scriptSource", "type": "string", "description": "New content of the script." },
@@ -1498,7 +1498,7 @@
{ "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." },
{ "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied." }
],
- "description": "Edits _javascript_ script live."
+ "description": "Edits _javascript_ source live."
},
{
"name": "getScriptSource",
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp (89349 => 89350)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp 2011-06-21 13:25:07 UTC (rev 89350)
@@ -295,11 +295,11 @@
return value->asObject();
}
-void InspectorDebuggerAgent::editScriptSource(ErrorString* error, const String& sourceId, const String& newContent, const bool* const preview, RefPtr<InspectorArray>* newCallFrames, RefPtr<InspectorObject>* result)
+void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& sourceId, const String& newContent, const bool* const preview, RefPtr<InspectorArray>* newCallFrames, RefPtr<InspectorObject>* result)
{
bool previewOnly = preview && *preview;
ScriptObject resultObject;
- if (!scriptDebugServer().editScriptSource(sourceId, newContent, previewOnly, error, &m_currentCallStack, &resultObject))
+ if (!scriptDebugServer().setScriptSource(sourceId, newContent, previewOnly, error, &m_currentCallStack, &resultObject))
return;
*newCallFrames = currentCallFrames();
RefPtr<InspectorObject> object = scriptToInspectorObject(resultObject);
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h (89349 => 89350)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2011-06-21 13:25:07 UTC (rev 89350)
@@ -85,7 +85,7 @@
void removeBreakpoint(ErrorString*, const String& breakpointId);
void continueToLocation(ErrorString*, PassRefPtr<InspectorObject> location);
- void editScriptSource(ErrorString*, const String& sourceId, const String& newContent, const bool* const preview, RefPtr<InspectorArray>* newCallFrames, RefPtr<InspectorObject>* result);
+ void setScriptSource(ErrorString*, const String& sourceId, const String& newContent, const bool* const preview, RefPtr<InspectorArray>* newCallFrames, RefPtr<InspectorObject>* result);
void getScriptSource(ErrorString*, const String& sourceId, String* scriptSource);
void schedulePauseOnNextStatement(DebuggerEventType type, PassRefPtr<InspectorValue> data);
void cancelPauseOnNextStatement();
Modified: trunk/Source/WebCore/inspector/front-end/DebuggerModel.js (89349 => 89350)
--- trunk/Source/WebCore/inspector/front-end/DebuggerModel.js 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerModel.js 2011-06-21 13:25:07 UTC (rev 89350)
@@ -145,7 +145,7 @@
return scripts;
},
- editScriptSource: function(sourceId, newSource, callback)
+ setScriptSource: function(sourceId, newSource, callback)
{
this._scripts[sourceId].editSource(newSource, this._didEditScriptSource.bind(this, sourceId, newSource, callback));
},
Modified: trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js (89349 => 89350)
--- trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2011-06-21 13:25:07 UTC (rev 89350)
@@ -181,7 +181,7 @@
return !script.lineOffset && !script.columnOffset;
},
- editScriptSource: function(sourceFileId, newSource, callback)
+ setScriptSource: function(sourceFileId, newSource, callback)
{
var script = this._scriptForSourceFileId(sourceFileId);
var sourceFile = this._sourceFiles[sourceFileId];
@@ -205,7 +205,7 @@
var oldSource = sourceFile.requestContent(didReceiveSource.bind(this));
function didReceiveSource(oldSource)
{
- WebInspector.debuggerModel.editScriptSource(script.sourceId, newSource, didEditScriptSource.bind(this, oldSource));
+ WebInspector.debuggerModel.setScriptSource(script.sourceId, newSource, didEditScriptSource.bind(this, oldSource));
}
},
@@ -817,7 +817,7 @@
sourceFile.reload();
}
}
- this._presentationModel.editScriptSource(sourceFile.id, content, callback.bind(this));
+ this._presentationModel.setScriptSource(sourceFile.id, content, callback.bind(this));
}
}
Modified: trunk/Source/WebCore/inspector/front-end/Script.js (89349 => 89350)
--- trunk/Source/WebCore/inspector/front-end/Script.js 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/inspector/front-end/Script.js 2011-06-21 13:25:07 UTC (rev 89350)
@@ -60,6 +60,6 @@
this._source = newSource;
callback(error, callFrames);
}
- DebuggerAgent.editScriptSource(this.sourceId, newSource, didEditScriptSource.bind(this));
+ DebuggerAgent.setScriptSource(this.sourceId, newSource, didEditScriptSource.bind(this));
}
}
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (89349 => 89350)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2011-06-21 13:25:07 UTC (rev 89350)
@@ -1121,9 +1121,9 @@
return this._model.canEditScriptSource(this._sourceFileId);
},
- editScriptSource: function(text, callback)
+ setScriptSource: function(text, callback)
{
- this._model.editScriptSource(this._sourceFileId, text, callback);
+ this._model.setScriptSource(this._sourceFileId, text, callback);
},
setScriptSourceIsBeingEdited: function(inEditMode)
Modified: trunk/Source/WebCore/inspector/front-end/SourceFrame.js (89349 => 89350)
--- trunk/Source/WebCore/inspector/front-end/SourceFrame.js 2011-06-21 13:00:47 UTC (rev 89349)
+++ trunk/Source/WebCore/inspector/front-end/SourceFrame.js 2011-06-21 13:25:07 UTC (rev 89350)
@@ -948,7 +948,7 @@
editContent: function(newContent, callback)
{
- this._delegate.editScriptSource(newContent, callback);
+ this._delegate.setScriptSource(newContent, callback);
},
cancelEditing: function()
@@ -1014,7 +1014,7 @@
return false;
},
- editScriptSource: function(text, callback)
+ setScriptSource: function(text, callback)
{
// Should be implemented by subclasses.
},