Commit 064b7c90 authored by Zeynep Cankara's avatar Zeynep Cankara Committed by Commit Bot

[tools][system-analyzer] Fix the color bug in Map Panel

This CL fixes the Map Panel colors. The getColor
function of Edge class was always falling to the
default color unable to show correct colors in
the timeline panel.

Change-Id: Ide13b35703a656251222f512b2b9282f9f34cc04
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2297473Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Cr-Commit-Position: refs/heads/master@{#68859}
parent b661ef25
......@@ -361,6 +361,8 @@ class V8Map {
V8Map.cache = new Map();
// ===========================================================================
class Edge {
constructor(type, name, reason, time, from, to) {
......@@ -370,30 +372,31 @@ class Edge {
this.time = time;
this.from = from;
this.to = to;
this.getColor = function(type){
switch (type) {
case 'new':
// green
return '#aedc6e';
case 'Normalize':
// violet
return '#d26edc';
case 'SlowToFast':
// orange
return '#dc9b6e';
case 'InitialMap':
// yellow
return '#EEFF41';
case 'Transition':
// pink/violet (primary)
return '#9B6EDC';
case 'ReplaceDescriptors':
// red
return '#dc6eae';
}
// pink/violet (primary)
return '#9B6EDC';
};
}
getColor() {
switch (this.type) {
case 'new':
// green
return '#aedc6e';
case 'Normalize':
// violet
return '#d26edc';
case 'SlowToFast':
// orange
return '#dc9b6e';
case 'InitialMap':
// yellow
return '#EEFF41';
case 'Transition':
// pink/violet (primary)
return '#9B6EDC';
case 'ReplaceDescriptors':
// red
return '#dc6eae';
}
// pink/violet (primary)
return '#9B6EDC';
}
finishSetup() {
......@@ -677,6 +680,9 @@ class Timeline {
}
}
// ===========================================================================
class Chunk {
constructor(index, start, end, items, markers) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment