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

Side by Side Diff: Source/devtools/front_end/EventListenersSidebarPane.js

Issue 83123002: DevTools: Move DOMNode.appropriateSelectorFor() into DOMPresentationUtil. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/ElementsPanel.js ('k') | Source/devtools/front_end/LayerTree.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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ElementsPanel.js ('k') | Source/devtools/front_end/LayerTree.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698