[tools][system-analyzer] Fix Chunk Positions
This CL fixes the bug related with chunk position initialisation. The bug caused by not subtracting the timeline chunk start time from chunk start time. Additionally, it corrects the offset being used while detecting the chunk location. Bug: v8:10644 Change-Id: Icf426a297402f87d2acda0b2aa747b90e91686c6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2377740 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Zeynep Cankara <zcankara@google.com> Cr-Commit-Position: refs/heads/master@{#69589}
This commit is contained in:
parent
945fabf52f
commit
7a1580a77d
@ -337,7 +337,7 @@ class MapLogEvent extends Event {
|
||||
|
||||
position(chunks) {
|
||||
let index = this.chunkIndex(chunks);
|
||||
let xFrom = (index + 0.5) * kChunkWidth;
|
||||
let xFrom = (index + 1.5) * kChunkWidth;
|
||||
let yFrom = kChunkHeight - chunks[index].yOffset(this);
|
||||
return [xFrom, yFrom];
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ defineCustomElement('./timeline/timeline-track', (templateText) =>
|
||||
if (chunk.isEmpty()) continue;
|
||||
let node = this.div();
|
||||
node.className = 'chunk';
|
||||
node.style.left = (chunks[i].start * this.#timeToPixel) + 'px';
|
||||
node.style.left = ((chunks[i].start - start) * this.#timeToPixel) + 'px';
|
||||
node.style.height = height + 'px';
|
||||
node.chunk = chunk;
|
||||
node.addEventListener('mousemove', e => this.handleChunkMouseMove(e));
|
||||
|
Loading…
Reference in New Issue
Block a user