| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> | 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> |
| 4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 _getPopoverAnchor: function(element, event) | 1224 _getPopoverAnchor: function(element, event) |
| 1225 { | 1225 { |
| 1226 if (!this._gridMode) | 1226 if (!this._gridMode) |
| 1227 return; | 1227 return; |
| 1228 var anchor = element.enclosingNodeOrSelfWithClass("network-graph-bar") |
| element.enclosingNodeOrSelfWithClass("network-graph-label"); | 1228 var anchor = element.enclosingNodeOrSelfWithClass("network-graph-bar") |
| element.enclosingNodeOrSelfWithClass("network-graph-label"); |
| 1229 if (anchor && anchor.parentElement.request && anchor.parentElement.reque
st.timing) | 1229 if (anchor && anchor.parentElement.request && anchor.parentElement.reque
st.timing) |
| 1230 return anchor; | 1230 return anchor; |
| 1231 anchor = element.enclosingNodeOrSelfWithClass("network-script-initiated"
); | 1231 anchor = element.enclosingNodeOrSelfWithClass("network-script-initiated"
); |
| 1232 if (anchor && anchor.request) { | 1232 if (anchor && anchor.request) { |
| 1233 var initiator = /** @type {!WebInspector.NetworkRequest} */ (anchor.
request).initiator(); | 1233 var initiator = /** @type {!WebInspector.NetworkRequest} */ (anchor.
request).initiator(); |
| 1234 if (initiator && (initiator.stackTrace || initiator.asyncStackTrace)
) | 1234 if (initiator && initiator.stack) |
| 1235 return anchor; | 1235 return anchor; |
| 1236 } | 1236 } |
| 1237 }, | 1237 }, |
| 1238 | 1238 |
| 1239 /** | 1239 /** |
| 1240 * @param {!Element} anchor | 1240 * @param {!Element} anchor |
| 1241 * @param {!WebInspector.Popover} popover | 1241 * @param {!WebInspector.Popover} popover |
| 1242 */ | 1242 */ |
| 1243 _showPopover: function(anchor, popover) | 1243 _showPopover: function(anchor, popover) |
| 1244 { | 1244 { |
| 1245 var content; | 1245 var content; |
| 1246 if (anchor.classList.contains("network-script-initiated")) { | 1246 if (anchor.classList.contains("network-script-initiated")) { |
| 1247 var request = /** @type {!WebInspector.NetworkRequest} */ (anchor.re
quest); | 1247 var request = /** @type {!WebInspector.NetworkRequest} */ (anchor.re
quest); |
| 1248 var initiator = /** @type {!NetworkAgent.Initiator} */ (request.init
iator()); | 1248 var initiator = /** @type {!NetworkAgent.Initiator} */ (request.init
iator()); |
| 1249 content = WebInspector.DOMPresentationUtils.buildStackTracePreviewCo
ntents(request.target(), this._popupLinkifier, initiator.stackTrace, initiator.a
syncStackTrace); | 1249 content = WebInspector.DOMPresentationUtils.buildStackTracePreviewCo
ntents(request.target(), this._popupLinkifier, initiator.stack); |
| 1250 popover.setCanShrink(true); | 1250 popover.setCanShrink(true); |
| 1251 } else { | 1251 } else { |
| 1252 content = WebInspector.RequestTimingView.createTimingTable(anchor.pa
rentElement.request, this._timeCalculator.minimumBoundary()); | 1252 content = WebInspector.RequestTimingView.createTimingTable(anchor.pa
rentElement.request, this._timeCalculator.minimumBoundary()); |
| 1253 popover.setCanShrink(false); | 1253 popover.setCanShrink(false); |
| 1254 } | 1254 } |
| 1255 popover.showForAnchor(content, anchor); | 1255 popover.showForAnchor(content, anchor); |
| 1256 }, | 1256 }, |
| 1257 | 1257 |
| 1258 _onHidePopover: function() | 1258 _onHidePopover: function() |
| 1259 { | 1259 { |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 return false; | 2167 return false; |
| 2168 return true; | 2168 return true; |
| 2169 } | 2169 } |
| 2170 | 2170 |
| 2171 WebInspector.NetworkLogView.EventTypes = { | 2171 WebInspector.NetworkLogView.EventTypes = { |
| 2172 RequestSelected: "RequestSelected", | 2172 RequestSelected: "RequestSelected", |
| 2173 SearchCountUpdated: "SearchCountUpdated", | 2173 SearchCountUpdated: "SearchCountUpdated", |
| 2174 SearchIndexUpdated: "SearchIndexUpdated", | 2174 SearchIndexUpdated: "SearchIndexUpdated", |
| 2175 UpdateRequest: "UpdateRequest" | 2175 UpdateRequest: "UpdateRequest" |
| 2176 }; | 2176 }; |
| OLD | NEW |