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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartDataProvider.js

Issue 2832653002: DevTools: brush up color blending and theming APIs. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 this._consoleColorGenerator = 51 this._consoleColorGenerator =
52 new PerfUI.FlameChart.ColorGenerator({min: 30, max: 55}, {min: 70, max: 100, count: 6}, 50, 0.7); 52 new PerfUI.FlameChart.ColorGenerator({min: 30, max: 55}, {min: 70, max: 100, count: 6}, 50, 0.7);
53 this._extensionColorGenerator = 53 this._extensionColorGenerator =
54 new PerfUI.FlameChart.ColorGenerator({min: 210, max: 300}, {min: 70, max : 100, count: 6}, 70, 0.7); 54 new PerfUI.FlameChart.ColorGenerator({min: 210, max: 300}, {min: 70, max : 100, count: 6}, 70, 0.7);
55 55
56 var defaultGroupStyle = { 56 var defaultGroupStyle = {
57 padding: 4, 57 padding: 4,
58 height: 17, 58 height: 17,
59 collapsible: true, 59 collapsible: true,
60 color: UI.themeSupport.patchColor('#222', UI.ThemeSupport.ColorUsage.Foreg round), 60 color: UI.themeSupport.patchColorText('#222', UI.ThemeSupport.ColorUsage.F oreground),
61 backgroundColor: UI.themeSupport.patchColor('white', UI.ThemeSupport.Color Usage.Background), 61 backgroundColor: UI.themeSupport.patchColorText('white', UI.ThemeSupport.C olorUsage.Background),
62 font: this._font, 62 font: this._font,
63 nestingLevel: 0, 63 nestingLevel: 0,
64 shareHeaderLine: true 64 shareHeaderLine: true
65 }; 65 };
66 66
67 this._headerLevel1 = /** @type {!PerfUI.FlameChart.GroupStyle} */ 67 this._headerLevel1 = /** @type {!PerfUI.FlameChart.GroupStyle} */
68 (Object.assign({}, defaultGroupStyle, {shareHeaderLine: false})); 68 (Object.assign({}, defaultGroupStyle, {shareHeaderLine: false}));
69 this._headerLevel2 = /** @type {!PerfUI.FlameChart.GroupStyle} */ 69 this._headerLevel2 = /** @type {!PerfUI.FlameChart.GroupStyle} */
70 (Object.assign({}, defaultGroupStyle, {padding: 2, nestingLevel: 1, coll apsible: false})); 70 (Object.assign({}, defaultGroupStyle, {padding: 2, nestingLevel: 1, coll apsible: false}));
71 this._staticHeader = /** @type {!PerfUI.FlameChart.GroupStyle} */ 71 this._staticHeader = /** @type {!PerfUI.FlameChart.GroupStyle} */
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 */ 910 */
911 eventByIndex(entryIndex) { 911 eventByIndex(entryIndex) {
912 return this._entryType(entryIndex) === Timeline.TimelineFlameChartEntryType. Event ? 912 return this._entryType(entryIndex) === Timeline.TimelineFlameChartEntryType. Event ?
913 /** @type {!SDK.TracingModel.Event} */ (this._entryData[entryIndex]) : 913 /** @type {!SDK.TracingModel.Event} */ (this._entryData[entryIndex]) :
914 null; 914 null;
915 } 915 }
916 }; 916 };
917 917
918 Timeline.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.001; 918 Timeline.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.001;
919 Timeline.TimelineFlameChartDataProvider._indexSymbol = Symbol('index'); 919 Timeline.TimelineFlameChartDataProvider._indexSymbol = Symbol('index');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698