Changeset 48813 in webkit


Ignore:
Timestamp:
Sep 28, 2009 7:40:17 AM (15 years ago)
Author:
pfeldman@chromium.org
Message:

2009-09-28 Pavel Feldman <pfeldman@chromium.org>

Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.

Web Inspector: Follow up to r48809.
InspectorController.wrapObject should only be called on the inspectable page side.

https://bugs.webkit.org/show_bug.cgi?id=17429

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r48812 r48813  
     12009-09-28  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by nobody (trivial follow up fix), Joseph Pecoraro LGTM-ed.
     4
     5        Web Inspector: Follow up to r48809.
     6        InspectorController.wrapObject should only be called on the inspectable page side.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=17429
     9
     10        * inspector/front-end/EventListenersSidebarPane.js:
     11        (WebInspector.EventListenersSidebarPane.prototype.update.callback):
     12        (WebInspector.EventListenersSidebarPane.prototype.update):
     13        (WebInspector.EventListenersSection):
     14        (WebInspector.EventListenersSection.prototype.update):
     15        (WebInspector.EventListenerBar):
     16        (WebInspector.EventListenerBar.prototype.update):
     17
    1182009-09-28  Jakub Wieczorek  <faw217@gmail.com>
    219
  • trunk/WebCore/inspector/front-end/EventListenersSidebarPane.js

    r48809 r48813  
    7070            for (var i = 0; i < eventListeners.length; ++i) {
    7171                var eventListener = eventListeners[i];
    72                 eventListener._selectedNode = (eventListener.nodeId === nodeId);
    7372                eventListener.node = WebInspector.domAgent.nodeForId(eventListener.nodeId);
    7473                delete eventListener.nodeId; // no longer needed
     
    7675                var section = sectionMap[type];
    7776                if (!section) {
    78                     section = new WebInspector.EventListenersSection(type);
     77                    section = new WebInspector.EventListenersSection(type, nodeId);
    7978                    sectionMap[type] = section;
    8079                    sectionNames.push(type);
     
    117116WebInspector.EventListenersSidebarPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
    118117
    119 WebInspector.EventListenersSection = function(title, subtitle)
     118WebInspector.EventListenersSection = function(title, nodeId)
    120119{
    121120    this.eventListeners = [];
    122     WebInspector.PropertiesSection.call(this, title, subtitle);
     121    this._nodeId = nodeId;
     122    WebInspector.PropertiesSection.call(this, title);
    123123
    124124    // Changed from a Properties List
     
    141141            for (var i = 0; i < this.eventListeners.length; ++i) {
    142142                var eventListener = this.eventListeners[i];
    143                 if (eventListener._selectedNode)
     143                if (eventListener.node.id === this._nodeId)
    144144                    filteredEventListeners.push(eventListener);
    145145            }
     
    172172{
    173173    this.eventListener = eventListener;
    174     WebInspector.ObjectPropertiesSection.call(this, InspectorController.wrapObject(eventListener), this._getFunctionDisplayName(), this._getNodeDisplayName());
     174    WebInspector.ObjectPropertiesSection.call(this, null, this._getFunctionDisplayName(), this._getNodeDisplayName());
     175    this.editable = false;
    175176    this.element.className = "event-bar"; /* Changed from "section" */
    176177    this.propertiesElement.className = "event-properties"; /* Changed from "properties" */
     
    178179
    179180WebInspector.EventListenerBar.prototype = {
     181    update: function()
     182    {
     183        var properties = [];
     184        for (var propertyName in this.eventListener) {
     185            // Just build properties in place - no need to reach out for injected script.
     186            var value = this.eventListener[propertyName];
     187            if (value instanceof WebInspector.DOMNode)
     188                value = new WebInspector.ObjectProxy(value.id, [], 0, appropriateSelectorForNode(value), true);
     189            else
     190                value = WebInspector.ObjectProxy.wrapPrimitiveValue(value);
     191            properties.push(new WebInspector.ObjectPropertyProxy(propertyName, value));
     192        }
     193        this.updateProperties(properties);
     194    },
     195
    180196    _getNodeDisplayName: function()
    181197    {
Note: See TracChangeset for help on using the changeset viewer.