Title: [97152] trunk/Source/WebCore
Revision
97152
Author
[email protected]
Date
2011-10-11 07:43:45 -0700 (Tue, 11 Oct 2011)

Log Message

Web Inspector: make Extensions component compile.
https://bugs.webkit.org/show_bug.cgi?id=69833

Reviewed by Yury Semikhatsky.

* inspector/compile-front-end.sh:
* inspector/front-end/BinarySearch.js:
* inspector/front-end/ConsoleModel.js:
* inspector/front-end/ExtensionAPI.js:
(injectedExtensionAPI.Network.prototype.addRequestHeaders):
(injectedExtensionAPI.AuditResultImpl.prototype.addResult):
(injectedExtensionAPI.AuditResultNode.prototype.addChild):
* inspector/front-end/ExtensionAuditCategory.js:
* inspector/front-end/ExtensionPanel.js:
(WebInspector.ExtensionSidebarPane.prototype.setExpression):
* inspector/front-end/ExtensionRegistryStub.js:
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._postNotification):
(WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
(WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
(WebInspector.ExtensionServer.prototype._registerExtension):
(WebInspector.ExtensionStatus):
* inspector/front-end/NetworkLog.js:
(WebInspector.NetworkLog.prototype._onResourceStarted):
* inspector/front-end/Object.js:
(WebInspector.Object.prototype.dispatchEventToListeners):
* inspector/front-end/externs.js:
(console.warn):
(console.assert):
(console.error):
():
(AuditResult):
(EventSink):
(ExtensionSidebarPane):
(Panel):
(PanelWithSidebar):
(Request):
(Resource):
(Timeline):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (97151 => 97152)


--- trunk/Source/WebCore/ChangeLog	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/ChangeLog	2011-10-11 14:43:45 UTC (rev 97152)
@@ -1,3 +1,45 @@
+2011-10-11  Pavel Feldman  <[email protected]>
+
+        Web Inspector: make Extensions component compile.
+        https://bugs.webkit.org/show_bug.cgi?id=69833
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/compile-front-end.sh:
+        * inspector/front-end/BinarySearch.js:
+        * inspector/front-end/ConsoleModel.js:
+        * inspector/front-end/ExtensionAPI.js:
+        (injectedExtensionAPI.Network.prototype.addRequestHeaders):
+        (injectedExtensionAPI.AuditResultImpl.prototype.addResult):
+        (injectedExtensionAPI.AuditResultNode.prototype.addChild):
+        * inspector/front-end/ExtensionAuditCategory.js:
+        * inspector/front-end/ExtensionPanel.js:
+        (WebInspector.ExtensionSidebarPane.prototype.setExpression):
+        * inspector/front-end/ExtensionRegistryStub.js:
+        * inspector/front-end/ExtensionServer.js:
+        (WebInspector.ExtensionServer.prototype._postNotification):
+        (WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
+        (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
+        (WebInspector.ExtensionServer.prototype._registerExtension):
+        (WebInspector.ExtensionStatus):
+        * inspector/front-end/NetworkLog.js:
+        (WebInspector.NetworkLog.prototype._onResourceStarted):
+        * inspector/front-end/Object.js:
+        (WebInspector.Object.prototype.dispatchEventToListeners):
+        * inspector/front-end/externs.js:
+        (console.warn):
+        (console.assert):
+        (console.error):
+        ():
+        (AuditResult):
+        (EventSink):
+        (ExtensionSidebarPane):
+        (Panel):
+        (PanelWithSidebar):
+        (Request):
+        (Resource):
+        (Timeline):
+
 2011-10-05  Pavel Podivilov  <[email protected]>
 
         Web Inspector: implement CompilerSourceMappingProvider.

Modified: trunk/Source/WebCore/inspector/compile-front-end.sh (97151 => 97152)


--- trunk/Source/WebCore/inspector/compile-front-end.sh	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/compile-front-end.sh	2011-10-11 14:43:45 UTC (rev 97152)
@@ -167,13 +167,23 @@
         --js Source/WebCore/inspector/front-end/AuditLauncherView.js \
         --js Source/WebCore/inspector/front-end/AuditResultView.js \
         --js Source/WebCore/inspector/front-end/AuditRules.js \
-        --js Source/WebCore/inspector/front-end/AuditsPanel.js
+        --js Source/WebCore/inspector/front-end/AuditsPanel.js \
+    --module jsmodule_extensions:5:jsmodule_components \
+        --js Source/WebCore/inspector/front-end/ExtensionAPI.js \
+        --js Source/WebCore/inspector/front-end/ExtensionAuditCategory.js \
+        --js Source/WebCore/inspector/front-end/ExtensionPanel.js \
+        --js Source/WebCore/inspector/front-end/ExtensionRegistryStub.js \
+        --js Source/WebCore/inspector/front-end/ExtensionServer.js \
+    --module jsmodule_inspector:1:jsmodule_components,jsmodule_extensions \
+        --js Source/WebCore/inspector/front-end/SettingsScreen.js \
+    --module jsmodule_tests:1:jsmodule_components \
+        --js Source/WebCore/inspector/front-end/TestController.js
+
 #     --module jsmodule_tokenizers:3:jsmodule_components \
 #        --js Source/WebCore/inspector/front-end/SourceCSSTokenizer.js \
 #        --js Source/WebCore/inspector/front-end/SourceHTMLTokenizer.js \
-#        --js Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js \
+#        --js Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js
 
-
 # To be compiled...
 # 
 # [Profiler]
@@ -189,16 +199,8 @@
 # ProfileView
 # TopDownProfileDataGridTree
 #
-# [Extensions]
-# ExtensionAPI
-# ExtensionAuditCategory
-# ExtensionPanel
-# ExtensionRegistryStub
-# ExtensionServer
-#
 # [Misc]
 # inspector
 # SettingsScreen
-# TestController
 # _javascript_Formatter
 # ScriptFormatterWorker

Modified: trunk/Source/WebCore/inspector/front-end/BinarySearch.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/BinarySearch.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/BinarySearch.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -29,6 +29,11 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @param {*} object
+ * @param {Array.<*>} array
+ * @param {function(*, *)} comparator
+ */
 function binarySearch(object, array, comparator)
 {
     var first = 0;
@@ -55,6 +60,11 @@
     return result >= 0 ? result : -1;
 }});
 
+/**
+ * @param {*} anObject
+ * @param {Array.<*>} aList
+ * @param {function(*, *)} aFunction
+ */
 function insertionIndexForObjectInListSortedByFunction(anObject, aList, aFunction)
 {
     var index = binarySearch(anObject, aList, aFunction);

Modified: trunk/Source/WebCore/inspector/front-end/ConsoleModel.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/ConsoleModel.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleModel.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -64,6 +64,9 @@
         }
     },
 
+    /**
+     * @param {WebInspector.ConsoleMessage} msg
+     */
     addMessage: function(msg)
     {
         this.messages.push(msg);
@@ -73,6 +76,9 @@
         this._interruptRepeatCount = false;
     },
 
+    /**
+     * @param {WebInspector.ConsoleMessage} msg
+     */
     _incrementErrorWarningCount: function(msg)
     {
         switch (msg.level) {
@@ -143,6 +149,9 @@
 }
 
 WebInspector.ConsoleMessage.prototype = {
+    /**
+     * @return {number}
+     */
     get totalRepeatCount()
     {
         return this._totalRepeatCount;
@@ -228,6 +237,9 @@
 }
 
 WebInspector.ConsoleDispatcher.prototype = {
+    /**
+     * @param {ConsoleAgent.ConsoleMessage} payload
+     */
     messageAdded: function(payload)
     {
         var consoleMessage = WebInspector.ConsoleMessage.create(
@@ -244,6 +256,9 @@
         this._console.addMessage(consoleMessage);
     },
 
+    /**
+     * @param {number} count
+     */
     messageRepeatCountUpdated: function(count)
     {
         this._console._messageRepeatCountUpdated(count);

Modified: trunk/Source/WebCore/inspector/front-end/ExtensionAPI.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/ExtensionAPI.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/ExtensionAPI.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -63,6 +63,9 @@
 // by Foo consutrctor to re-bind publicly exported members to an instance
 // of Foo.
 
+/**
+ * @constructor
+ */
 function EventSinkImpl(type, customDispatch)
 {
     this._type = type;
@@ -111,6 +114,9 @@
     }
 }
 
+/**
+ * @constructor
+ */
 function InspectorExtensionAPI()
 {
     this.audits = new Audits();
@@ -124,6 +130,9 @@
     this._onReset_ = new EventSink("reset");
 }
 
+/**
+ * @constructor
+ */
 InspectorExtensionAPI.prototype = {
     log: function(message)
     {
@@ -131,6 +140,9 @@
     }
 }
 
+/**
+ * @constructor
+ */
 function Console()
 {
     this._onMessageAdded_ = new EventSink("console-message-added");
@@ -151,8 +163,11 @@
     {
         return apiPrivate.console.Severity;
     }
-};
+}
 
+/**
+ * @constructor
+ */
 function Network()
 {
     function dispatchRequestEvent(message)
@@ -183,10 +198,13 @@
 
     addRequestHeaders: function(headers)
     {
-        return extensionServer.sendRequest({ command: "addRequestHeaders", headers: headers, extensionId: location.hostname });
+        return extensionServer.sendRequest({ command: "addRequestHeaders", headers: headers, extensionId: window.location.hostname });
     }
 }
 
+/**
+ * @constructor
+ */
 function RequestImpl(id)
 {
     this._id = id;
@@ -201,8 +219,11 @@
         }
         extensionServer.sendRequest({ command: "getRequestContent", id: this._id }, callback && callbackWrapper);
     }
-};
+}
 
+/**
+ * @constructor
+ */
 function Panels()
 {
     var panels = {
@@ -250,6 +271,9 @@
     }
 }
 
+/**
+ * @constructor
+ */
 function PanelImpl(id)
 {
     this._id = id;
@@ -257,6 +281,10 @@
     this._onHidden_ = new EventSink("panel-hidden-" + id);
 }
 
+/**
+ * @constructor
+ * @extends {PanelImpl}
+ */
 function PanelWithSidebarImpl(id)
 {
     PanelImpl.call(this, id);
@@ -282,6 +310,10 @@
 
 PanelWithSidebarImpl.prototype.__proto__ = PanelImpl.prototype;
 
+/**
+ * @constructor
+ * @extends {PanelWithSidebar}
+ */
 function ElementsPanel()
 {
     var id = "elements";
@@ -289,12 +321,19 @@
     this._onSelectionChanged_ = new EventSink("panel-objectSelected-" + id);
 }
 
+/**
+ * @constructor
+ * @extends {Panel}
+ */
 function ExtensionPanel(id)
 {
     Panel.call(this, id);
     this._onSearch_ = new EventSink("panel-search-" + id);
 }
 
+/**
+ * @constructor
+ */
 function ExtensionSidebarPaneImpl(id)
 {
     this._id = id;
@@ -323,6 +362,9 @@
     }
 }
 
+/**
+ * @constructor
+ */
 function Audits()
 {
 }
@@ -336,6 +378,9 @@
     }
 }
 
+/**
+ * @constructor
+ */
 function AuditCategoryImpl(id)
 {
     function dispatchAuditEvent(request)
@@ -352,6 +397,9 @@
     this._onAuditStarted_ = new EventSink("audit-started-" + id, dispatchAuditEvent);
 }
 
+/**
+ * @constructor
+ */
 function AuditResultImpl(id)
 {
     this._id = id;
@@ -367,7 +415,7 @@
     {
         // shorthand for specifying details directly in addResult().
         if (details && !(details instanceof AuditResultNode))
-            details = details instanceof Array ? this.createNode.apply(this, details) : this.createNode(details);
+            details = new AuditResultNode(details instanceof Array ? details : [details]);
 
         var request = {
             command: "addAuditResult",
@@ -382,9 +430,7 @@
 
     createResult: function()
     {
-        var node = new AuditResultNode();
-        node.contents = Array.prototype.slice.call(arguments);
-        return node;
+        return new AuditResultNode(Array.prototype.slice.call(arguments));
     },
 
     done: function()
@@ -406,6 +452,9 @@
     }
 }
 
+/**
+ * @constructor
+ */
 function AuditResultNode(contents)
 {
     this.contents = contents;
@@ -416,12 +465,15 @@
 AuditResultNode.prototype = {
     addChild: function()
     {
-        var node = AuditResultImpl.prototype.createResult.apply(null, arguments);
+        var node = new AuditResultNode(Array.prototype.slice.call(arguments));
         this.children.push(node);
         return node;
     }
 };
 
+/**
+ * @constructor
+ */
 function InspectedWindow()
 {
     function dispatchResourceEvent(message)
@@ -468,6 +520,9 @@
     }
 }
 
+/**
+ * @constructor
+ */
 function ResourceImpl(resourceData)
 {
     this._url = resourceData.url
@@ -499,13 +554,19 @@
     {
         return extensionServer.sendRequest({ command: "setResourceContent", url: this._url, content: content, commit: commit }, callback);
     }
-};
+}
 
+/**
+ * @constructor
+ */
 function TimelineImpl()
 {
     this._onEventRecorded_ = new EventSink("timeline-event-recorded");
 }
 
+/**
+ * @constructor
+ */
 function ExtensionServerClient()
 {
     this._callbacks = {};
@@ -576,7 +637,10 @@
     }
 }
 
-function bind(func, thisObject)
+/**
+ * @param {...*} vararg
+ */
+function bind(func, thisObject, vararg)
 {
     var args = Array.prototype.slice.call(arguments, 2);
     return function() { return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0))); };
@@ -638,9 +702,9 @@
 
 var extensionServer = new ExtensionServerClient();
 
-webInspector = new InspectorExtensionAPI();
-experimental = window.experimental || {};
-experimental.webInspector = webInspector;
+window.webInspector = new InspectorExtensionAPI();
+window.experimental = window.experimental || {};
+window.experimental.webInspector = window.webInspector;
 
 }
 

Modified: trunk/Source/WebCore/inspector/front-end/ExtensionAuditCategory.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/ExtensionAuditCategory.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/ExtensionAuditCategory.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -28,6 +28,9 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @constructor
+ */
 WebInspector.ExtensionAuditCategory = function(id, displayName, ruleCount)
 {
     this._id = id;
@@ -58,6 +61,9 @@
     }
 }
 
+/**
+ * @constructor
+ */
 WebInspector.ExtensionAuditCategoryResults = function(category, callback)
 {
     this._category = category;

Modified: trunk/Source/WebCore/inspector/front-end/ExtensionPanel.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/ExtensionPanel.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/ExtensionPanel.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -28,6 +28,13 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @constructor
+ * @extends {WebInspector.Panel}
+ * @param {string} id
+ * @param {string} label
+ * @param {string} iconURL
+ */
 WebInspector.ExtensionPanel = function(id, label, iconURL)
 {
     this._toolbarItemLabel = label;
@@ -83,6 +90,12 @@
 
 WebInspector.ExtensionPanel.prototype.__proto__ = WebInspector.Panel.prototype;
 
+/**
+ * @constructor
+ * @extends {WebInspector.SidebarPane}
+ * @param {string} title
+ * @param {string} id
+ */
 WebInspector.ExtensionSidebarPane = function(title, id)
 {
     WebInspector.SidebarPane.call(this, title);
@@ -97,7 +110,7 @@
 
     setExpression: function(_expression_, title)
     {
-        RuntimeAgent.evaluate(_expression_, "extension-watch", true, this._onEvaluate.bind(this, title));
+        RuntimeAgent.evaluate(_expression_, "extension-watch", true, undefined, undefined, undefined, this._onEvaluate.bind(this, title));
     },
 
     setPage: function(url)

Modified: trunk/Source/WebCore/inspector/front-end/ExtensionRegistryStub.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/ExtensionRegistryStub.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/ExtensionRegistryStub.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -30,6 +30,9 @@
 
 if (!window.InspectorExtensionRegistry) {
 
+/**
+ * @constructor
+ */
 WebInspector.InspectorExtensionRegistryStub = function()
 {
 }
@@ -38,8 +41,8 @@
     getExtensionsAsync: function()
     {
     }
-};
+}
 
-InspectorExtensionRegistry = new WebInspector.InspectorExtensionRegistryStub();
+var InspectorExtensionRegistry = new WebInspector.InspectorExtensionRegistryStub();
 
 }

Modified: trunk/Source/WebCore/inspector/front-end/ExtensionServer.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/ExtensionServer.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/ExtensionServer.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -28,6 +28,9 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @constructor
+ */
 WebInspector.ExtensionServer = function()
 {
     this._clientObjects = {};
@@ -121,7 +124,10 @@
         this._postNotification("resource-content-committed", this._makeResource(resource), content);
     },
 
-    _postNotification: function(type, details)
+    /**
+     * @param {...*} vararg
+     */
+    _postNotification: function(type, vararg)
     {
         var subscribers = this._subscribers[type];
         if (!subscribers)
@@ -169,10 +175,10 @@
             extensionHeaders = {};
             this._extraHeaders[id] = extensionHeaders;
         }
-        for (name in message.headers)
+        for (var name in message.headers)
             extensionHeaders[name] = message.headers[name];
-        var allHeaders = {};
-        for (extension in this._extraHeaders) {
+        var allHeaders = /** @type NetworkAgent.Headers */ {};
+        for (var extension in this._extraHeaders) {
             var headers = this._extraHeaders[extension];
             for (name in headers) {
                 if (typeof headers[name] === "string")
@@ -301,7 +307,7 @@
             this._dispatchCallback(message.requestId, port, result);
         }
         var evalExpression = "JSON.stringify(eval(unescape('" + escape(message._expression_) + "')));";
-        RuntimeAgent.evaluate(evalExpression, "", true, callback.bind(this));
+        RuntimeAgent.evaluate(evalExpression, "", true, undefined, undefined, undefined, callback.bind(this));
     },
 
     _onGetConsoleMessages: function()
@@ -545,6 +551,9 @@
         this._postNotification("timeline-event-recorded", event.data);
     },
 
+    /**
+     * @param {Array.<ExtensionDescriptor>} extensions
+     */
     _addExtensions: function(extensions)
     {
         // See ExtensionAPI.js and ExtensionCommon.js for details.
@@ -590,7 +599,7 @@
     _registerExtension: function(origin, port)
     {
         if (!this._registeredExtensions.hasOwnProperty(origin)) {
-            if (origin !== location.origin) // Just ignore inspector frames.
+            if (origin !== window.location.origin) // Just ignore inspector frames.
                 console.error("Ignoring unauthorized client request from " + origin);
             return;
         }
@@ -658,23 +667,14 @@
     }
 }
 
-WebInspector.ExtensionServer._statuses =
-{
-    OK: "",
-    E_EXISTS: "Object already exists: %s",
-    E_BADARG: "Invalid argument %s: %s",
-    E_BADARGTYPE: "Invalid type for argument %s: got %s, expected %s",
-    E_NOTFOUND: "Object not found: %s",
-    E_NOTSUPPORTED: "Object does not support requested operation: %s",
-    E_FAILED: "Operation failed: %s"
-}
-
+/**
+ * @constructor
+ */
 WebInspector.ExtensionStatus = function()
 {
-    function makeStatus(code)
+    function makeStatus(code, description)
     {
-        var description = WebInspector.ExtensionServer._statuses[code] || code;
-        var details = Array.prototype.slice.call(arguments, 1);
+        var details = Array.prototype.slice.call(arguments, 2);
         var status = { code: code, description: description, details: details };
         if (code !== "OK") {
             status.isError = true;
@@ -682,8 +682,14 @@
         }
         return status;
     }
-    for (status in WebInspector.ExtensionServer._statuses)
-        this[status] = makeStatus.bind(null, status);
+
+    this.OK = makeStatus.bind(null, "OK", "OK");
+    this.E_EXISTS = makeStatus.bind(null, "E_EXISTS", "Object already exists: %s");
+    this.E_BADARG = makeStatus.bind(null, "E_BADARG", "Invalid argument %s: %s");
+    this.E_BADARGTYPE = makeStatus.bind(null, "E_BADARGTYPE", "Invalid type for argument %s: got %s, expected %s");
+    this.E_NOTFOUND = makeStatus.bind(null, "E_NOTFOUND", "Object not found: %s");
+    this.E_NOTSUPPORTED = makeStatus.bind(null, "E_NOTSUPPORTED", "Object does not support requested operation: %s");
+    this.E_FAILED = makeStatus.bind(null, "E_FAILED", "Operation failed: %s");
 }
 
 WebInspector.addExtensions = function(extensions)

Modified: trunk/Source/WebCore/inspector/front-end/NetworkLog.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/NetworkLog.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/NetworkLog.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -39,6 +39,9 @@
 }
 
 WebInspector.NetworkLog.prototype = {
+    /**
+     * @return {Array.<WebInspector.Resource>}
+     */
     get resources()
     {
         return this._resources;
@@ -56,9 +59,13 @@
         }
     },
 
+    /**
+     * @param {WebInspector.Event} event
+     */
     _onResourceStarted: function(event)
     {
-        this._resources.push(event.data);
+        var resource = /** @type {WebInspector.Resource} */ event.data;
+        this._resources.push(resource);
     }
 }
 

Modified: trunk/Source/WebCore/inspector/front-end/Object.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/Object.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/Object.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -84,11 +84,12 @@
     /**
      * @param {string} eventType
      * @param {*=} eventData
+     * @return {boolean}
      */
     dispatchEventToListeners: function(eventType, eventData)
     {
         if (!this._listeners || !this._listeners[eventType])
-            return;
+            return false;
 
         var event = new WebInspector.Event(this, eventType, eventData);
         var listeners = this._listeners[eventType].slice(0);

Modified: trunk/Source/WebCore/inspector/front-end/SettingsScreen.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/SettingsScreen.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/SettingsScreen.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -28,6 +28,10 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @constructor
+ * @extends {WebInspector.HelpScreen}
+ */
 WebInspector.SettingsScreen = function()
 {
     WebInspector.HelpScreen.call(this, WebInspector.UIString("Settings"));
@@ -73,6 +77,10 @@
 }
 
 WebInspector.SettingsScreen.prototype = {
+    /**
+     * @param {string} name
+     * @param {boolean=} right
+     */
     _appendSection: function(name, right)
     {
         var p = document.createElement("p");

Modified: trunk/Source/WebCore/inspector/front-end/TestController.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/TestController.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/TestController.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -28,6 +28,9 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+/**
+ * @constructor
+ */
 WebInspector.TestController = function()
 {
 }
@@ -45,15 +48,10 @@
     function invokeMethod()
     {
         try {
-            var result;
-            if (window[script] && typeof window[script] === "function")
-                result = window[script].call(WebInspector, controller);
-            else
-                result = window.eval(script);
-
+            var result = window.eval(script);
             WebInspector.TestController.prototype.notifyDone(callId, result);
         } catch (e) {
-            WebInspector.testController.prototype.notifyDone(callId, e.toString());
+            WebInspector.TestController.prototype.notifyDone(callId, e.toString());
         }
     }
     InspectorBackend.runAfterPendingDispatches(invokeMethod);

Modified: trunk/Source/WebCore/inspector/front-end/externs.js (97151 => 97152)


--- trunk/Source/WebCore/inspector/front-end/externs.js	2011-10-11 14:04:55 UTC (rev 97151)
+++ trunk/Source/WebCore/inspector/front-end/externs.js	2011-10-11 14:43:45 UTC (rev 97152)
@@ -29,9 +29,12 @@
  */
 
 var console = {}
-console.warn = function(message) {}
-/** @param {string=} message */
-console.assert = function(expr, message) {}
+/** @param {...*} vararg */
+console.warn = function(vararg) {}
+/** @param {...*} vararg */
+console.assert = function(vararg) {}
+/** @param {...*} vararg */
+console.error = function(vararg) {}
 
 var WebInspector = {}
 
@@ -87,6 +90,7 @@
  */
 WebInspector.UIString = function(str, varArgs) {}
 var InspectorBackend = {}
+InspectorBackend.runAfterPendingDispatches = function(message) {}
 
 var JSON = {}
 /** @param {string} str */
@@ -227,3 +231,40 @@
 WebInspector.Events = {
     InspectorClosing: "InspectorClosing"
 }
+
+/** Extensions API */
+
+/** @constructor */
+function AuditCategory() {}
+/** @constructor */
+function AuditResult() {}
+/** @constructor */
+function EventSink() {}
+/** @constructor */
+function ExtensionSidebarPane() {}
+/** @constructor */
+function Panel() {}
+/** @constructor */
+function PanelWithSidebar() {}
+/** @constructor */
+function Request() {}
+/** @constructor */
+function Resource() {}
+/** @constructor */
+function Timeline() {}
+
+/** @type {string} */
+Location.prototype.origin = "";
+
+/**
+ * @constructor
+ */
+function ExtensionDescriptor() {
+    this.startPage = "";
+    this.name = "";
+}
+
+/**
+ * @type {WebInspector.HandlerRegistry}
+ */
+WebInspector.openAnchorLocationRegistry = null;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to