Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: Source/devtools/front_end/TimelineEventOverview.js

Issue 187473005: DevTools: remove color generator from timeline flame chart. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/TimelineFlameChart.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/TimelineFlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698