| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 || this._model.minimumRecord
Time(); | 459 var windowStartTime = this._windowStartTime || this._model.minimumRecord
Time(); |
| 460 var windowEndTime = this._windowEndTime || this._model.maximumRecordTime
(); | 460 var windowEndTime = this._windowEndTime || this._model.maximumRecordTime
(); |
| 461 this._timelinePaddingLeft = this._expandOffset; | 461 this._timelinePaddingLeft = this._expandOffset; |
| 462 this._calculator.setWindow(windowStartTime, windowEndTime); | 462 this._calculator.setWindow(windowStartTime, windowEndTime); |
| 463 this._calculator.setDisplayWindow(this._timelinePaddingLeft, this._graph
RowsElementWidth); | 463 this._calculator.setDisplayWindow(this._graphRowsElementWidth, this._tim
elinePaddingLeft); |
| 464 | 464 |
| 465 this._refreshRecords(); | 465 this._refreshRecords(); |
| 466 if (!this._boundariesAreValid) { | 466 if (!this._boundariesAreValid) { |
| 467 this._updateEventDividers(); | 467 this._updateEventDividers(); |
| 468 if (this._frameContainer) | 468 if (this._frameContainer) |
| 469 this._frameContainer.remove(); | 469 this._frameContainer.remove(); |
| 470 if (this._frameModel) { | 470 if (this._frameModel) { |
| 471 var frames = this._frameModel.filteredFrames(windowStartTime, wi
ndowEndTime); | 471 var frames = this._frameModel.filteredFrames(windowStartTime, wi
ndowEndTime); |
| 472 const maxFramesForFrameBars = 30; | 472 const maxFramesForFrameBars = 30; |
| 473 if (frames.length && frames.length < maxFramesForFrameBars) { | 473 if (frames.length && frames.length < maxFramesForFrameBars) { |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 return {left: left, width: width, cpuWidth: cpuWidth}; | 959 return {left: left, width: width, cpuWidth: cpuWidth}; |
| 960 }, | 960 }, |
| 961 | 961 |
| 962 setWindow: function(minimumBoundary, maximumBoundary) | 962 setWindow: function(minimumBoundary, maximumBoundary) |
| 963 { | 963 { |
| 964 this._minimumBoundary = minimumBoundary; | 964 this._minimumBoundary = minimumBoundary; |
| 965 this._maximumBoundary = maximumBoundary; | 965 this._maximumBoundary = maximumBoundary; |
| 966 }, | 966 }, |
| 967 | 967 |
| 968 /** | 968 /** |
| 969 * @param {number} paddingLeft | |
| 970 * @param {number} clientWidth | 969 * @param {number} clientWidth |
| 970 * @param {number=} paddingLeft |
| 971 */ | 971 */ |
| 972 setDisplayWindow: function(paddingLeft, clientWidth) | 972 setDisplayWindow: function(clientWidth, paddingLeft) |
| 973 { | 973 { |
| 974 this._workingArea = clientWidth - WebInspector.TimelineCalculator._minWi
dth - paddingLeft; | 974 this._paddingLeft = paddingLeft || 0; |
| 975 this._paddingLeft = paddingLeft; | 975 this._workingArea = clientWidth - WebInspector.TimelineCalculator._minWi
dth - this._paddingLeft; |
| 976 }, | 976 }, |
| 977 | 977 |
| 978 /** | 978 /** |
| 979 * @override | 979 * @override |
| 980 * @param {number} value | 980 * @param {number} value |
| 981 * @param {number=} precision | 981 * @param {number=} precision |
| 982 * @return {string} | 982 * @return {string} |
| 983 */ | 983 */ |
| 984 formatTime: function(value, precision) | 984 formatTime: function(value, precision) |
| 985 { | 985 { |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 } else { | 1300 } else { |
| 1301 this._element.classList.add("hidden"); | 1301 this._element.classList.add("hidden"); |
| 1302 } | 1302 } |
| 1303 }, | 1303 }, |
| 1304 | 1304 |
| 1305 _dispose: function() | 1305 _dispose: function() |
| 1306 { | 1306 { |
| 1307 this._element.remove(); | 1307 this._element.remove(); |
| 1308 } | 1308 } |
| 1309 } | 1309 } |
| OLD | NEW |