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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js

Issue 2644753002: DevTools: untruncate links on copy (Closed)
Patch Set: a Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (Bindings.blackboxManager.isBlackboxedRawLocation(location)) 164 if (Bindings.blackboxManager.isBlackboxedRawLocation(location))
165 element.classList.add('blackboxed-call-frame'); 165 element.classList.add('blackboxed-call-frame');
166 166
167 /** 167 /**
168 * @param {!Bindings.LiveLocation} liveLocation 168 * @param {!Bindings.LiveLocation} liveLocation
169 */ 169 */
170 function updateLocation(liveLocation) { 170 function updateLocation(liveLocation) {
171 var uiLocation = liveLocation.uiLocation(); 171 var uiLocation = liveLocation.uiLocation();
172 if (!uiLocation) 172 if (!uiLocation)
173 return; 173 return;
174 var text = uiLocation.linkText(); 174 var text = uiLocation.linkText(true /* skipTrim */);
allada 2017/03/28 01:13:08 Are we sure we want to show the full data in text?
luoe 2017/03/31 21:35:21 I tried it out, and it doesn't look good with a hu
allada 2017/03/31 23:17:33 Acknowledged.
175 linkElement.textContent = text.trimMiddle(30); 175 linkElement.textContent = text.trimMiddle(30);
176 linkElement.title = text; 176 linkElement.title = text;
177 } 177 }
178 178
179 var linkElement = element.createChild('div', 'call-frame-location'); 179 var linkElement = element.createChild('div', 'call-frame-location');
180 Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation(location, up dateLocation, this._locationPool); 180 Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation(location, up dateLocation, this._locationPool);
181 } 181 }
182 182
183 element.appendChild(UI.Icon.create('smallicon-thick-right-arrow', 'selected- call-frame-icon')); 183 element.appendChild(UI.Icon.create('smallicon-thick-right-arrow', 'selected- call-frame-icon'));
184 return element; 184 return element;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 _copyStackTrace() { 360 _copyStackTrace() {
361 var text = []; 361 var text = [];
362 for (var i = 0; i < this._list.length(); i++) { 362 for (var i = 0; i < this._list.length(); i++) {
363 var item = this._list.itemAtIndex(i); 363 var item = this._list.itemAtIndex(i);
364 if (item.promiseCreationFrame) 364 if (item.promiseCreationFrame)
365 continue; 365 continue;
366 var itemText = this._itemTitle(item); 366 var itemText = this._itemTitle(item);
367 var location = this._itemLocation(item); 367 var location = this._itemLocation(item);
368 if (location) { 368 if (location) {
369 var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocati on(location); 369 var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocati on(location);
370 itemText += ' (' + uiLocation.linkText() + ')'; 370 itemText += ' (' + uiLocation.linkText(true /* skipTrim */) + ')';
371 } 371 }
372 text.push(itemText); 372 text.push(itemText);
373 } 373 }
374 InspectorFrontendHost.copyText(text.join('\n')); 374 InspectorFrontendHost.copyText(text.join('\n'));
375 } 375 }
376 376
377 /** 377 /**
378 * @param {function(!Array.<!UI.KeyboardShortcut.Descriptor>, function(!Event= ):boolean)} registerShortcutDelegate 378 * @param {function(!Array.<!UI.KeyboardShortcut.Descriptor>, function(!Event= ):boolean)} registerShortcutDelegate
379 */ 379 */
380 registerShortcuts(registerShortcutDelegate) { 380 registerShortcuts(registerShortcutDelegate) {
381 registerShortcutDelegate( 381 registerShortcutDelegate(
382 UI.ShortcutsScreen.SourcesPanelShortcuts.NextCallFrame, this._selectNext CallFrameOnStack.bind(this)); 382 UI.ShortcutsScreen.SourcesPanelShortcuts.NextCallFrame, this._selectNext CallFrameOnStack.bind(this));
383 registerShortcutDelegate( 383 registerShortcutDelegate(
384 UI.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame, this._selectPrev iousCallFrameOnStack.bind(this)); 384 UI.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame, this._selectPrev iousCallFrameOnStack.bind(this));
385 } 385 }
386 }; 386 };
387 387
388 /** 388 /**
389 * @typedef {{ 389 * @typedef {{
390 * debuggerCallFrame: (SDK.DebuggerModel.CallFrame|undefined), 390 * debuggerCallFrame: (SDK.DebuggerModel.CallFrame|undefined),
391 * asyncStackHeader: (string|undefined), 391 * asyncStackHeader: (string|undefined),
392 * runtimeCallFrame: (Protocol.Runtime.CallFrame|undefined), 392 * runtimeCallFrame: (Protocol.Runtime.CallFrame|undefined),
393 * promiseCreationFrame: (Protocol.Runtime.CallFrame|undefined) 393 * promiseCreationFrame: (Protocol.Runtime.CallFrame|undefined)
394 * }} 394 * }}
395 */ 395 */
396 Sources.CallStackSidebarPane.Item; 396 Sources.CallStackSidebarPane.Item;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698