LibWeb: Add ImageProvider virtual to access the DecodedImageData

...and also the current frame index, in case of animations.
This commit is contained in:
Andreas Kling 2025-11-04 20:51:46 +01:00 committed by Andreas Kling
parent 5b88b76b84
commit cebd4cc10d
Notes: github-actions[bot] 2025-11-05 08:13:10 +00:00
8 changed files with 33 additions and 2 deletions

View file

@ -285,6 +285,8 @@ private:
virtual RefPtr<Gfx::ImmutableBitmap> current_image_bitmap_sized(Gfx::IntSize) const override;
virtual void set_visible_in_viewport(bool) override;
virtual GC::Ptr<DOM::Element const> to_html_element() const override { return *this; }
virtual size_t current_frame_index() const override { return 0; }
virtual GC::Ptr<HTML::DecodedImageData> decoded_image_data() const override { return image_data(); }
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;