Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: inspector/front-end/EventListenersSidebarPane.js

Issue 542055: DevTools: injected script per context(WebCore part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « inspector/front-end/ElementsTreeOutline.js ('k') | inspector/front-end/InjectedScript.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 WebInspector.EventListenerBar.prototype = { 186 WebInspector.EventListenerBar.prototype = {
187 update: function() 187 update: function()
188 { 188 {
189 var properties = []; 189 var properties = [];
190 for (var propertyName in this.eventListener) { 190 for (var propertyName in this.eventListener) {
191 // Just build properties in place - no need to reach out for injecte d script. 191 // Just build properties in place - no need to reach out for injecte d script.
192 var value = this.eventListener[propertyName]; 192 var value = this.eventListener[propertyName];
193 if (value instanceof WebInspector.DOMNode) 193 if (value instanceof WebInspector.DOMNode)
194 value = new WebInspector.ObjectProxy(value.id, [], 0, appropriat eSelectorForNode(value), true); 194 value = new WebInspector.ObjectProxy(value.injectedScriptId, val ue.id, [], 0, appropriateSelectorForNode(value), true);
195 else 195 else
196 value = WebInspector.ObjectProxy.wrapPrimitiveValue(value); 196 value = WebInspector.ObjectProxy.wrapPrimitiveValue(value);
197 properties.push(new WebInspector.ObjectPropertyProxy(propertyName, v alue)); 197 properties.push(new WebInspector.ObjectPropertyProxy(propertyName, v alue));
198 } 198 }
199 this.updateProperties(properties); 199 this.updateProperties(properties);
200 }, 200 },
201 201
202 _getNodeDisplayName: function() 202 _getNodeDisplayName: function()
203 { 203 {
204 var node = this.eventListener.node; 204 var node = this.eventListener.node;
205 if (!node) 205 if (!node)
206 return ""; 206 return "";
207 207
208 if (node.nodeType === Node.DOCUMENT_NODE) 208 if (node.nodeType === Node.DOCUMENT_NODE)
209 return "document"; 209 return "document";
210 210
211 return appropriateSelectorForNode(node); 211 return appropriateSelectorForNode(node);
212 }, 212 },
213 213
214 _getFunctionDisplayName: function() 214 _getFunctionDisplayName: function()
215 { 215 {
216 // Requires that Function.toString() return at least the function's sign ature. 216 // Requires that Function.toString() return at least the function's sign ature.
217 var match = this.eventListener.listener.toString().match(/function ([^\( ]+?)\(/); 217 var match = this.eventListener.listener.toString().match(/function ([^\( ]+?)\(/);
218 return (match ? match[1] : WebInspector.UIString("(anonymous function)") ); 218 return (match ? match[1] : WebInspector.UIString("(anonymous function)") );
219 } 219 }
220 } 220 }
221 221
222 WebInspector.EventListenerBar.prototype.__proto__ = WebInspector.ObjectPropertie sSection.prototype; 222 WebInspector.EventListenerBar.prototype.__proto__ = WebInspector.ObjectPropertie sSection.prototype;
OLDNEW
« no previous file with comments | « inspector/front-end/ElementsTreeOutline.js ('k') | inspector/front-end/InjectedScript.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698