1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

LibWeb: Render HTMLVideoElement controls when scripting is disabled

The spec recommends exposing the user agent interface when scripting is
disabled on the media element.
This commit is contained in:
Timothy Flynn 2023-04-17 07:31:00 -04:00 committed by Andreas Kling
parent 19cc1327af
commit 6131e621d6

View file

@ -74,7 +74,7 @@ void VideoPaintable::paint(PaintContext& context, PaintPhase phase) const
if (layout_mouse_position.has_value() && document().hovered_node() == &video_element)
mouse_position = context.rounded_device_point(*layout_mouse_position);
auto paint_user_agent_controls = video_element.has_attribute(HTML::AttributeNames::controls);
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()) {
context.painter().draw_scaled_bitmap(video_rect.to_type<int>(), *bitmap, bitmap->rect(), 1.0f, to_gfx_scaling_mode(computed_values().image_rendering()));