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 29 matching lines...) Expand all Loading... |
40 this.element.id = "timeline-overview-events"; | 40 this.element.id = "timeline-overview-events"; |
41 | 41 |
42 this._fillStyles = {}; | 42 this._fillStyles = {}; |
43 var categories = WebInspector.TimelineUIUtils.categories(); | 43 var categories = WebInspector.TimelineUIUtils.categories(); |
44 for (var category in categories) { | 44 for (var category in categories) { |
45 this._fillStyles[category] = WebInspector.TimelineUIUtils.createFillStyl
eForCategory(this._context, 0, WebInspector.TimelineEventOverview._stripGradient
Height, categories[category]); | 45 this._fillStyles[category] = WebInspector.TimelineUIUtils.createFillStyl
eForCategory(this._context, 0, WebInspector.TimelineEventOverview._stripGradient
Height, categories[category]); |
46 categories[category].addEventListener(WebInspector.TimelineCategory.Even
ts.VisibilityChanged, this._onCategoryVisibilityChanged, this); | 46 categories[category].addEventListener(WebInspector.TimelineCategory.Even
ts.VisibilityChanged, this._onCategoryVisibilityChanged, this); |
47 } | 47 } |
48 | 48 |
49 this._disabledCategoryFillStyle = WebInspector.TimelineUIUtils.createFillSty
le(this._context, 0, WebInspector.TimelineEventOverview._stripGradientHeight, | 49 this._disabledCategoryFillStyle = WebInspector.TimelineUIUtils.createFillSty
le(this._context, 0, WebInspector.TimelineEventOverview._stripGradientHeight, |
50 "rgb(218, 218, 218)", "rgb(170, 170, 170)", "rgb(143, 143, 143)"); | 50 "hsl(0, 0%, 85%)", "hsl(0, 0%, 67%)", "hsl(0, 0%, 56%)"); |
51 | 51 |
52 this._disabledCategoryBorderStyle = "rgb(143, 143, 143)"; | 52 this._disabledCategoryBorderStyle = "rgb(143, 143, 143)"; |
53 } | 53 } |
54 | 54 |
55 /** @const */ | 55 /** @const */ |
56 WebInspector.TimelineEventOverview._numberOfStrips = 3; | 56 WebInspector.TimelineEventOverview._numberOfStrips = 3; |
57 | 57 |
58 /** @const */ | 58 /** @const */ |
59 WebInspector.TimelineEventOverview._stripGradientHeight = 120; | 59 WebInspector.TimelineEventOverview._stripGradientHeight = 120; |
60 | 60 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 this._context.scale(1, innerStripHeight / WebInspector.TimelineEventOver
view._stripGradientHeight); | 131 this._context.scale(1, innerStripHeight / WebInspector.TimelineEventOver
view._stripGradientHeight); |
132 this._context.fillStyle = category.hidden ? this._disabledCategoryFillSt
yle : this._fillStyles[category.name]; | 132 this._context.fillStyle = category.hidden ? this._disabledCategoryFillSt
yle : this._fillStyles[category.name]; |
133 this._context.fillRect(0, 0, width, WebInspector.TimelineEventOverview._
stripGradientHeight); | 133 this._context.fillRect(0, 0, width, WebInspector.TimelineEventOverview._
stripGradientHeight); |
134 this._context.strokeStyle = category.hidden ? this._disabledCategoryBord
erStyle : category.borderColor; | 134 this._context.strokeStyle = category.hidden ? this._disabledCategoryBord
erStyle : category.borderColor; |
135 this._context.strokeRect(0, 0, width, WebInspector.TimelineEventOverview
._stripGradientHeight); | 135 this._context.strokeRect(0, 0, width, WebInspector.TimelineEventOverview
._stripGradientHeight); |
136 this._context.restore(); | 136 this._context.restore(); |
137 }, | 137 }, |
138 | 138 |
139 __proto__: WebInspector.TimelineOverviewBase.prototype | 139 __proto__: WebInspector.TimelineOverviewBase.prototype |
140 } | 140 } |
OLD | NEW |