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

@ -1281,4 +1281,11 @@ bool HTMLImageElement::allows_auto_sizes() const
|| sizes->starts_with_bytes("auto,"sv, AK::CaseSensitivity::CaseInsensitive));
}
GC::Ptr<DecodedImageData> HTMLImageElement::decoded_image_data() const
{
if (!m_current_request)
return nullptr;
return m_current_request->image_data();
}
}