1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibWeb: Make ImageBox ask ImageProvider for intrinsic size and ratio

This paves the way for ImageProvider to have something vector-based
underneath. :^)
This commit is contained in:
Andreas Kling 2023-05-20 16:27:31 +02:00
parent 4ee1e5b224
commit 8d3240d633
9 changed files with 71 additions and 18 deletions

View file

@ -9,6 +9,7 @@
#include <AK/RefCounted.h>
#include <LibGfx/Forward.h>
#include <LibJS/Heap/Cell.h>
#include <LibWeb/PixelUnits.h>
namespace Web::HTML {
@ -24,8 +25,9 @@ public:
virtual size_t loop_count() const = 0;
virtual bool is_animated() const = 0;
virtual Optional<int> natural_width() const = 0;
virtual Optional<int> natural_height() const = 0;
virtual Optional<CSSPixels> intrinsic_width() const = 0;
virtual Optional<CSSPixels> intrinsic_height() const = 0;
virtual Optional<float> intrinsic_aspect_ratio() const = 0;
protected:
DecodedImageData();