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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 756913002: DevTools: Rename WI.Color's toString(format) -> asString(format) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tests Created 6 years 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
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame) 379 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame)
380 return this._timelineData.entryLevels[entryIndex] % 2 ? "#efb320" : "#fcc02d"; 380 return this._timelineData.entryLevels[entryIndex] % 2 ? "#efb320" : "#fcc02d";
381 var category = WebInspector.TimelineUIUtils.eventStyle(event).category; 381 var category = WebInspector.TimelineUIUtils.eventStyle(event).category;
382 if (WebInspector.TracingModel.isAsyncPhase(event.phase)) { 382 if (WebInspector.TracingModel.isAsyncPhase(event.phase)) {
383 if (event.category === WebInspector.TracingModel.ConsoleEventCategor y) 383 if (event.category === WebInspector.TracingModel.ConsoleEventCategor y)
384 return WebInspector.TimelineFlameChartDataProvider.consoleEvents ColorGenerator().colorForID(event.name); 384 return WebInspector.TimelineFlameChartDataProvider.consoleEvents ColorGenerator().colorForID(event.name);
385 var color = this._asyncColorByCategory[category.name]; 385 var color = this._asyncColorByCategory[category.name];
386 if (color) 386 if (color)
387 return color; 387 return color;
388 var parsedColor = WebInspector.Color.parse(category.fillColorStop1); 388 var parsedColor = WebInspector.Color.parse(category.fillColorStop1);
389 color = parsedColor.setAlpha(0.7).toString(WebInspector.Color.Format .RGBA) || ""; 389 color = parsedColor.setAlpha(0.7).asString(WebInspector.Color.Format .RGBA) || "";
390 this._asyncColorByCategory[category.name] = color; 390 this._asyncColorByCategory[category.name] = color;
391 return color; 391 return color;
392 } 392 }
393 return category.fillColorStop1; 393 return category.fillColorStop1;
394 }, 394 },
395 395
396 /** 396 /**
397 * @param {number} entryIndex 397 * @param {number} entryIndex
398 * @param {!CanvasRenderingContext2D} context 398 * @param {!CanvasRenderingContext2D} context
399 * @param {?string} text 399 * @param {?string} text
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 /** 800 /**
801 * @constructor 801 * @constructor
802 * @param {!WebInspector.TimelineSelection} selection 802 * @param {!WebInspector.TimelineSelection} selection
803 * @param {number} entryIndex 803 * @param {number} entryIndex
804 */ 804 */
805 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) 805 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex)
806 { 806 {
807 this.timelineSelection = selection; 807 this.timelineSelection = selection;
808 this.entryIndex = entryIndex; 808 this.entryIndex = entryIndex;
809 } 809 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/CountersGraph.js ('k') | Source/devtools/front_end/ui/UIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698