| OLD | NEW |
| 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 { | 538 { |
| 539 var event = this._entryEvents[entryIndex]; | 539 var event = this._entryEvents[entryIndex]; |
| 540 if (!event) | 540 if (!event) |
| 541 return this._entryIndexToFrame[entryIndex] ? "white" : "#aaa"; | 541 return this._entryIndexToFrame[entryIndex] ? "white" : "#aaa"; |
| 542 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame) { | 542 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame) { |
| 543 var colorId = event.args["data"]["url"]; | 543 var colorId = event.args["data"]["url"]; |
| 544 return this._jsFramesColorGenerator.colorForID(colorId); | 544 return this._jsFramesColorGenerator.colorForID(colorId); |
| 545 } | 545 } |
| 546 var category = WebInspector.TimelineUIUtils.eventStyle(event).category; | 546 var category = WebInspector.TimelineUIUtils.eventStyle(event).category; |
| 547 if (WebInspector.TracingModel.isAsyncPhase(event.phase)) { | 547 if (WebInspector.TracingModel.isAsyncPhase(event.phase)) { |
| 548 if (event.category === WebInspector.TracingModel.ConsoleEventCategor
y) | 548 if (event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory
)) |
| 549 return this._consoleColorGenerator.colorForID(event.name); | 549 return this._consoleColorGenerator.colorForID(event.name); |
| 550 var color = this._asyncColorByCategory[category.name]; | 550 var color = this._asyncColorByCategory[category.name]; |
| 551 if (color) | 551 if (color) |
| 552 return color; | 552 return color; |
| 553 var parsedColor = WebInspector.Color.parse(category.fillColorStop1); | 553 var parsedColor = WebInspector.Color.parse(category.fillColorStop1); |
| 554 color = parsedColor.setAlpha(0.7).asString(WebInspector.Color.Format
.RGBA) || ""; | 554 color = parsedColor.setAlpha(0.7).asString(WebInspector.Color.Format
.RGBA) || ""; |
| 555 this._asyncColorByCategory[category.name] = color; | 555 this._asyncColorByCategory[category.name] = color; |
| 556 return color; | 556 return color; |
| 557 } | 557 } |
| 558 return category.fillColorStop1; | 558 return category.fillColorStop1; |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 /** | 1575 /** |
| 1576 * @constructor | 1576 * @constructor |
| 1577 * @param {!WebInspector.TimelineSelection} selection | 1577 * @param {!WebInspector.TimelineSelection} selection |
| 1578 * @param {number} entryIndex | 1578 * @param {number} entryIndex |
| 1579 */ | 1579 */ |
| 1580 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) | 1580 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) |
| 1581 { | 1581 { |
| 1582 this.timelineSelection = selection; | 1582 this.timelineSelection = selection; |
| 1583 this.entryIndex = entryIndex; | 1583 this.entryIndex = entryIndex; |
| 1584 } | 1584 } |
| OLD | NEW |