OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 } |
OLD | NEW |