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

LibWeb: Use CSSPixelFraction to represent aspect ratios

This allows us to retain perfect precision for aspect ratios derived
from either the intrinsic sizes of replaced elements, or the
`aspect-ratio` CSS property.
This commit is contained in:
Zaggy1024 2023-09-03 17:33:58 -05:00 committed by Andreas Kling
parent 4fb209d25f
commit 34c5043cbe
22 changed files with 57 additions and 55 deletions

View file

@ -86,7 +86,7 @@ public:
// ^Layout::ImageProvider
virtual Optional<CSSPixels> intrinsic_width() const override;
virtual Optional<CSSPixels> intrinsic_height() const override;
virtual Optional<float> intrinsic_aspect_ratio() const override;
virtual Optional<CSSPixelFraction> intrinsic_aspect_ratio() const override;
virtual RefPtr<Gfx::Bitmap const> current_image_bitmap(Gfx::IntSize = {}) const override;
virtual void set_visible_in_viewport(bool) override;