OLD | NEW |
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 var node = this.eventListener.node; | 223 var node = this.eventListener.node; |
224 if (!node) | 224 if (!node) |
225 return; | 225 return; |
226 | 226 |
227 if (node.nodeType() === Node.DOCUMENT_NODE) { | 227 if (node.nodeType() === Node.DOCUMENT_NODE) { |
228 this.titleElement.textContent = "document"; | 228 this.titleElement.textContent = "document"; |
229 return; | 229 return; |
230 } | 230 } |
231 | 231 |
232 if (node.id === this._nodeId) { | 232 if (node.id === this._nodeId) { |
233 this.titleElement.textContent = node.appropriateSelectorFor(); | 233 this.titleElement.textContent = WebInspector.DOMPresentationUtils.ap
propriateSelectorFor(node); |
234 return; | 234 return; |
235 } | 235 } |
236 | 236 |
237 this.titleElement.removeChildren(); | 237 this.titleElement.removeChildren(); |
238 this.titleElement.appendChild(WebInspector.DOMPresentationUtils.linkifyN
odeReference(this.eventListener.node)); | 238 this.titleElement.appendChild(WebInspector.DOMPresentationUtils.linkifyN
odeReference(this.eventListener.node)); |
239 }, | 239 }, |
240 | 240 |
241 _setFunctionSubtitle: function(linkifier) | 241 _setFunctionSubtitle: function(linkifier) |
242 { | 242 { |
243 // Requires that Function.toString() return at least the function's sign
ature. | 243 // Requires that Function.toString() return at least the function's sign
ature. |
(...skipping 13 matching lines...) Expand all Loading... |
257 var match = this.eventListener.handlerBody.match(/function ([^\(]+?)
\(/); | 257 var match = this.eventListener.handlerBody.match(/function ([^\(]+?)
\(/); |
258 if (match) | 258 if (match) |
259 this.subtitleElement.textContent = match[1]; | 259 this.subtitleElement.textContent = match[1]; |
260 else | 260 else |
261 this.subtitleElement.textContent = WebInspector.UIString("(anony
mous function)"); | 261 this.subtitleElement.textContent = WebInspector.UIString("(anony
mous function)"); |
262 } | 262 } |
263 }, | 263 }, |
264 | 264 |
265 __proto__: WebInspector.ObjectPropertiesSection.prototype | 265 __proto__: WebInspector.ObjectPropertiesSection.prototype |
266 } | 266 } |
OLD | NEW |