LibWeb: Support animations in embedded SVG images

This commit is contained in:
Tim Ledbetter 2024-08-29 21:41:22 +01:00 committed by Alexander Kalenik
commit a95905f93f
Notes: github-actions[bot] 2024-08-30 11:35:58 +00:00
2 changed files with 41 additions and 1 deletions

View file

@ -49,12 +49,17 @@ protected:
private:
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
void animate();
JS::GCPtr<SVG::SVGAnimatedLength> m_x;
JS::GCPtr<SVG::SVGAnimatedLength> m_y;
JS::GCPtr<SVG::SVGAnimatedLength> m_width;
JS::GCPtr<SVG::SVGAnimatedLength> m_height;
RefPtr<Core::Timer> m_animation_timer;
size_t m_current_frame_index { 0 };
size_t m_loops_completed { 0 };
URL::URL m_href;
JS::GCPtr<HTML::SharedResourceRequest> m_resource_request;