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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js

Issue 2156523003: [DevTools] Fix links for JSFrame records in timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @param {!WebInspector.TimelineModel} model 8 * @param {!WebInspector.TimelineModel} model
9 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters 9 * @param {!Array<!WebInspector.TimelineModel.Filter>} filters
10 */ 10 */
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 /** 78 /**
79 * @param {?WebInspector.TimelineProfileTree.Node} node 79 * @param {?WebInspector.TimelineProfileTree.Node} node
80 */ 80 */
81 _onHover: function(node) { }, 81 _onHover: function(node) { },
82 82
83 /** 83 /**
84 * @param {!RuntimeAgent.CallFrame} frame 84 * @param {!RuntimeAgent.CallFrame} frame
85 * @return {!Element} 85 * @return {!Element}
86 */ 86 */
87 linkifyLocationForTracing: function(frame)
alph 2016/07/18 19:49:21 nit: Make it private.
kozy 2016/07/18 22:57:22 Done.
88 {
89 return this._linkifier.linkifyConsoleCallFrameForTracing(this._model.tar get(), frame);
90 },
91
92 /**
93 * @param {!RuntimeAgent.CallFrame} frame
94 * @return {!Element}
95 */
87 linkifyLocation: function(frame) 96 linkifyLocation: function(frame)
88 { 97 {
89 return this._linkifier.linkifyConsoleCallFrameForTimeline(this._model.ta rget(), frame); 98 return this._linkifier.linkifyConsoleCallFrame(this._model.target(), fra me);
90 }, 99 },
91 100
92 /** 101 /**
93 * @param {!WebInspector.TimelineProfileTree.Node} treeNode 102 * @param {!WebInspector.TimelineProfileTree.Node} treeNode
94 * @param {boolean} suppressSelectedEvent 103 * @param {boolean} suppressSelectedEvent
95 */ 104 */
96 selectProfileNode: function(treeNode, suppressSelectedEvent) 105 selectProfileNode: function(treeNode, suppressSelectedEvent)
97 { 106 {
98 var pathToRoot = []; 107 var pathToRoot = [];
99 for (var node = treeNode; node; node = node.parent) 108 for (var node = treeNode; node; node = node.parent)
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 var data = event.args["data"]; 349 var data = event.args["data"];
341 var deoptReason = data && data["deoptReason"]; 350 var deoptReason = data && data["deoptReason"];
342 if (deoptReason && deoptReason !== "no reason") 351 if (deoptReason && deoptReason !== "no reason")
343 container.createChild("div", "activity-warning").title = WebInsp ector.UIString("Not optimized: %s", deoptReason); 352 container.createChild("div", "activity-warning").title = WebInsp ector.UIString("Not optimized: %s", deoptReason);
344 name.textContent = event.name === WebInspector.TimelineModel.RecordT ype.JSFrame 353 name.textContent = event.name === WebInspector.TimelineModel.RecordT ype.JSFrame
345 ? WebInspector.beautifyFunctionName(event.args["data"]["function Name"]) 354 ? WebInspector.beautifyFunctionName(event.args["data"]["function Name"])
346 : WebInspector.TimelineUIUtils.eventTitle(event); 355 : WebInspector.TimelineUIUtils.eventTitle(event);
347 var frame = WebInspector.TimelineProfileTree.eventStackFrame(event); 356 var frame = WebInspector.TimelineProfileTree.eventStackFrame(event);
348 if (frame && frame["url"]) { 357 if (frame && frame["url"]) {
349 var callFrame = /** @type {!RuntimeAgent.CallFrame} */ (frame); 358 var callFrame = /** @type {!RuntimeAgent.CallFrame} */ (frame);
350 container.createChild("div", "activity-link").appendChild(this._ treeView.linkifyLocation(callFrame)); 359 var linkifiedLocation = event.name === WebInspector.TimelineMode l.RecordType.JSFrame
360 ? this._treeView.linkifyLocation(callFrame)
361 : this._treeView.linkifyLocationForTracing(callFrame);
362 container.createChild("div", "activity-link").appendChild(linkif iedLocation);
351 } 363 }
352 icon.style.backgroundColor = WebInspector.TimelineUIUtils.eventColor (event); 364 icon.style.backgroundColor = WebInspector.TimelineUIUtils.eventColor (event);
353 } 365 }
354 return cell; 366 return cell;
355 }, 367 },
356 368
357 /** 369 /**
358 * @param {string} columnIdentifier 370 * @param {string} columnIdentifier
359 * @return {?Element} 371 * @return {?Element}
360 */ 372 */
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode; 889 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode;
878 }, 890 },
879 891
880 _onSelectionChanged: function() 892 _onSelectionChanged: function()
881 { 893 {
882 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged); 894 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged);
883 }, 895 },
884 896
885 __proto__: WebInspector.VBox.prototype 897 __proto__: WebInspector.VBox.prototype
886 } 898 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698