1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

LibWeb: Remove Length::Type::Percentage :^)

All `<percentage>`s in the CSS grammar are now represented by the
`Percentage` class, and `<length-percentage>` by `LengthPercentage`.
This commit is contained in:
Sam Atkins 2022-01-19 16:40:01 +00:00 committed by Andreas Kling
parent 5e9a6302e5
commit cff44831a8
5 changed files with 3 additions and 19 deletions

View file

@ -1194,10 +1194,6 @@ public:
Percentage const& percentage() const { return m_percentage; }
Percentage& percentage() { return m_percentage; }
// FIXME: This is a temporary hack until we fully separate Length and Percentage.
bool has_length() const override { return true; }
Length to_length() const override { return { m_percentage.value(), Length::Type::Percentage }; }
virtual String to_string() const override
{
return m_percentage.to_string();