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

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: Merge branch 'NETWORK_TIMELINE_9_REMOVE_DEPENDENCY' into NETWORK_TIMELINE_10_ADD_COLOR_NAVIGATION 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..ac0b402c7812c89abfbb94e9ac479142db1e2f95 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,19 @@ 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.draw();
dgozman 2016/10/21 20:39:21 There is no |draw| method.
allada 2016/10/21 22:22:26 Done.
+ return;
+ }
+ var currentNode = this._dataGrid.rootNode();
+ var requestData = [];
+ var navigationRequest = null;
dgozman 2016/10/21 20:39:21 |update| doesn't accept null as a second argument.
allada 2016/10/21 22:22:26 Done.
+ while (currentNode = currentNode.traverseNextNode(true)) {
+ if (currentNode.isNavigationRequest())
+ navigationRequest = currentNode.request();
+ requestData.push(currentNode.request());
+ }
+ this._timelineColumn.update(requestData, navigationRequest);
},
_showRecordingHint: function()
@@ -731,15 +739,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