| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 { | 241 { |
| 242 this._closeRecordDetails(); | 242 this._closeRecordDetails(); |
| 243 this._graphRowsElementWidth = this._graphRowsElement.offsetWidth; | 243 this._graphRowsElementWidth = this._graphRowsElement.offsetWidth; |
| 244 this._headerElement.style.left = sidebarWidth + "px"; | 244 this._headerElement.style.left = sidebarWidth + "px"; |
| 245 this._headerElement.style.width = this._itemsGraphsElement.offsetWidth +
"px"; | 245 this._headerElement.style.width = this._itemsGraphsElement.offsetWidth +
"px"; |
| 246 this._scheduleRefresh(false, true); | 246 this._scheduleRefresh(false, true); |
| 247 }, | 247 }, |
| 248 | 248 |
| 249 _resetView: function() | 249 _resetView: function() |
| 250 { | 250 { |
| 251 this._windowStartTime = -1; | 251 this._windowStartTime = 0; |
| 252 this._windowEndTime = -1; | 252 this._windowEndTime = 0; |
| 253 this._boundariesAreValid = false; | 253 this._boundariesAreValid = false; |
| 254 this._adjustScrollPosition(0); | 254 this._adjustScrollPosition(0); |
| 255 this._linkifier.reset(); | 255 this._linkifier.reset(); |
| 256 this._closeRecordDetails(); | 256 this._closeRecordDetails(); |
| 257 this._automaticallySizeWindow = true; | 257 this._automaticallySizeWindow = true; |
| 258 this._presentationModel.reset(); | 258 this._presentationModel.reset(); |
| 259 }, | 259 }, |
| 260 | 260 |
| 261 | 261 |
| 262 /** | 262 /** |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 this._refreshTimeout = setTimeout(this._refresh.bind(this), 300)
; | 449 this._refreshTimeout = setTimeout(this._refresh.bind(this), 300)
; |
| 450 } | 450 } |
| 451 }, | 451 }, |
| 452 | 452 |
| 453 _refresh: function() | 453 _refresh: function() |
| 454 { | 454 { |
| 455 if (this._refreshTimeout) { | 455 if (this._refreshTimeout) { |
| 456 clearTimeout(this._refreshTimeout); | 456 clearTimeout(this._refreshTimeout); |
| 457 delete this._refreshTimeout; | 457 delete this._refreshTimeout; |
| 458 } | 458 } |
| 459 var windowStartTime = this._windowStartTime; | 459 var windowStartTime = this._windowStartTime || this._model.minimumRecord
Time(); |
| 460 var windowEndTime = this._windowEndTime; | 460 var windowEndTime = this._windowEndTime || this._model.maximumRecordTime
(); |
| 461 this._timelinePaddingLeft = this._expandOffset; | 461 this._timelinePaddingLeft = this._expandOffset; |
| 462 if (windowStartTime === -1) | |
| 463 windowStartTime = this._model.minimumRecordTime(); | |
| 464 if (windowEndTime === -1) | |
| 465 windowEndTime = this._model.maximumRecordTime(); | |
| 466 this._calculator.setWindow(windowStartTime, windowEndTime); | 462 this._calculator.setWindow(windowStartTime, windowEndTime); |
| 467 this._calculator.setDisplayWindow(this._timelinePaddingLeft, this._graph
RowsElementWidth); | 463 this._calculator.setDisplayWindow(this._timelinePaddingLeft, this._graph
RowsElementWidth); |
| 468 | 464 |
| 469 this._refreshRecords(); | 465 this._refreshRecords(); |
| 470 if (!this._boundariesAreValid) { | 466 if (!this._boundariesAreValid) { |
| 471 this._updateEventDividers(); | 467 this._updateEventDividers(); |
| 472 if (this._frameContainer) | 468 if (this._frameContainer) |
| 473 this._frameContainer.remove(); | 469 this._frameContainer.remove(); |
| 474 if (this._frameModel) { | 470 if (this._frameModel) { |
| 475 var frames = this._frameModel.filteredFrames(windowStartTime, wi
ndowEndTime); | 471 var frames = this._frameModel.filteredFrames(windowStartTime, wi
ndowEndTime); |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 this._element.classList.remove("hidden"); | 1299 this._element.classList.remove("hidden"); |
| 1304 } else | 1300 } else |
| 1305 this._element.classList.add("hidden"); | 1301 this._element.classList.add("hidden"); |
| 1306 }, | 1302 }, |
| 1307 | 1303 |
| 1308 _dispose: function() | 1304 _dispose: function() |
| 1309 { | 1305 { |
| 1310 this._element.remove(); | 1306 this._element.remove(); |
| 1311 } | 1307 } |
| 1312 } | 1308 } |
| OLD | NEW |