| 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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 --columnNumber; | 612 --columnNumber; |
| 613 return linkifier.linkifyScriptLocation(target, scriptId, url, lineNumber
- 1, columnNumber, "timeline-details"); | 613 return linkifier.linkifyScriptLocation(target, scriptId, url, lineNumber
- 1, columnNumber, "timeline-details"); |
| 614 } | 614 } |
| 615 | 615 |
| 616 /** | 616 /** |
| 617 * @return {?Element} | 617 * @return {?Element} |
| 618 */ | 618 */ |
| 619 function linkifyTopCallFrame() | 619 function linkifyTopCallFrame() |
| 620 { | 620 { |
| 621 var frame = WebInspector.TimelineUIUtils.topStackFrame(event); | 621 var frame = WebInspector.TimelineUIUtils.topStackFrame(event); |
| 622 return frame ? linkifier.linkifyConsoleCallFrame(target, frame, "timelin
e-details") : null; | 622 return frame ? linkifier.linkifyConsoleCallFrameForTimeline(target, fram
e, "timeline-details") : null; |
| 623 } | 623 } |
| 624 } | 624 } |
| 625 | 625 |
| 626 /** | 626 /** |
| 627 * @param {!WebInspector.TracingModel.Event} event | 627 * @param {!WebInspector.TracingModel.Event} event |
| 628 * @param {!WebInspector.TimelineModel} model | 628 * @param {!WebInspector.TimelineModel} model |
| 629 * @param {!WebInspector.Linkifier} linkifier | 629 * @param {!WebInspector.Linkifier} linkifier |
| 630 * @param {boolean} detailed | 630 * @param {boolean} detailed |
| 631 * @param {function(!DocumentFragment)} callback | 631 * @param {function(!DocumentFragment)} callback |
| 632 */ | 632 */ |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 var priority = WebInspector.uiLabelForPriority(/** @type {!NetworkAgent.
ResourcePriority} */ (request.priority)); | 989 var priority = WebInspector.uiLabelForPriority(/** @type {!NetworkAgent.
ResourcePriority} */ (request.priority)); |
| 990 contentHelper.appendTextRow(WebInspector.UIString("Priority"), priority)
; | 990 contentHelper.appendTextRow(WebInspector.UIString("Priority"), priority)
; |
| 991 } | 991 } |
| 992 if (request.mimeType) | 992 if (request.mimeType) |
| 993 contentHelper.appendTextRow(WebInspector.UIString("Mime Type"), request.
mimeType); | 993 contentHelper.appendTextRow(WebInspector.UIString("Mime Type"), request.
mimeType); |
| 994 | 994 |
| 995 var title = WebInspector.UIString("Initiator"); | 995 var title = WebInspector.UIString("Initiator"); |
| 996 var sendRequest = request.children[0]; | 996 var sendRequest = request.children[0]; |
| 997 var topFrame = WebInspector.TimelineUIUtils.topStackFrame(sendRequest); | 997 var topFrame = WebInspector.TimelineUIUtils.topStackFrame(sendRequest); |
| 998 if (topFrame) { | 998 if (topFrame) { |
| 999 contentHelper.appendElementRow(title, linkifier.linkifyConsoleCallFrame(
target, topFrame)); | 999 contentHelper.appendElementRow(title, linkifier.linkifyConsoleCallFrameF
orTimeline(target, topFrame)); |
| 1000 } else if (sendRequest.initiator) { | 1000 } else if (sendRequest.initiator) { |
| 1001 var initiatorURL = WebInspector.TimelineUIUtils.eventURL(sendRequest.ini
tiator); | 1001 var initiatorURL = WebInspector.TimelineUIUtils.eventURL(sendRequest.ini
tiator); |
| 1002 if (initiatorURL) | 1002 if (initiatorURL) |
| 1003 contentHelper.appendElementRow(title, linkifier.linkifyScriptLocatio
n(target, null, initiatorURL, 0)); | 1003 contentHelper.appendElementRow(title, linkifier.linkifyScriptLocatio
n(target, null, initiatorURL, 0)); |
| 1004 } | 1004 } |
| 1005 | 1005 |
| 1006 /** | 1006 /** |
| 1007 * @param {function(?Element)} fulfill | 1007 * @param {function(?Element)} fulfill |
| 1008 */ | 1008 */ |
| 1009 function action(fulfill) | 1009 function action(fulfill) |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 else | 1234 else |
| 1235 title.createTextChild(WebInspector.UIString("Unknown cause for ")); | 1235 title.createTextChild(WebInspector.UIString("Unknown cause for ")); |
| 1236 | 1236 |
| 1237 this._appendTruncatedNodeList(title, this._invalidations); | 1237 this._appendTruncatedNodeList(title, this._invalidations); |
| 1238 | 1238 |
| 1239 if (topFrame && this._contentHelper.linkifier()) { | 1239 if (topFrame && this._contentHelper.linkifier()) { |
| 1240 title.createTextChild(WebInspector.UIString(". ")); | 1240 title.createTextChild(WebInspector.UIString(". ")); |
| 1241 var stack = title.createChild("span", "monospace"); | 1241 var stack = title.createChild("span", "monospace"); |
| 1242 stack.createChild("span").textContent = WebInspector.beautifyFunctio
nName(topFrame.functionName); | 1242 stack.createChild("span").textContent = WebInspector.beautifyFunctio
nName(topFrame.functionName); |
| 1243 stack.createChild("span").textContent = " @ "; | 1243 stack.createChild("span").textContent = " @ "; |
| 1244 stack.createChild("span").appendChild(this._contentHelper.linkifier(
).linkifyConsoleCallFrame(target, topFrame)); | 1244 stack.createChild("span").appendChild(this._contentHelper.linkifier(
).linkifyConsoleCallFrameForTimeline(target, topFrame)); |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 return title; | 1247 return title; |
| 1248 }, | 1248 }, |
| 1249 | 1249 |
| 1250 /** | 1250 /** |
| 1251 * @override | 1251 * @override |
| 1252 */ | 1252 */ |
| 1253 onpopulate: function() | 1253 onpopulate: function() |
| 1254 { | 1254 { |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2138 case warnings.V8Deopt: | 2138 case warnings.V8Deopt: |
| 2139 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl
eChrome/devtools-docs/issues/53", | 2139 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl
eChrome/devtools-docs/issues/53", |
| 2140 WebInspector.UIString("Not optimized"), undefined, true)); | 2140 WebInspector.UIString("Not optimized"), undefined, true)); |
| 2141 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso
n"])); | 2141 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso
n"])); |
| 2142 break; | 2142 break; |
| 2143 default: | 2143 default: |
| 2144 console.assert(false, "Unhandled TimelineModel.WarningType"); | 2144 console.assert(false, "Unhandled TimelineModel.WarningType"); |
| 2145 } | 2145 } |
| 2146 return span; | 2146 return span; |
| 2147 } | 2147 } |
| OLD | NEW |