Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /** | 1 /** |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 | 86 |
| 87 this._dataProvider = dataProvider; | 87 this._dataProvider = dataProvider; |
| 88 | 88 |
| 89 this._windowLeft = 0.0; | 89 this._windowLeft = 0.0; |
| 90 this._windowRight = 1.0; | 90 this._windowRight = 1.0; |
| 91 this._windowWidth = 1.0; | 91 this._windowWidth = 1.0; |
| 92 this._timeWindowLeft = 0; | 92 this._timeWindowLeft = 0; |
| 93 this._timeWindowRight = Infinity; | 93 this._timeWindowRight = Infinity; |
| 94 this._barHeight = dataProvider.barHeight(); | 94 this._barHeight = dataProvider.barHeight(); |
| 95 this._barHeightDelta = this._isTopDown ? -this._barHeight : this._barHeight; | 95 this._barHeightDelta = this._isTopDown ? -this._barHeight : this._barHeight; |
| 96 this._minWidth = 1; | 96 this._minWidth = 2; |
| 97 this._paddingLeft = this._dataProvider.paddingLeft(); | 97 this._paddingLeft = this._dataProvider.paddingLeft(); |
| 98 this._markerPadding = 2; | 98 this._markerPadding = 2; |
| 99 this._markerRadius = this._barHeight / 2 - this._markerPadding; | 99 this._markerRadius = this._barHeight / 2 - this._markerPadding; |
| 100 this._highlightedMarkerIndex = -1; | 100 this._highlightedMarkerIndex = -1; |
| 101 this._highlightedEntryIndex = -1; | 101 this._highlightedEntryIndex = -1; |
| 102 this._selectedEntryIndex = -1; | 102 this._selectedEntryIndex = -1; |
| 103 this._rawTimelineDataLength = 0; | 103 this._rawTimelineDataLength = 0; |
| 104 this._textWidth = {}; | 104 this._textWidth = {}; |
| 105 } | 105 } |
| 106 | 106 |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 901 var timeWindowRight = this._timeWindowRight; | 901 var timeWindowRight = this._timeWindowRight; |
| 902 var timeWindowLeft = this._timeWindowLeft; | 902 var timeWindowLeft = this._timeWindowLeft; |
| 903 var timeToPixel = this._timeToPixel; | 903 var timeToPixel = this._timeToPixel; |
| 904 var pixelWindowLeft = this._pixelWindowLeft; | 904 var pixelWindowLeft = this._pixelWindowLeft; |
| 905 var paddingLeft = this._paddingLeft; | 905 var paddingLeft = this._paddingLeft; |
| 906 var minWidth = this._minWidth; | 906 var minWidth = this._minWidth; |
| 907 var entryTotalTimes = timelineData.entryTotalTimes; | 907 var entryTotalTimes = timelineData.entryTotalTimes; |
| 908 var entryStartTimes = timelineData.entryStartTimes; | 908 var entryStartTimes = timelineData.entryStartTimes; |
| 909 var entryLevels = timelineData.entryLevels; | 909 var entryLevels = timelineData.entryLevels; |
| 910 | 910 |
| 911 var titleIndices = new Uint32Array(timelineData.entryTotalTimes); | 911 var titleIndices = new Uint32Array(entryTotalTimes); |
|
alph
2014/11/12 13:42:57
could you please add .length
yurys
2014/11/12 13:46:50
Done.
| |
| 912 var nextTitleIndex = 0; | 912 var nextTitleIndex = 0; |
| 913 var markerIndices = new Uint32Array(timelineData.entryTotalTimes); | 913 var markerIndices = new Uint32Array(entryTotalTimes); |
|
alph
2014/11/12 13:42:57
ditto
yurys
2014/11/12 13:46:50
Done.
| |
| 914 var nextMarkerIndex = 0; | 914 var nextMarkerIndex = 0; |
| 915 var textPadding = this._dataProvider.textPadding(); | 915 var textPadding = this._dataProvider.textPadding(); |
| 916 this._minTextWidth = 2 * textPadding + this._measureWidth(context, "\u20 26"); | 916 this._minTextWidth = 2 * textPadding + this._measureWidth(context, "\u20 26"); |
| 917 var minTextWidth = this._minTextWidth; | 917 var minTextWidth = this._minTextWidth; |
| 918 | 918 |
| 919 var barHeight = this._barHeight; | 919 var barHeight = this._barHeight; |
| 920 | 920 |
| 921 var timeToPosition = this._timeToPosition.bind(this); | 921 var timeToPosition = this._timeToPosition.bind(this); |
| 922 var textBaseHeight = this._baseHeight + barHeight - this._dataProvider.t extBaseline(); | 922 var textBaseHeight = this._baseHeight + barHeight - this._dataProvider.t extBaseline(); |
| 923 var colorBuckets = {}; | 923 var colorBuckets = {}; |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1310 this.update(); | 1310 this.update(); |
| 1311 }, | 1311 }, |
| 1312 | 1312 |
| 1313 _enabled: function() | 1313 _enabled: function() |
| 1314 { | 1314 { |
| 1315 return this._rawTimelineDataLength !== 0; | 1315 return this._rawTimelineDataLength !== 0; |
| 1316 }, | 1316 }, |
| 1317 | 1317 |
| 1318 __proto__: WebInspector.HBox.prototype | 1318 __proto__: WebInspector.HBox.prototype |
| 1319 } | 1319 } |
| OLD | NEW |