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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js

Issue 1666563005: DevTools: merge ScriptCallStack and ScriptAsyncCallStack, move CallStacks from console to Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: testts Created 4 years, 10 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 /* 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
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698