OLD | NEW |
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 24 matching lines...) Expand all Loading... |
35 this.element.tabIndex = 0; | 35 this.element.tabIndex = 0; |
36 this.callFrameList = new WebInspector.UIList(); | 36 this.callFrameList = new WebInspector.UIList(); |
37 this.callFrameList.show(this.element); | 37 this.callFrameList.show(this.element); |
38 this._linkifier = new WebInspector.Linkifier(); | 38 this._linkifier = new WebInspector.Linkifier(); |
39 WebInspector.moduleSetting("enableAsyncStackTraces").addChangeListener(this.
_asyncStackTracesStateChanged, this); | 39 WebInspector.moduleSetting("enableAsyncStackTraces").addChangeListener(this.
_asyncStackTracesStateChanged, this); |
40 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this.
_update, this); | 40 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this.
_update, this); |
41 /** @type {!Array<!WebInspector.CallStackSidebarPane.CallFrame>} */ | 41 /** @type {!Array<!WebInspector.CallStackSidebarPane.CallFrame>} */ |
42 this.callFrames = []; | 42 this.callFrames = []; |
43 this._locationPool = new WebInspector.LiveLocationPool(); | 43 this._locationPool = new WebInspector.LiveLocationPool(); |
44 this._update(); | 44 this._update(); |
45 } | 45 }; |
46 | 46 |
47 WebInspector.CallStackSidebarPane.prototype = { | 47 WebInspector.CallStackSidebarPane.prototype = { |
48 /** | 48 /** |
49 * @override | 49 * @override |
50 * @param {?Object} object | 50 * @param {?Object} object |
51 */ | 51 */ |
52 flavorChanged: function(object) | 52 flavorChanged: function(object) |
53 { | 53 { |
54 this._update(); | 54 this._update(); |
55 }, | 55 }, |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 | 462 |
463 _keyDown: function(event) | 463 _keyDown: function(event) |
464 { | 464 { |
465 if (event.altKey || event.shiftKey || event.metaKey || event.ctrlKey) | 465 if (event.altKey || event.shiftKey || event.metaKey || event.ctrlKey) |
466 return; | 466 return; |
467 if (event.key === "ArrowUp" && this._selectPreviousCallFrameOnStack() ||
event.key === "ArrowDown" && this._selectNextCallFrameOnStack()) | 467 if (event.key === "ArrowUp" && this._selectPreviousCallFrameOnStack() ||
event.key === "ArrowDown" && this._selectNextCallFrameOnStack()) |
468 event.consume(true); | 468 event.consume(true); |
469 }, | 469 }, |
470 | 470 |
471 __proto__: WebInspector.SimpleView.prototype | 471 __proto__: WebInspector.SimpleView.prototype |
472 } | 472 }; |
473 | 473 |
474 /** | 474 /** |
475 * @constructor | 475 * @constructor |
476 * @extends {WebInspector.UIList.Item} | 476 * @extends {WebInspector.UIList.Item} |
477 * @param {string} functionName | 477 * @param {string} functionName |
478 * @param {!WebInspector.DebuggerModel.Location} location | 478 * @param {!WebInspector.DebuggerModel.Location} location |
479 * @param {!WebInspector.Linkifier} linkifier | 479 * @param {!WebInspector.Linkifier} linkifier |
480 * @param {?WebInspector.DebuggerModel.CallFrame} debuggerCallFrame | 480 * @param {?WebInspector.DebuggerModel.CallFrame} debuggerCallFrame |
481 * @param {!WebInspector.LiveLocationPool} locationPool | 481 * @param {!WebInspector.LiveLocationPool} locationPool |
482 * @param {!WebInspector.UIList.Item=} asyncCallFrame | 482 * @param {!WebInspector.UIList.Item=} asyncCallFrame |
483 */ | 483 */ |
484 WebInspector.CallStackSidebarPane.CallFrame = function(functionName, location, l
inkifier, debuggerCallFrame, locationPool, asyncCallFrame) | 484 WebInspector.CallStackSidebarPane.CallFrame = function(functionName, location, l
inkifier, debuggerCallFrame, locationPool, asyncCallFrame) |
485 { | 485 { |
486 WebInspector.UIList.Item.call(this, WebInspector.beautifyFunctionName(functi
onName), ""); | 486 WebInspector.UIList.Item.call(this, WebInspector.beautifyFunctionName(functi
onName), ""); |
487 this._location = location; | 487 this._location = location; |
488 this._debuggerCallFrame = debuggerCallFrame; | 488 this._debuggerCallFrame = debuggerCallFrame; |
489 this._asyncCallFrame = asyncCallFrame; | 489 this._asyncCallFrame = asyncCallFrame; |
490 WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(location,
this._update.bind(this), locationPool); | 490 WebInspector.debuggerWorkspaceBinding.createCallFrameLiveLocation(location,
this._update.bind(this), locationPool); |
491 } | 491 }; |
492 | 492 |
493 WebInspector.CallStackSidebarPane.CallFrame.prototype = { | 493 WebInspector.CallStackSidebarPane.CallFrame.prototype = { |
494 /** | 494 /** |
495 * @param {!WebInspector.LiveLocation} liveLocation | 495 * @param {!WebInspector.LiveLocation} liveLocation |
496 */ | 496 */ |
497 _update: function(liveLocation) | 497 _update: function(liveLocation) |
498 { | 498 { |
499 var uiLocation = liveLocation.uiLocation(); | 499 var uiLocation = liveLocation.uiLocation(); |
500 if (!uiLocation) | 500 if (!uiLocation) |
501 return; | 501 return; |
502 var text = uiLocation.linkText(); | 502 var text = uiLocation.linkText(); |
503 this.setSubtitle(text.trimMiddle(30)); | 503 this.setSubtitle(text.trimMiddle(30)); |
504 this.subtitleElement.title = text; | 504 this.subtitleElement.title = text; |
505 }, | 505 }, |
506 | 506 |
507 __proto__: WebInspector.UIList.Item.prototype | 507 __proto__: WebInspector.UIList.Item.prototype |
508 } | 508 }; |
OLD | NEW |