Title: [89429] trunk/Source/WebCore
Revision
89429
Author
pfeld...@chromium.org
Date
2011-06-22 07:13:27 -0700 (Wed, 22 Jun 2011)

Log Message

2011-06-22  Pavel Feldman  <pfeld...@google.com>

        Reviewed by Yury Semikhatsky.

        Web Inspector: DOMAgent.resolveNode should receive objectGroup.
        https://bugs.webkit.org/show_bug.cgi?id=63137

        * inspector/InjectedScript.cpp:
        (WebCore::InjectedScript::wrapNode):
        * inspector/InjectedScript.h:
        * inspector/InjectedScriptSource.js:
        (.):
        * inspector/Inspector.json:
        * inspector/InspectorDOMAgent.cpp:
        (WebCore::InspectorDOMAgent::resolveNode):
        (WebCore::InspectorDOMAgent::buildObjectForEventListener):
        * inspector/InspectorDOMAgent.h:
        * inspector/InspectorDOMDebuggerAgent.cpp:
        (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
        * inspector/InspectorDebuggerAgent.cpp:
        (WebCore::InspectorDebuggerAgent::resume):
        * inspector/InspectorDebuggerAgent.h:
        * inspector/front-end/ElementsTreeOutline.js:
        (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
        * inspector/front-end/EventListenersSidebarPane.js:
        (WebInspector.EventListenersSidebarPane.prototype.update.callback):
        (WebInspector.EventListenersSidebarPane.prototype.update):
        (.):
        ():
        * inspector/front-end/PropertiesSidebarPane.js:
        * inspector/front-end/RemoteObject.js:
        (WebInspector.RemoteObject.resolveNode):
        (WebInspector.RemoteObjectProperty.fromPrimitiveValue):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (89428 => 89429)


--- trunk/Source/WebCore/ChangeLog	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/ChangeLog	2011-06-22 14:13:27 UTC (rev 89429)
@@ -1,3 +1,37 @@
+2011-06-22  Pavel Feldman  <pfeld...@google.com>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: DOMAgent.resolveNode should receive objectGroup.
+        https://bugs.webkit.org/show_bug.cgi?id=63137
+
+        * inspector/InjectedScript.cpp:
+        (WebCore::InjectedScript::wrapNode):
+        * inspector/InjectedScript.h:
+        * inspector/InjectedScriptSource.js:
+        (.):
+        * inspector/Inspector.json:
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::resolveNode):
+        (WebCore::InspectorDOMAgent::buildObjectForEventListener):
+        * inspector/InspectorDOMAgent.h:
+        * inspector/InspectorDOMDebuggerAgent.cpp:
+        (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
+        * inspector/InspectorDebuggerAgent.cpp:
+        (WebCore::InspectorDebuggerAgent::resume):
+        * inspector/InspectorDebuggerAgent.h:
+        * inspector/front-end/ElementsTreeOutline.js:
+        (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
+        * inspector/front-end/EventListenersSidebarPane.js:
+        (WebInspector.EventListenersSidebarPane.prototype.update.callback):
+        (WebInspector.EventListenersSidebarPane.prototype.update):
+        (.):
+        ():
+        * inspector/front-end/PropertiesSidebarPane.js:
+        * inspector/front-end/RemoteObject.js:
+        (WebInspector.RemoteObject.resolveNode):
+        (WebInspector.RemoteObjectProperty.fromPrimitiveValue):
+
 2011-06-22  Pavel Podivilov  <podivi...@chromium.org>
 
         Reviewed by Yury Semikhatsky.

Modified: trunk/Source/WebCore/inspector/InjectedScript.cpp (89428 => 89429)


--- trunk/Source/WebCore/inspector/InjectedScript.cpp	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/InjectedScript.cpp	2011-06-22 14:13:27 UTC (rev 89429)
@@ -162,9 +162,9 @@
     return r.toInspectorValue(m_injectedScriptObject.scriptState())->asObject();
 }
 
-PassRefPtr<InspectorObject> InjectedScript::wrapNode(Node* node)
+PassRefPtr<InspectorObject> InjectedScript::wrapNode(Node* node, const String& groupName)
 {
-    return wrapObject(nodeAsScriptValue(node), "");
+    return wrapObject(nodeAsScriptValue(node), groupName);
 }
 
 void InjectedScript::inspectNode(Node* node)

Modified: trunk/Source/WebCore/inspector/InjectedScript.h (89428 => 89429)


--- trunk/Source/WebCore/inspector/InjectedScript.h	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/InjectedScript.h	2011-06-22 14:13:27 UTC (rev 89429)
@@ -68,7 +68,7 @@
 #endif
 
     PassRefPtr<InspectorObject> wrapObject(ScriptValue, const String& groupName);
-    PassRefPtr<InspectorObject> wrapNode(Node*);
+    PassRefPtr<InspectorObject> wrapNode(Node*, const String& groupName);
     void inspectNode(Node*);
     void releaseObjectGroup(const String&);
     ScriptState* scriptState() const { return m_injectedScriptObject.scriptState(); }

Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (89428 => 89429)


--- trunk/Source/WebCore/inspector/InjectedScriptSource.js	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js	2011-06-22 14:13:27 UTC (rev 89429)
@@ -256,7 +256,8 @@
             return "Could not find object with given id";
         try {
             inspectedWindow.console._objectToEvaluateOn = object;
-            return this._evaluateAndWrap(inspectedWindow.eval, inspectedWindow, "(function() {" + _expression_ + "}).call(window.console._objectToEvaluateOn)", parsedObjectId.objectGroup, false, false);
+            var objectGroupName = this._idToObjectGroupName[parsedObjectId.id];
+            return this._evaluateAndWrap(inspectedWindow.eval, inspectedWindow, "(function() {" + _expression_ + "}).call(window.console._objectToEvaluateOn)", objectGroupName, false, false);
         } finally {
             delete inspectedWindow.console._objectToEvaluateOn;
         }

Modified: trunk/Source/WebCore/inspector/Inspector.json (89428 => 89429)


--- trunk/Source/WebCore/inspector/Inspector.json	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/Inspector.json	2011-06-22 14:13:27 UTC (rev 89429)
@@ -718,7 +718,7 @@
             {
                 "name": "addDOMStorage",
                 "parameters": [
-                    { "name": "storage", "$ref": "DOMStorageStorage" }
+                    { "name": "storage", "type": "object" }
                 ]
             },
             {
@@ -760,7 +760,7 @@
         "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object that has an <code>id</code>. This <code>id</code> can be used to get additional information on the Node, convert it into the _javascript_ object, etc. It is important that client receives DOM events only for the nodes that are known to the client. Backend keeps track of the nodes that were sent to the client and never sends the same node twice. It is client's responsibility to collect information about the nodes that were sent to the client.",
         "types": [
             {
-                "id": "DOMNode",
+                "id": "Node",
                 "type": "object",
                 "properties": [
                     { "name": "id", "type": "integer", "description": "Node identifier that is passed into the rest of the DOM messages as the <code>nodeId</code>. Backend will only push node with given <code>id</code> once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client." },
@@ -769,7 +769,7 @@
                     { "name": "localName", "type": "string", "description": "<code>Node</code>'s localName." },
                     { "name": "nodeValue", "type": "string", "description": "<code>Node</code>'s nodeValue." },
                     { "name": "childNodeCount", "type": "integer", "optional": true, "description": "Child count for <code>Container</code> nodes." },
-                    { "name": "children", "type": "array", "optional": true, "items": { "$ref": "DOMNode" }, "description": "Child nodes of this node when requested with children." },
+                    { "name": "children", "type": "array", "optional": true, "items": { "$ref": "Node" }, "description": "Child nodes of this node when requested with children." },
                     { "name": "attributes", "type": "array", "optional": true, "items": { "type": "string" }, "description": "Attributes of the <code>Element</code> node in the form of flat array <code>[name1, value1, name2, value2]</code>." },
                     { "name": "documentURL", "type": "string", "optional": true, "description": "Document URL that <code>Document</code> or <code>FrameOwner</code> node points to." },
                     { "name": "publicId", "type": "string", "optional": true, "description": "<code>DocumentType</code>'s publicId. // FIXME" },
@@ -781,16 +781,15 @@
                 "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type."
             },
             {
-                "id": "DOMEventListener",
+                "id": "EventListener",
                 "type": "object",
                 "properties": [
                     { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." },
                     { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." },
                     { "name": "isAttribute", "type": "boolean", "description": "<code>EventListener</code>'s isAttribute." },
                     { "name": "nodeId", "type": "integer", "description": "Target <code>DOMNode</code> id." },
-                    { "name": "listenerBody", "type": "string", "description": "Listener function body." },
-                    { "name": "sourceName", "type": "string", "optional": true, "description": "Handler location source name." },
-                    { "name": "lineNumber", "type": "number", "optional": true, "description": "Handler location line number." }
+                    { "name": "handlerBody", "type": "string", "description": "Event handler function body." },
+                    { "name": "location", "$ref": "Debugger.Location", "optional": true, "description": "Handler code location." }
                 ],
                 "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type."
             },
@@ -808,7 +807,7 @@
             {
                 "name": "getDocument",
                 "returns": [
-                    { "name": "root", "$ref": "DOMNode", "description": "Resulting node." }
+                    { "name": "root", "$ref": "Node", "description": "Resulting node." }
                 ],
                 "description": "Returns the root DOM node to the caller."
             },
@@ -890,7 +889,7 @@
                     { "name": "nodeId", "type": "integer", "description": "Id of the node to get listeners for." }
                 ],
                 "returns": [
-                    { "name": "listeners", "type": "array", "items": { "$ref": "DOMEventListener"}, "description": "Array of relevant listeners." }
+                    { "name": "listeners", "type": "array", "items": { "$ref": "EventListener"}, "description": "Array of relevant listeners." }
                 ],
                 "description": "Returns event listeners relevant to the node."
             },
@@ -987,7 +986,8 @@
             {
                 "name": "resolveNode",
                 "parameters": [
-                    { "name": "nodeId", "type": "integer", "description": "Id of the node to resolve." }
+                    { "name": "nodeId", "type": "integer", "description": "Id of the node to resolve." },
+                    { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
                 ],
                 "returns": [
                     { "name": "object", "$ref": "Runtime.RemoteObject", "description": "_javascript_ object wrapper for given node." }
@@ -1014,7 +1014,7 @@
                 "name": "setChildNodes",
                 "parameters": [
                     { "name": "parentId", "type": "integer", "description": "Parent node id to populate with children." },
-                    { "name": "nodes", "type": "array", "items": { "$ref": "DOMNode"}, "description": "Child nodes array." }
+                    { "name": "nodes", "type": "array", "items": { "$ref": "Node"}, "description": "Child nodes array." }
                 ],
                 "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids."
             },
@@ -1053,7 +1053,7 @@
                 "parameters": [
                     { "name": "parentId", "type": "integer", "description": "Id of the node that has changed." },
                     { "name": "prevId", "type": "integer", "description": "If of the previous siblint." },
-                    { "name": "node", "$ref": "DOMNode", "description": "Inserted node data." }
+                    { "name": "node", "$ref": "Node", "description": "Inserted node data." }
                 ],
                 "description": "Mirrors <code>DOMNodeInserted</code> event."
             },

Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (89428 => 89429)


--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp	2011-06-22 14:13:27 UTC (rev 89429)
@@ -1014,14 +1014,15 @@
     m_client->hideHighlight();
 }
 
-void InspectorDOMAgent::resolveNode(ErrorString* error, int nodeId, RefPtr<InspectorObject>* result)
+void InspectorDOMAgent::resolveNode(ErrorString* error, int nodeId, const String* const objectGroup, RefPtr<InspectorObject>* result)
 {
+    String objectGroupName = objectGroup ? *objectGroup : "";
     Node* node = nodeForId(nodeId);
     if (!node) {
         *error = "No node with given id found.";
         return;
     }
-    *result = resolveNode(node);
+    *result = resolveNode(node, objectGroupName);
 }
 
 void InspectorDOMAgent::getAttributes(ErrorString*, const RefPtr<InspectorArray>& nodeIds, RefPtr<InspectorArray>* result)
@@ -1171,12 +1172,14 @@
     value->setBoolean("useCapture", registeredEventListener.useCapture);
     value->setBoolean("isAttribute", eventListener->isAttribute());
     value->setNumber("nodeId", pushNodePathToFrontend(node));
-    value->setString("listenerBody", eventListenerHandlerBody(node->document(), eventListener.get()));
+    value->setString("handlerBody", eventListenerHandlerBody(node->document(), eventListener.get()));
     String sourceName;
     int lineNumber;
     if (eventListenerHandlerLocation(node->document(), eventListener.get(), sourceName, lineNumber)) {
-        value->setString("sourceName", sourceName);
-        value->setNumber("lineNumber", lineNumber);
+        RefPtr<InspectorObject> location = InspectorObject::create();
+        location->setString("sourceId", sourceName);
+        location->setNumber("lineNumber", lineNumber);
+        value->setObject("location", location);
     }
     return value.release();
 }
@@ -1445,7 +1448,7 @@
         *nodeId = pushNodePathToFrontend(node);
 }
 
-PassRefPtr<InspectorObject> InspectorDOMAgent::resolveNode(Node* node)
+PassRefPtr<InspectorObject> InspectorDOMAgent::resolveNode(Node* node, const String& objectGroup)
 {
     Document* document = node->isDocumentNode() ? node->document() : node->ownerDocument();
     Frame* frame = document ? document->frame() : 0;
@@ -1456,7 +1459,7 @@
     if (injectedScript.hasNoValue())
         return 0;
 
-    return injectedScript.wrapNode(node);
+    return injectedScript.wrapNode(node, objectGroup);
 }
 
 void InspectorDOMAgent::drawNodeHighlight(GraphicsContext& context) const

Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.h (89428 => 89429)


--- trunk/Source/WebCore/inspector/InspectorDOMAgent.h	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.h	2011-06-22 14:13:27 UTC (rev 89429)
@@ -125,7 +125,7 @@
     void getEventListenersForNode(ErrorString*, int nodeId, RefPtr<InspectorArray>* listenersArray);
     void performSearch(ErrorString*, const String& whitespaceTrimmedQuery, const bool* const runSynchronously);
     void cancelSearch(ErrorString*);
-    void resolveNode(ErrorString*, int nodeId, RefPtr<InspectorObject>* result);
+    void resolveNode(ErrorString*, int nodeId, const String* const objectGroup, RefPtr<InspectorObject>* result);
     void getAttributes(ErrorString*, const RefPtr<InspectorArray>& nodeIds, RefPtr<InspectorArray>* result);
     void setInspectModeEnabled(ErrorString*, bool enabled);
     void pushNodeToFrontend(ErrorString*, const String& objectId, int* nodeId);
@@ -158,7 +158,7 @@
 
     String documentURLString(Document*) const;
 
-    PassRefPtr<InspectorObject> resolveNode(Node*);
+    PassRefPtr<InspectorObject> resolveNode(Node*, const String& objectGroup);
     bool handleMousePress();
     bool searchingForNodeInPage() const;
     void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);

Modified: trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp (89428 => 89429)


--- trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp	2011-06-22 14:13:27 UTC (rev 89429)
@@ -256,7 +256,7 @@
     if ((1 << breakpointType) & inheritableDOMBreakpointTypesMask) {
         // For inheritable breakpoint types, target node isn't always the same as the node that owns a breakpoint.
         // Target node may be unknown to frontend, so we need to push it first.
-        RefPtr<InspectorObject> targetNodeObject = m_domAgent->resolveNode(target);
+        RefPtr<InspectorObject> targetNodeObject = m_domAgent->resolveNode(target, InspectorDebuggerAgent::backtraceObjectGroup);
         description->setObject("targetNode", targetNodeObject);
 
         // Find breakpoint owner node.

Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp (89428 => 89429)


--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp	2011-06-22 14:13:27 UTC (rev 89429)
@@ -48,6 +48,8 @@
 static const char _javascript_Breakpoints[] = "_javascript_Breakopints";
 };
 
+const char* InspectorDebuggerAgent::backtraceObjectGroup = "backtrace-object-group";
+
 InspectorDebuggerAgent::InspectorDebuggerAgent(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, InjectedScriptManager* injectedScriptManager)
     : m_instrumentingAgents(instrumentingAgents)
     , m_inspectorState(inspectorState)
@@ -338,7 +340,7 @@
 
 void InspectorDebuggerAgent::resume(ErrorString*)
 {
-    m_injectedScriptManager->releaseObjectGroup("backtrace");
+    m_injectedScriptManager->releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
     scriptDebugServer().continueProgram();
 }
 

Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h (89428 => 89429)


--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h	2011-06-22 14:13:27 UTC (rev 89429)
@@ -66,6 +66,8 @@
 class InspectorDebuggerAgent : public ScriptDebugListener {
     WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED;
 public:
+    static const char* backtraceObjectGroup;
+
     virtual ~InspectorDebuggerAgent();
 
     void enable(ErrorString*);

Modified: trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js (89428 => 89429)


--- trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js	2011-06-22 14:13:27 UTC (rev 89429)
@@ -476,7 +476,7 @@
             object.evaluate("return '[' + this.offsetWidth + ',' + this.offsetHeight + ',' + this.naturalWidth + ',' + this.naturalHeight + ']'", setTooltip.bind(this));
             object.release();
         }
-        WebInspector.RemoteObject.resolveNode(node, resolvedNode.bind(this));
+        WebInspector.RemoteObject.resolveNode(node, "", resolvedNode.bind(this));
     },
 
     updateSelection: function()

Modified: trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js (89428 => 89429)


--- trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js	2011-06-22 14:13:27 UTC (rev 89429)
@@ -57,9 +57,12 @@
     this.titleElement.appendChild(this.settingsSelectElement);
 }
 
+WebInspector.EventListenersSidebarPane._objectGroupName = "event-listeners-sidebar-pane";
+
 WebInspector.EventListenersSidebarPane.prototype = {
     update: function(node)
     {
+        RuntimeAgent.releaseObjectGroup(WebInspector.EventListenersSidebarPane._objectGroupName);
         var body = this.bodyElement;
         body.removeChildren();
         this.sections = [];
@@ -75,7 +78,7 @@
                 var eventListener = eventListeners[i];
                 eventListener.node = WebInspector.domAgent.nodeForId(eventListener.nodeId);
                 delete eventListener.nodeId; // no longer needed
-                if (/^function _inspectorCommandLineAPI_logEvent\(/.test(eventListener.listenerBody.toString()))
+                if (/^function _inspectorCommandLineAPI_logEvent\(/.test(eventListener.handlerBody.toString()))
                     continue; // ignore event listeners generated by monitorEvent
                 var type = eventListener.type;
                 var section = sectionMap[type];
@@ -186,20 +189,25 @@
         function updateWithNodeObject(nodeObject)
         {
             var properties = [];
+
+            if (this.eventListener.type)
+                properties.push(WebInspector.RemoteObjectProperty.fromPrimitiveValue("type", this.eventListener.type));
+            if (typeof this.eventListener.useCapture !== "undefined")
+                properties.push(WebInspector.RemoteObjectProperty.fromPrimitiveValue("useCapture", this.eventListener.useCapture));
+            if (typeof this.eventListener.isAttribute !== "undefined")
+                properties.push(WebInspector.RemoteObjectProperty.fromPrimitiveValue("isAttribute", this.eventListener.isAttribute));
             if (nodeObject)
                 properties.push(new WebInspector.RemoteObjectProperty("node", nodeObject));
+            if (typeof this.eventListener.handlerBody !== "undefined")
+                properties.push(WebInspector.RemoteObjectProperty.fromPrimitiveValue("listenerBody", this.eventListener.handlerBody));
+            if (this.eventListener.location) {
+                properties.push(WebInspector.RemoteObjectProperty.fromPrimitiveValue("sourceName", this.eventListener.location.sourceId));
+                properties.push(WebInspector.RemoteObjectProperty.fromPrimitiveValue("lineNumber", this.eventListener.location.lineNumber));
+            }
 
-            for (var propertyName in this.eventListener) {
-                var value = WebInspector.RemoteObject.fromPrimitiveValue(this.eventListener[propertyName]);
-                properties.push(new WebInspector.RemoteObjectProperty(propertyName, value));
-            }
             this.updateProperties(properties);
-            if (nodeObject)
-                nodeObject.release();
         }
-        var node = this.eventListener.node;
-        delete this.eventListener.node;
-        WebInspector.RemoteObject.resolveNode(node, updateWithNodeObject.bind(this));
+        WebInspector.RemoteObject.resolveNode(this.eventListener.node, WebInspector.EventListenersSidebarPane._objectGroupName, updateWithNodeObject.bind(this));
     },
 
     _setNodeTitle: function()
@@ -225,11 +233,11 @@
     _setFunctionSubtitle: function()
     {
         // Requires that Function.toString() return at least the function's signature.
-        if (this.eventListener.sourceName) {
+        if (this.eventListener.location) {
             this.subtitleElement.removeChildren();
-            this.subtitleElement.appendChild(WebInspector.linkifyResourceAsNode(this.eventListener.sourceName, "scripts", this.eventListener.lineNumber));
+            this.subtitleElement.appendChild(WebInspector.linkifyResourceAsNode(this.eventListener.location.sourceId, "scripts", this.eventListener.location.lineNumber));
         } else {
-            var match = this.eventListener.listenerBody.match(/function ([^\(]+?)\(/);
+            var match = this.eventListener.handlerBody.match(/function ([^\(]+?)\(/);
             if (match)
                 this.subtitleElement.textContent = match[1];
             else

Modified: trunk/Source/WebCore/inspector/front-end/PropertiesSidebarPane.js (89428 => 89429)


--- trunk/Source/WebCore/inspector/front-end/PropertiesSidebarPane.js	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/front-end/PropertiesSidebarPane.js	2011-06-22 14:13:27 UTC (rev 89429)
@@ -31,6 +31,8 @@
     WebInspector.SidebarPane.call(this, WebInspector.UIString("Properties"));
 }
 
+WebInspector.PropertiesSidebarPane._objectGroupName = "properties-sidebar-pane";
+
 WebInspector.PropertiesSidebarPane.prototype = {
     update: function(node)
     {
@@ -42,7 +44,7 @@
             return;
         }
 
-        WebInspector.RemoteObject.resolveNode(node, nodeResolved.bind(this));
+        WebInspector.RemoteObject.resolveNode(node, WebInspector.PropertiesSidebarPane._objectGroupName, nodeResolved.bind(this));
 
         function nodeResolved(object)
         {

Modified: trunk/Source/WebCore/inspector/front-end/RemoteObject.js (89428 => 89429)


--- trunk/Source/WebCore/inspector/front-end/RemoteObject.js	2011-06-22 14:08:34 UTC (rev 89428)
+++ trunk/Source/WebCore/inspector/front-end/RemoteObject.js	2011-06-22 14:13:27 UTC (rev 89429)
@@ -46,7 +46,7 @@
     return new WebInspector.LocalJSONObject(value);
 }
 
-WebInspector.RemoteObject.resolveNode = function(node, callback)
+WebInspector.RemoteObject.resolveNode = function(node, objectGroup, callback)
 {
     function mycallback(error, object)
     {
@@ -58,7 +58,7 @@
         else
             callback(WebInspector.RemoteObject.fromPayload(object));
     }
-    DOMAgent.resolveNode(node.id, mycallback);
+    DOMAgent.resolveNode(node.id, objectGroup, mycallback);
 }
 
 WebInspector.RemoteObject.fromPayload = function(payload)
@@ -165,6 +165,11 @@
     this.value = value;
 }
 
+WebInspector.RemoteObjectProperty.fromPrimitiveValue = function(name, value)
+{
+    return new WebInspector.RemoteObjectProperty(name, WebInspector.RemoteObject.fromPrimitiveValue(value));
+}
+
 // The below is a wrapper around a local object that provides an interface comaptible
 // with RemoteObject, to be used by the UI code (primarily ObjectPropertiesSection).
 // Note that only JSON-compliant objects are currently supported, as there's no provision
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to