1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:17:44 +00:00

LibWeb: Allow creating Lengths from CSSPixels

This commit is contained in:
Sam Atkins 2022-10-24 17:16:08 +01:00 committed by Linus Groh
parent 8a5c50f59d
commit 56422e37e0
2 changed files with 14 additions and 0 deletions

View file

@ -9,6 +9,7 @@
#include <AK/DeprecatedString.h>
#include <LibGfx/Forward.h>
#include <LibWeb/Forward.h>
#include <LibWeb/PixelUnits.h>
namespace Web::CSS {
@ -40,10 +41,12 @@ public:
// this file already. To break the cyclic dependency, we must move all method definitions out.
Length(int value, Type type);
Length(float value, Type type);
Length(CSSPixels value, Type type);
~Length();
static Length make_auto();
static Length make_px(float value);
static Length make_px(CSSPixels value);
static Length make_calculated(NonnullRefPtr<CalculatedStyleValue>);
Length percentage_of(Percentage const&) const;