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

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

Issue 2151653005: DevTools: Do not linkify to pseudo (program) node when there's no URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 */ 75 */
76 _populateToolbar: function(parent) { }, 76 _populateToolbar: function(parent) { },
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 linkifyLocation: function(frame) 87 linkifyLocation: function(frame)
88 { 88 {
89 return this._linkifier.linkifyConsoleCallFrameForTimeline(this._model.ta rget(), frame); 89 return this._linkifier.maybeLinkifyConsoleCallFrameForTimeline(this._mod el.target(), frame);
90 }, 90 },
91 91
92 /** 92 /**
93 * @param {!WebInspector.TimelineProfileTree.Node} treeNode 93 * @param {!WebInspector.TimelineProfileTree.Node} treeNode
94 * @param {boolean} suppressSelectedEvent 94 * @param {boolean} suppressSelectedEvent
95 */ 95 */
96 selectProfileNode: function(treeNode, suppressSelectedEvent) 96 selectProfileNode: function(treeNode, suppressSelectedEvent)
97 { 97 {
98 var pathToRoot = []; 98 var pathToRoot = [];
99 for (var node = treeNode; node; node = node.parent) 99 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"]; 340 var data = event.args["data"];
341 var deoptReason = data && data["deoptReason"]; 341 var deoptReason = data && data["deoptReason"];
342 if (deoptReason && deoptReason !== "no reason") 342 if (deoptReason && deoptReason !== "no reason")
343 container.createChild("div", "activity-warning").title = WebInsp ector.UIString("Not optimized: %s", deoptReason); 343 container.createChild("div", "activity-warning").title = WebInsp ector.UIString("Not optimized: %s", deoptReason);
344 name.textContent = event.name === WebInspector.TimelineModel.RecordT ype.JSFrame 344 name.textContent = event.name === WebInspector.TimelineModel.RecordT ype.JSFrame
345 ? WebInspector.beautifyFunctionName(event.args["data"]["function Name"]) 345 ? WebInspector.beautifyFunctionName(event.args["data"]["function Name"])
346 : WebInspector.TimelineUIUtils.eventTitle(event); 346 : WebInspector.TimelineUIUtils.eventTitle(event);
347 var frame = WebInspector.TimelineProfileTree.eventStackFrame(event); 347 var frame = WebInspector.TimelineProfileTree.eventStackFrame(event);
348 if (frame && frame["url"]) { 348 if (frame && frame["url"]) {
349 var callFrame = /** @type {!RuntimeAgent.CallFrame} */ (frame); 349 var callFrame = /** @type {!RuntimeAgent.CallFrame} */ (frame);
350 container.createChild("div", "activity-link").appendChild(this._ treeView.linkifyLocation(callFrame)); 350 var link = this._treeView.linkifyLocation(callFrame);
351 if (link)
352 container.createChild("div", "activity-link").appendChild(li nk);
351 } 353 }
352 icon.style.backgroundColor = WebInspector.TimelineUIUtils.eventColor (event); 354 icon.style.backgroundColor = WebInspector.TimelineUIUtils.eventColor (event);
353 } 355 }
354 return cell; 356 return cell;
355 }, 357 },
356 358
357 /** 359 /**
358 * @param {string} columnIdentifier 360 * @param {string} columnIdentifier
359 * @return {?Element} 361 * @return {?Element}
360 */ 362 */
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode; 879 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode;
878 }, 880 },
879 881
880 _onSelectionChanged: function() 882 _onSelectionChanged: function()
881 { 883 {
882 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged); 884 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged);
883 }, 885 },
884 886
885 __proto__: WebInspector.VBox.prototype 887 __proto__: WebInspector.VBox.prototype
886 } 888 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698