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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 */ | 149 */ |
150 markerColor: function(index) { }, | 150 markerColor: function(index) { }, |
151 | 151 |
152 /** | 152 /** |
153 * @param {number} index | 153 * @param {number} index |
154 * @return {string} | 154 * @return {string} |
155 */ | 155 */ |
156 markerTitle: function(index) { }, | 156 markerTitle: function(index) { }, |
157 | 157 |
158 /** | 158 /** |
159 * @param {number} index | |
160 * @return {boolean} | |
161 */ | |
162 isTallMarker: function(index) { }, | |
caseq
2014/11/07 17:39:40
nit: I wonder if we should generalize this to mark
yurys
2014/11/07 19:55:39
I don't see other types at the moment so there is
| |
163 | |
164 /** | |
159 * @return {number} | 165 * @return {number} |
160 */ | 166 */ |
161 minimumBoundary: function() { }, | 167 minimumBoundary: function() { }, |
162 | 168 |
163 /** | 169 /** |
164 * @return {number} | 170 * @return {number} |
165 */ | 171 */ |
166 totalTime: function() { }, | 172 totalTime: function() { }, |
167 | 173 |
168 /** | 174 /** |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1031 for (var i = left; i < markerTimestamps.length; i++) { | 1037 for (var i = left; i < markerTimestamps.length; i++) { |
1032 var timestamp = markerTimestamps[i]; | 1038 var timestamp = markerTimestamps[i]; |
1033 if (timestamp > rightBoundary) | 1039 if (timestamp > rightBoundary) |
1034 break; | 1040 break; |
1035 var position = this._calculator.computePosition(timestamp); | 1041 var position = this._calculator.computePosition(timestamp); |
1036 context.strokeStyle = this._dataProvider.markerColor(i); | 1042 context.strokeStyle = this._dataProvider.markerColor(i); |
1037 context.beginPath(); | 1043 context.beginPath(); |
1038 context.moveTo(position, 0); | 1044 context.moveTo(position, 0); |
1039 context.lineTo(position, height); | 1045 context.lineTo(position, height); |
1040 context.stroke(); | 1046 context.stroke(); |
1047 if (this._dataProvider.isTallMarker(i)) { | |
1048 context.save() | |
1049 context.lineWidth = 1; | |
caseq
2014/11/07 17:39:40
Is this supposed to have effect?
yurys
2014/11/07 19:55:39
Yes, because outer context scope sets line width t
caseq
2014/11/07 20:00:37
You have "context.lineWidth = 0.5;" below.
yurys
2014/11/07 20:02:56
Oh, I see, it should be just lineWidth = 1 and tra
| |
1050 context.translate(0.5, 0.5); | |
1051 context.beginPath(); | |
1052 context.moveTo(position, height); | |
1053 context.lineWidth = 0.5; | |
1054 context.setLineDash([10, 5]); | |
1055 context.lineTo(position, this._canvas.height); | |
1056 context.stroke(); | |
1057 context.restore(); | |
1058 } | |
1041 } | 1059 } |
1042 context.restore(); | 1060 context.restore(); |
1043 }, | 1061 }, |
1044 | 1062 |
1045 _updateMarkerHighlight: function() | 1063 _updateMarkerHighlight: function() |
1046 { | 1064 { |
1047 var element = this._markerHighlighElement; | 1065 var element = this._markerHighlighElement; |
1048 if (element.parentElement) | 1066 if (element.parentElement) |
1049 element.remove(); | 1067 element.remove(); |
1050 var markerIndex = this._highlightedMarkerIndex; | 1068 var markerIndex = this._highlightedMarkerIndex; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1267 this.update(); | 1285 this.update(); |
1268 }, | 1286 }, |
1269 | 1287 |
1270 _enabled: function() | 1288 _enabled: function() |
1271 { | 1289 { |
1272 return this._rawTimelineDataLength !== 0; | 1290 return this._rawTimelineDataLength !== 0; |
1273 }, | 1291 }, |
1274 | 1292 |
1275 __proto__: WebInspector.HBox.prototype | 1293 __proto__: WebInspector.HBox.prototype |
1276 } | 1294 } |
OLD | NEW |