2010-08-09 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Aug 2010 05:50:52 +0000 (05:50 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Aug 2010 05:50:52 +0000 (05:50 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: Remove obsolete JS wrappers for did* methods.
        https://bugs.webkit.org/show_bug.cgi?id=43738

        * inspector/CodeGeneratorInspector.pm:
        * inspector/Inspector.idl:
        * inspector/front-end/BreakpointManager.js:
        * inspector/front-end/Callback.js:
        * inspector/front-end/ConsoleView.js:
        * inspector/front-end/DOMAgent.js:
        * inspector/front-end/DOMStorage.js:
        * inspector/front-end/Database.js:
        * inspector/front-end/InjectedScriptAccess.js:
        * inspector/front-end/ProfilesPanel.js:
        * inspector/front-end/ResourcesPanel.js:
        * inspector/front-end/ScriptView.js:
        * inspector/front-end/ScriptsPanel.js:
        * inspector/front-end/inspector.js:
        (WebInspector.reportProtocolError):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
WebCore/ChangeLog
WebCore/inspector/CodeGeneratorInspector.pm
WebCore/inspector/Inspector.idl
WebCore/inspector/front-end/BreakpointManager.js
WebCore/inspector/front-end/Callback.js
WebCore/inspector/front-end/ConsoleView.js
WebCore/inspector/front-end/DOMAgent.js
WebCore/inspector/front-end/DOMStorage.js
WebCore/inspector/front-end/Database.js
WebCore/inspector/front-end/InjectedScriptAccess.js
WebCore/inspector/front-end/ProfilesPanel.js
WebCore/inspector/front-end/ResourcesPanel.js
WebCore/inspector/front-end/ScriptView.js
WebCore/inspector/front-end/ScriptsPanel.js
WebCore/inspector/front-end/inspector.js

index 3ca240b..518c7f8 100644 (file)
@@ -1,3 +1,26 @@
+2010-08-09  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: Remove obsolete JS wrappers for did* methods.
+        https://bugs.webkit.org/show_bug.cgi?id=43738
+
+        * inspector/CodeGeneratorInspector.pm:
+        * inspector/Inspector.idl:
+        * inspector/front-end/BreakpointManager.js:
+        * inspector/front-end/Callback.js:
+        * inspector/front-end/ConsoleView.js:
+        * inspector/front-end/DOMAgent.js:
+        * inspector/front-end/DOMStorage.js:
+        * inspector/front-end/Database.js:
+        * inspector/front-end/InjectedScriptAccess.js:
+        * inspector/front-end/ProfilesPanel.js:
+        * inspector/front-end/ResourcesPanel.js:
+        * inspector/front-end/ScriptView.js:
+        * inspector/front-end/ScriptsPanel.js:
+        * inspector/front-end/inspector.js:
+        (WebInspector.reportProtocolError):
+
 2010-08-09  Gavin Barraclough  <barraclough@apple.com>
 
         Qt build fix attempt VIII.
index d4a70fc..f46857a 100644 (file)
@@ -240,13 +240,7 @@ sub generateFrontendFunction
     my $notify = $function->signature->extendedAttributes->{"notify"};
     my $async = $function->signature->extendedAttributes->{"async"};
     return if !$async && !$notify;
-    my $functionName;
-    if ($notify) {
-        $functionName = $function->signature->name;
-    } else {
-        my $customResponse = $function->signature->extendedAttributes->{"customResponse"};
-        $functionName = $customResponse ? $customResponse : "did" . ucfirst($function->signature->name);
-    }
+    my $functionName = $notify ? $function->signature->name : "did" . ucfirst($function->signature->name);
 
     my @argsFiltered = grep($_->direction eq "out", @{$function->parameters}); # just keep only out parameters for frontend interface.
     unshift(@argsFiltered, $callId) if !$notify; # Add callId as the first argument for all frontend did* methods.
@@ -262,9 +256,10 @@ sub generateFrontendFunction
         push(@function, "void ${frontendClassName}::${functionName}(${arguments})");
         push(@function, "{");
         push(@function, "    RefPtr<InspectorArray> arguments = InspectorArray::create();");
-        push(@function, "    arguments->pushString(\"$functionName\");");
+        push(@function, "    arguments->pushString(\"" . ($notify ? $functionName : "processResponse") . "\");");
         push(@function, @pushArguments);
         push(@function, "    m_inspectorClient->sendMessageToFrontend(arguments->toJSONString());");
+
         push(@function, "}");
         push(@function, "");
         push(@frontendMethodsImpl, @function);
@@ -354,14 +349,12 @@ sub generateBackendFunction
     # The results of function call should be transfered back to frontend (except async methods - need to fix that).
     if (scalar(grep($_->name eq "callId", @inArgs)) && !$async) {
         my @pushArguments = map("        arguments->push" . $typeTransform{$_->type}->{"accessorSuffix"} . "(" . $_->name . ");", @outArgs);
-        my $customResponse = $function->signature->extendedAttributes->{"customResponse"};
-        my $didFunctionName = $customResponse ? $customResponse : "did" . ucfirst($function->signature->name);
 
         push(@function, "");
         push(@function, "    // use InspectorFrontend as a marker of WebInspector availability");
         push(@function, "    if (m_inspectorController->remoteInspectorFrontend()) {");
         push(@function, "        RefPtr<InspectorArray> arguments = InspectorArray::create();");
-        push(@function, "        arguments->pushString(\"$didFunctionName\");");
+        push(@function, "        arguments->pushString(\"processResponse\");");
         push(@function, "        arguments->pushNumber(callId);");
         push(@function, @pushArguments);
         push(@function, "        m_inspectorController->inspectorClient()->sendMessageToFrontend(arguments->toJSONString());");
index 4f643a2..d972bfe 100644 (file)
@@ -162,9 +162,9 @@ module core {
         [handler=Controller] void removeAllScriptsToEvaluateOnLoad();
 
         [handler=DOM] void getChildNodes(in long callId, in long nodeId);
-        [handler=DOM, customResponse=didApplyDomChange] void setAttribute(in long callId, in long elementId, in String name, in String value, out boolean success);
-        [handler=DOM, customResponse=didApplyDomChange] void removeAttribute(in long callId, in long elementId, in String name, out boolean success);
-        [handler=DOM, customResponse=didApplyDomChange] void setTextNodeValue(in long callId, in long nodeId, in String value, out boolean success);
+        [handler=DOM] void setAttribute(in long callId, in long elementId, in String name, in String value, out boolean success);
+        [handler=DOM] void removeAttribute(in long callId, in long elementId, in String name, out boolean success);
+        [handler=DOM] void setTextNodeValue(in long callId, in long nodeId, in String value, out boolean success);
         [handler=DOM] void getEventListenersForNode(in long callId, in long nodeId, out long outNodeId, out Array listenersArray);
         [handler=DOM] void copyNode(in long nodeId);
         [handler=DOM] void removeNode(in long callId, in long nodeId, out long outNodeId);
index 709a9c2..21fa6a4 100644 (file)
@@ -213,4 +213,3 @@ WebInspector.Breakpoint.prototype = {
 
 WebInspector.Breakpoint.prototype.__proto__ = WebInspector.Object.prototype;
 
-WebInspector.didSetBreakpoint = WebInspector.Callback.processCallback;
index c8ae03e..d8163fe 100644 (file)
@@ -42,7 +42,7 @@ WebInspector.Callback.prototype = {
         return callbackId;
     },
 
-    processCallback: function(callbackId, opt_vararg)
+    processResponse: function(callbackId, opt_vararg)
     {
         var args = Array.prototype.slice.call(arguments, 1);
         var callback = this._callbacks[callbackId];
@@ -50,7 +50,7 @@ WebInspector.Callback.prototype = {
         delete this._callbacks[callbackId];
     },
 
-    removeCallbackEntry: function(callbackId)
+    removeResponseCallbackEntry: function(callbackId)
     {
         delete this._callbacks[callbackId];
     }
@@ -58,5 +58,5 @@ WebInspector.Callback.prototype = {
 
 WebInspector.Callback._INSTANCE = new WebInspector.Callback();
 WebInspector.Callback.wrap = WebInspector.Callback._INSTANCE.wrap.bind(WebInspector.Callback._INSTANCE);
-WebInspector.Callback.processCallback = WebInspector.Callback._INSTANCE.processCallback.bind(WebInspector.Callback._INSTANCE);
-WebInspector.Callback.removeCallbackEntry = WebInspector.Callback._INSTANCE.removeCallbackEntry.bind(WebInspector.Callback._INSTANCE);
+WebInspector.processResponse = WebInspector.Callback._INSTANCE.processResponse.bind(WebInspector.Callback._INSTANCE);
+WebInspector.removeResponseCallbackEntry = WebInspector.Callback._INSTANCE.removeResponseCallbackEntry.bind(WebInspector.Callback._INSTANCE);
index e16c89e..6a4e0d3 100644 (file)
@@ -1128,4 +1128,3 @@ WebInspector.ConsoleGroup.prototype = {
     }
 }
 
-WebInspector.didClearConsoleMessages = WebInspector.Callback.processCallback;
index bcbe91e..c41d038 100644 (file)
@@ -681,29 +681,3 @@ WebInspector.childNodeRemoved = function()
     this.domAgent._childNodeRemoved.apply(this.domAgent, arguments);
 }
 
-WebInspector.didGetApplicationCaches = WebInspector.Callback.processCallback;
-WebInspector.didGetCookies = WebInspector.Callback.processCallback;
-WebInspector.didGetChildNodes = WebInspector.Callback.processCallback;
-WebInspector.didPerformSearch = WebInspector.Callback.processCallback;
-WebInspector.didApplyDomChange = WebInspector.Callback.processCallback;
-WebInspector.didRemoveAttribute = WebInspector.Callback.processCallback;
-WebInspector.didSetTextNodeValue = WebInspector.Callback.processCallback;
-WebInspector.didRemoveNode = WebInspector.Callback.processCallback;
-WebInspector.didChangeTagName = WebInspector.Callback.processCallback;
-WebInspector.didGetOuterHTML = WebInspector.Callback.processCallback;
-WebInspector.didSetOuterHTML = WebInspector.Callback.processCallback;
-WebInspector.didPushNodeByPathToFrontend = WebInspector.Callback.processCallback;
-WebInspector.didGetEventListenersForNode = WebInspector.Callback.processCallback;
-
-WebInspector.didGetStyles = WebInspector.Callback.processCallback;
-WebInspector.didGetAllStyles = WebInspector.Callback.processCallback;
-WebInspector.didGetStyleSheet = WebInspector.Callback.processCallback;
-WebInspector.didGetRuleRanges = WebInspector.Callback.processCallback;
-WebInspector.didGetInlineStyle = WebInspector.Callback.processCallback;
-WebInspector.didGetComputedStyle = WebInspector.Callback.processCallback;
-WebInspector.didApplyStyleText = WebInspector.Callback.processCallback;
-WebInspector.didSetStyleText = WebInspector.Callback.processCallback;
-WebInspector.didSetStyleProperty = WebInspector.Callback.processCallback;
-WebInspector.didToggleStyleEnabled = WebInspector.Callback.processCallback;
-WebInspector.didSetRuleSelector = WebInspector.Callback.processCallback;
-WebInspector.didAddRule = WebInspector.Callback.processCallback;
index c5f658d..5c28e29 100644 (file)
@@ -73,6 +73,3 @@ WebInspector.DOMStorage.prototype = {
     }
 }
 
-WebInspector.didGetDOMStorageEntries = WebInspector.Callback.processCallback;
-WebInspector.didSetDOMStorageItem = WebInspector.Callback.processCallback;
-WebInspector.didRemoveDOMStorageItem = WebInspector.Callback.processCallback;
index a0dc9ca..17ee4e6 100644 (file)
@@ -100,4 +100,3 @@ WebInspector.Database.prototype = {
     }
 }
 
-WebInspector.didGetDatabaseTableNames = WebInspector.Callback.processCallback;
index 59aa70c..ac28948 100644 (file)
@@ -89,4 +89,3 @@ InjectedScriptAccess._installHandler("setPropertyValue");
 // Mark them as asynchronous here.
 InjectedScriptAccess._installHandler("executeSql", true);
 
-WebInspector.didDispatchOnInjectedScript = WebInspector.Callback.processCallback;
index 911b1da..e5877d9 100644 (file)
@@ -627,5 +627,3 @@ WebInspector.ProfileGroupSidebarTreeElement.prototype = {
 
 WebInspector.ProfileGroupSidebarTreeElement.prototype.__proto__ = WebInspector.SidebarTreeElement.prototype;
 
-WebInspector.didGetProfileHeaders = WebInspector.Callback.processCallback;
-WebInspector.didGetProfile = WebInspector.Callback.processCallback;
index 4fda07b..9785644 100644 (file)
@@ -891,8 +891,6 @@ WebInspector.getResourceContent = function(identifier, callback)
     InspectorBackend.getResourceContent(WebInspector.Callback.wrap(callback), identifier);
 }
 
-WebInspector.didGetResourceContent = WebInspector.Callback.processCallback;
-
 WebInspector.ResourceTimeCalculator = function(startAtZero)
 {
     WebInspector.AbstractTimelineCalculator.call(this);
index 597fd28..5598577 100644 (file)
@@ -136,4 +136,3 @@ WebInspector.ScriptView.prototype = {
 
 WebInspector.ScriptView.prototype.__proto__ = WebInspector.View.prototype;
 
-WebInspector.didGetScriptSource = WebInspector.Callback.processCallback;
index 7826d2e..44c1dba 100644 (file)
@@ -1034,4 +1034,3 @@ WebInspector.ScriptsPanel.prototype = {
 
 WebInspector.ScriptsPanel.prototype.__proto__ = WebInspector.Panel.prototype;
 
-WebInspector.didEditScriptSource = WebInspector.Callback.processCallback;
index 7d630bb..4e8e633 100644 (file)
@@ -589,7 +589,7 @@ WebInspector.dispatchMessageFromBackend = function(arguments)
 WebInspector.reportProtocolError = function(callId, methodName, errorText)
 {
     WebInspector.log("InspectorBackend." + methodName + " failed with error text: '" + errorText + "'");
-    WebInspector.Callback.removeCallbackEntry(callId);
+    WebInspector.removeResponseCallbackEntry(callId);
 }
 
 WebInspector.windowResize = function(event)