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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 if (warning) { | 487 if (warning) { |
488 warning.classList.add('timeline-info-warning'); | 488 warning.classList.add('timeline-info-warning'); |
489 contents.appendChild(warning); | 489 contents.appendChild(warning); |
490 } | 490 } |
491 return element; | 491 return element; |
492 } | 492 } |
493 | 493 |
494 /** | 494 /** |
495 * @override | 495 * @override |
496 * @param {number} entryIndex | 496 * @param {number} entryIndex |
| 497 */ |
| 498 highlightEntry(entryIndex) { |
| 499 SDK.DOMModel.hideDOMNodeHighlight(); |
| 500 var event = /** @type {!SDK.TracingModel.Event} */ (this._entryData[entryInd
ex]); |
| 501 if (!event) |
| 502 return; |
| 503 var target = this._model.targetByEvent(event); |
| 504 if (!target) |
| 505 return; |
| 506 var timelineData = TimelineModel.TimelineData.forEvent(event); |
| 507 var backendNodeId = timelineData.backendNodeId; |
| 508 if (!backendNodeId) |
| 509 return; |
| 510 new SDK.DeferredDOMNode(target, backendNodeId).highlight(); |
| 511 } |
| 512 |
| 513 /** |
| 514 * @override |
| 515 * @param {number} entryIndex |
497 * @return {string} | 516 * @return {string} |
498 */ | 517 */ |
499 entryColor(entryIndex) { | 518 entryColor(entryIndex) { |
500 // This is not annotated due to closure compiler failure to properly infer c
ache container's template type. | 519 // This is not annotated due to closure compiler failure to properly infer c
ache container's template type. |
501 function patchColorAndCache(cache, key, lookupColor) { | 520 function patchColorAndCache(cache, key, lookupColor) { |
502 var color = cache.get(key); | 521 var color = cache.get(key); |
503 if (color) | 522 if (color) |
504 return color; | 523 return color; |
505 var parsedColor = Common.Color.parse(lookupColor(key)); | 524 var parsedColor = Common.Color.parse(lookupColor(key)); |
506 color = parsedColor.setAlpha(0.7).asString(Common.Color.Format.RGBA) || ''
; | 525 color = parsedColor.setAlpha(0.7).asString(Common.Color.Format.RGBA) || ''
; |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 * @return {boolean} | 814 * @return {boolean} |
796 */ | 815 */ |
797 _isVisible(event) { | 816 _isVisible(event) { |
798 return this._filters.every(function(filter) { | 817 return this._filters.every(function(filter) { |
799 return filter.accept(event); | 818 return filter.accept(event); |
800 }); | 819 }); |
801 } | 820 } |
802 }; | 821 }; |
803 | 822 |
804 Timeline.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.001; | 823 Timeline.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.001; |
OLD | NEW |