mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Add ImageProvider virtual to access the DecodedImageData
...and also the current frame index, in case of animations.
This commit is contained in:
committed by
Andreas Kling
parent
5b88b76b84
commit
cebd4cc10d
Notes:
github-actions[bot]
2025-11-05 08:13:10 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/cebd4cc10d1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6699 Reviewed-by: https://github.com/kalenikaliaksandr
@@ -92,7 +92,7 @@ public:
|
||||
ImageRequest& current_request() { return *m_current_request; }
|
||||
ImageRequest const& current_request() const { return *m_current_request; }
|
||||
|
||||
size_t current_frame_index() const { return m_current_frame_index; }
|
||||
virtual size_t current_frame_index() const override { return m_current_frame_index; }
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/images.html#upgrade-the-pending-request-to-the-current-request
|
||||
void upgrade_pending_request_to_current_request();
|
||||
@@ -108,6 +108,7 @@ public:
|
||||
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 GC::Ptr<DecodedImageData> decoded_image_data() const override;
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user