LibWeb: Add support for bitmap scaling in createImageBitmap()

This commit is contained in:
ayeteadoe 2025-10-10 22:38:09 -07:00 committed by Alexander Kalenik
commit 0d5136ae5c
Notes: github-actions[bot] 2025-10-14 10:21:08 +00:00
6 changed files with 96 additions and 27 deletions

View file

@ -8,6 +8,7 @@
#include <AK/OwnPtr.h>
#include <LibGfx/Bitmap.h>
#include <LibWeb/Bindings/ImageBitmapPrototype.h>
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/Bindings/Serializable.h>
#include <LibWeb/Bindings/Transferable.h>
@ -23,6 +24,7 @@ struct ImageBitmapOptions {
// FIXME: Implement the rest of the fields
Optional<WebIDL::UnsignedLong> resize_width;
Optional<WebIDL::UnsignedLong> resize_height;
Bindings::ResizeQuality resize_quality = Bindings::ResizeQuality::Low;
};
class ImageBitmap final : public Bindings::PlatformObject