Double-clicking a "clipped" marker in the marker chart sets an inconsistent range selection
Steps to reproduce:
- Load this profile: https://share.firefox.dev/3l11QiD
- Notice that it's showing a zoomed-in view, where the first CompositorScreenshot marker is mostly cut off by the displayed range. Only the "end part" of the first CompositorScreenshot marker is visible.
- Double-click that clipped CompositorScreenshot marker.
Expected results: The preview selection should be clamped so that it's contained in the displayed range. Also, resizing the preview selection from its "start" handle should work normally.
Actual results: The preview selection "escapes" the displayed range, and is displayed incorrectly: In the tracks list, the preview selection is overlay is set to the full width of the unclipped CompositorScreenshot marker but shifted over to the right, so that it starts at the start of the displayed range. Once you grab the "start" handle of the preview selection and move it, the "end" of the preview selection jumps to where it should be.
This problem also happens when clicking a screenshot in the screenshot track. This problem does not occur when clicking a marker in a marker track at the top.
┆Issue is synchronized with this Jira Task