LibWeb: Track decoded video frame positions along with the frame image

This will be needed by the layout node, which may change what is painted
when the position of the frame image is not the same as the element's
current time.
This commit is contained in:
Timothy Flynn 2023-04-20 06:40:31 -04:00 committed by Andreas Kling
commit dd188aafb9
Notes: sideshowbarker 2024-07-17 01:13:25 +09:00
4 changed files with 16 additions and 10 deletions

View file

@ -76,7 +76,7 @@ void VideoPaintable::paint(PaintContext& context, PaintPhase phase) const
auto paint_user_agent_controls = video_element.has_attribute(HTML::AttributeNames::controls) || video_element.is_scripting_disabled();
if (auto const& bitmap = layout_box().dom_node().current_frame()) {
if (auto const& bitmap = layout_box().dom_node().current_frame().frame) {
context.painter().draw_scaled_bitmap(video_rect.to_type<int>(), *bitmap, bitmap->rect(), 1.0f, to_gfx_scaling_mode(computed_values().image_rendering()));
if (paint_user_agent_controls)