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

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

Issue 2436953003: [Devtools] Highlight navigation request in network timeline exp (Closed)
Patch Set: changes Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
index 1b5778e1c9a6e696a91c91c631a6d2120037f15c..06dd35d39fbd0eaa8fa66c4b875b0bd2487a52f2 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -329,11 +329,21 @@ WebInspector.NetworkLogView.prototype = {
_redrawTimelineColumn: function()
{
- /** @type {!Array<!WebInspector.NetworkRequest>|undefined} */
- var requests;
- if (this._timelineRequestsAreStale)
- requests = this._getOrderedRequests();
- this._timelineColumn.update(requests);
+ if (!this._timelineRequestsAreStale) {
+ this._timelineColumn.update();
+ return;
+ }
+ var currentNode = this._dataGrid.rootNode();
+ var requestData = {
+ requests: [],
+ navigationRequest: null
+ };
+ while (currentNode = currentNode.traverseNextNode(true)) {
+ if (currentNode.isNavigationRequest())
+ requestData.navigationRequest = currentNode.request();
+ requestData.requests.push(currentNode.request());
+ }
+ this._timelineColumn.update(requestData);
},
_showRecordingHint: function()
@@ -731,15 +741,6 @@ WebInspector.NetworkLogView.prototype = {
this._timelineRequestsAreStale = true;
},
- _getOrderedRequests: function()
- {
- var currentNode = this._dataGrid.rootNode();
- var requestData = [];
- while (currentNode = currentNode.traverseNextNode(true))
- requestData.push(currentNode.request());
- return requestData;
- },
-
reset: function()
{
this._requestWithHighlightedInitiators = null;

Powered by Google App Engine
This is Rietveld 408576698