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

Side by Side Diff: Source/devtools/front_end/TimelineModel.js

Issue 185543012: TimelinePanel: REGRESSIONS: three fixes for TimelineOverviewPane. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 * @return {number} 350 * @return {number}
351 */ 351 */
352 maximumRecordTime: function() 352 maximumRecordTime: function()
353 { 353 {
354 return this._maximumRecordTime; 354 return this._maximumRecordTime;
355 }, 355 },
356 356
357 /** 357 /**
358 * @param {!TimelineAgent.TimelineEvent} record 358 * @param {!TimelineAgent.TimelineEvent} record
359 */ 359 */
360 _updateBoundaries: function(record) 360 _updateBoundaries: function(record)
pfeldman 2014/03/04 06:26:52 This should be called on the WebInspector.TimlineM
361 { 361 {
362 var startTime = record.startTime; 362 var startTime = record.startTime;
363 var endTime = record.endTime; 363 var endTime = record.endTime;
364 364
365 if (this._minimumRecordTime === -1 || startTime < this._minimumRecordTim e) 365 if (this._minimumRecordTime === -1 || startTime < this._minimumRecordTim e)
366 this._minimumRecordTime = startTime; 366 this._minimumRecordTime = startTime;
367 if (this._maximumRecordTime === -1 || endTime > this._maximumRecordTime) 367 if ((this._maximumRecordTime === -1 && endTime) || endTime > this._maxim umRecordTime)
368 this._maximumRecordTime = endTime; 368 this._maximumRecordTime = endTime;
369 }, 369 },
370 370
371 /** 371 /**
372 * @param {!Object} rawRecord 372 * @param {!Object} rawRecord
373 * @return {number} 373 * @return {number}
374 */ 374 */
375 recordOffsetInMillis: function(rawRecord) 375 recordOffsetInMillis: function(rawRecord)
376 { 376 {
377 return rawRecord.startTime - this._minimumRecordTime; 377 return rawRecord.startTime - this._minimumRecordTime;
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 WebInspector.TimelineModel._quadFromRectData = function(data) 1039 WebInspector.TimelineModel._quadFromRectData = function(data)
1040 { 1040 {
1041 if (typeof data["x"] === "undefined" || typeof data["y"] === "undefined") 1041 if (typeof data["x"] === "undefined" || typeof data["y"] === "undefined")
1042 return null; 1042 return null;
1043 var x0 = data["x"]; 1043 var x0 = data["x"];
1044 var x1 = data["x"] + data["width"]; 1044 var x1 = data["x"] + data["width"];
1045 var y0 = data["y"]; 1045 var y0 = data["y"];
1046 var y1 = data["y"] + data["height"]; 1046 var y1 = data["y"] + data["height"];
1047 return [x0, y0, x1, y0, x1, y1, x0, y1]; 1047 return [x0, y0, x1, y0, x1, y1, x0, y1];
1048 } 1048 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/TimelineOverviewPane.js » ('j') | Source/devtools/front_end/TimelineOverviewPane.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698