LibWeb: Update the media playback time for clicks on the media timeline

When clicking on the media timeline, compute the percentage along the
timeline's width the user clicked, and set the playback time to the same
percentage of the video's duration.
This commit is contained in:
Timothy Flynn 2023-04-11 19:24:52 -04:00 committed by Linus Groh
commit c403f8e92c
Notes: sideshowbarker 2024-07-17 10:08:28 +09:00
2 changed files with 12 additions and 0 deletions

View file

@ -39,6 +39,7 @@ public:
struct CachedLayoutBoxes {
Optional<CSSPixelRect> control_box_rect;
Optional<CSSPixelRect> playback_button_rect;
Optional<CSSPixelRect> timeline_rect;
};
CachedLayoutBoxes& cached_layout_boxes(Badge<Painting::VideoPaintable>) const { return m_layout_boxes; }