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

Unified Diff: Source/devtools/front_end/TimelinePresentationModel.js

Issue 194713007: TimelinePanel: restore selectedRecord behevior by removing windowFilter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/devtools/front_end/TimelinePanel.js ('k') | Source/devtools/front_end/TimelineView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/TimelinePresentationModel.js
diff --git a/Source/devtools/front_end/TimelinePresentationModel.js b/Source/devtools/front_end/TimelinePresentationModel.js
index 4bd97df834fc778203b3e089d9e2eecae86ed003..2c44db69b1d7a62aa01f3ac229675b35f7df563c 100644
--- a/Source/devtools/front_end/TimelinePresentationModel.js
+++ b/Source/devtools/front_end/TimelinePresentationModel.js
@@ -54,6 +54,16 @@ WebInspector.TimelinePresentationModel._coalescingRecords[WebInspector.TimelineM
WebInspector.TimelinePresentationModel.prototype = {
/**
+ * @param {number} startTime
+ * @param {number} endTime
+ */
+ setWindowTimes: function(startTime, endTime)
+ {
+ this._windowStartTime = startTime;
+ this._windowEndTime = endTime;
+ },
+
+ /**
* @param {?WebInspector.TimelineModel.Record} record
* @return {?WebInspector.TimelinePresentationModel.Record}
*/
@@ -78,6 +88,8 @@ WebInspector.TimelinePresentationModel.prototype = {
this._rootRecord = new WebInspector.TimelinePresentationModel.Record(rootRecord, null);
/** @type {!Object.<string, !WebInspector.TimelinePresentationModel.Record>} */
this._coalescingBuckets = {};
+ this._windowStartTime = 0;
+ this._windowEndTime = Infinity;
},
/**
@@ -252,15 +264,17 @@ WebInspector.TimelinePresentationModel.prototype = {
if (records && entry.index < records.length) {
var record = records[entry.index];
++entry.index;
-
- if (this._model.isVisible(record.record())) {
- record._presentationParent._expandable = true;
- if (this._textFilter)
- revealRecordsInStack();
- if (!entry.parentIsCollapsed) {
- recordsInWindow.push(record);
- revealedDepth = stack.length;
- entry.parentRecord._collapsed = false;
+ var rawRecord = record.record();
+ if (rawRecord.startTime < this._windowEndTime && rawRecord.endTime > this._windowStartTime) {
+ if (this._model.isVisible(rawRecord)) {
+ record._presentationParent._expandable = true;
+ if (this._textFilter)
+ revealRecordsInStack();
+ if (!entry.parentIsCollapsed) {
+ recordsInWindow.push(record);
+ revealedDepth = stack.length;
+ entry.parentRecord._collapsed = false;
+ }
}
}
« no previous file with comments | « Source/devtools/front_end/TimelinePanel.js ('k') | Source/devtools/front_end/TimelineView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698