1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibWeb: Remove StyleValue::has/to_integer()

Only NumericStyleValue holds integers.

I'm not sure our current distinction between NumericStyleValue holding
an integer or non-integer is useful given it always returns a float.
:thonk:
This commit is contained in:
Sam Atkins 2023-05-26 17:43:20 +01:00 committed by Andreas Kling
parent 4ecf0b7768
commit 5cbf6eb930
5 changed files with 9 additions and 11 deletions

View file

@ -35,8 +35,8 @@ public:
[](i64 value) { return (float)value; });
}
virtual bool has_integer() const override { return m_value.has<i64>(); }
virtual float to_integer() const override { return m_value.get<i64>(); }
bool has_integer() const { return m_value.has<i64>(); }
float integer() const { return m_value.get<i64>(); }
virtual ErrorOr<String> to_string() const override;