| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 result = { | 206 result = { |
| 207 title: WebInspector.UIString("Unknown: %s", type), | 207 title: WebInspector.UIString("Unknown: %s", type), |
| 208 category: WebInspector.TimelineUIUtils.categories()["other"] | 208 category: WebInspector.TimelineUIUtils.categories()["other"] |
| 209 }; | 209 }; |
| 210 recordStyles[type] = result; | 210 recordStyles[type] = result; |
| 211 } | 211 } |
| 212 return result; | 212 return result; |
| 213 } | 213 } |
| 214 | 214 |
| 215 /** | 215 /** |
| 216 * @param {string=} recordType | |
| 217 * @return {boolean} | |
| 218 */ | |
| 219 WebInspector.TimelineUIUtils.needsPreviewElement = function(recordType) | |
| 220 { | |
| 221 if (!recordType) | |
| 222 return false; | |
| 223 const recordTypes = WebInspector.TimelineModel.RecordType; | |
| 224 switch (recordType) { | |
| 225 case recordTypes.ResourceSendRequest: | |
| 226 case recordTypes.ResourceReceiveResponse: | |
| 227 case recordTypes.ResourceReceivedData: | |
| 228 case recordTypes.ResourceFinish: | |
| 229 return true; | |
| 230 default: | |
| 231 return false; | |
| 232 } | |
| 233 } | |
| 234 | |
| 235 /** | |
| 236 * @param {!WebInspector.TimelineModel} model | 216 * @param {!WebInspector.TimelineModel} model |
| 237 * @param {!{name: string, tasks: !Array.<!{startTime: number, endTime: number}>
, firstTaskIndex: number, lastTaskIndex: number}} info | 217 * @param {!{name: string, tasks: !Array.<!{startTime: number, endTime: number}>
, firstTaskIndex: number, lastTaskIndex: number}} info |
| 238 * @return {!Element} | 218 * @return {!Element} |
| 239 */ | 219 */ |
| 240 WebInspector.TimelineUIUtils.generateMainThreadBarPopupContent = function(model,
info) | 220 WebInspector.TimelineUIUtils.generateMainThreadBarPopupContent = function(model,
info) |
| 241 { | 221 { |
| 242 var firstTaskIndex = info.firstTaskIndex; | 222 var firstTaskIndex = info.firstTaskIndex; |
| 243 var lastTaskIndex = info.lastTaskIndex; | 223 var lastTaskIndex = info.lastTaskIndex; |
| 244 var tasks = info.tasks; | 224 var tasks = info.tasks; |
| 245 var messageCount = lastTaskIndex - firstTaskIndex + 1; | 225 var messageCount = lastTaskIndex - firstTaskIndex + 1; |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 for (var i = 0; i < stackTrace.length; ++i) { | 640 for (var i = 0; i < stackTrace.length; ++i) { |
| 661 var stackFrame = stackTrace[i]; | 641 var stackFrame = stackTrace[i]; |
| 662 var row = stackTraceElement.createChild("div"); | 642 var row = stackTraceElement.createChild("div"); |
| 663 row.createTextChild(stackFrame.functionName || WebInspector.UIString
("(anonymous function)")); | 643 row.createTextChild(stackFrame.functionName || WebInspector.UIString
("(anonymous function)")); |
| 664 row.createTextChild(" @ "); | 644 row.createTextChild(" @ "); |
| 665 var urlElement = this._linkifier.linkifyLocation(this._target, stack
Frame.url, stackFrame.lineNumber - 1); | 645 var urlElement = this._linkifier.linkifyLocation(this._target, stack
Frame.url, stackFrame.lineNumber - 1); |
| 666 row.appendChild(urlElement); | 646 row.appendChild(urlElement); |
| 667 } | 647 } |
| 668 } | 648 } |
| 669 } | 649 } |
| OLD | NEW |