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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 1463393003: DevTools: Make item info follow the mouse on the flame chart. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 * @override 931 * @override
932 * @param {number} index 932 * @param {number} index
933 * @return {boolean} 933 * @return {boolean}
934 */ 934 */
935 forceDecoration: function(index) 935 forceDecoration: function(index)
936 { 936 {
937 return true; 937 return true;
938 }, 938 },
939 939
940 /** 940 /**
941 * @override
942 * @param {number} index
943 * @return {?Array<!{title: string, value: (string|!Element)}>}
944 */
945 prepareHighlightedEntryInfo: function(index)
946 {
947 var /** @const */ maxURLChars = 80;
948 var request = /** @type {!WebInspector.TimelineModel.NetworkRequest} */ (this._requests[index]);
949 var duration = request.endTime - request.startTime;
950 var value = "";
951 if (request.startTime && isFinite(duration))
952 value += Number.millisToString(duration) + "\u2002";
953 if (request.requestMethod)
caseq 2015/11/23 18:38:12 Let's only care for the requests for which we capt
alph 2015/11/23 19:54:46 Done.
954 value += request.requestMethod + "\u2002";
955 if (request.url)
956 value += request.url.trimMiddle(maxURLChars);
957 return value ? [{ title: "", value: value }] : null;
958 },
959
960 /**
941 * @param {!Array.<!WebInspector.TracingModel.Event>} events 961 * @param {!Array.<!WebInspector.TracingModel.Event>} events
942 */ 962 */
943 _appendTimelineData: function(events) 963 _appendTimelineData: function(events)
944 { 964 {
945 this._minimumBoundary = this._model.minimumRecordTime(); 965 this._minimumBoundary = this._model.minimumRecordTime();
946 this._maximumBoundary = this._model.maximumRecordTime(); 966 this._maximumBoundary = this._model.maximumRecordTime();
947 this._timeSpan = this._model.isEmpty() ? 1000 : this._maximumBoundary - this._minimumBoundary; 967 this._timeSpan = this._model.isEmpty() ? 1000 : this._maximumBoundary - this._minimumBoundary;
948 this._model.networkRequests().forEach(this._appendEntry.bind(this)); 968 this._model.networkRequests().forEach(this._appendEntry.bind(this));
949 this._updateTimelineData(); 969 this._updateTimelineData();
950 }, 970 },
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 /** 1310 /**
1291 * @constructor 1311 * @constructor
1292 * @param {!WebInspector.TimelineSelection} selection 1312 * @param {!WebInspector.TimelineSelection} selection
1293 * @param {number} entryIndex 1313 * @param {number} entryIndex
1294 */ 1314 */
1295 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) 1315 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex)
1296 { 1316 {
1297 this.timelineSelection = selection; 1317 this.timelineSelection = selection;
1298 this.entryIndex = entryIndex; 1318 this.entryIndex = entryIndex;
1299 } 1319 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698